AnsweredAssumed Answered

Post/PreConditions, adding via api.

Question asked by CalebBishop82433878 on Mar 18, 2019

Im trying to add postconditions/preconditions via api calls, however only one is added and the rest seem to be ignored.

 

For Example,

endDepenendcies.forEachRemaining(dependency -> {
    JobPlanTask task = dependency.getTask();

    if(task.postConditions() != null){
        ConditionsSet pSet = task.postConditions().copy();
        Iterator<ConditionOrAction> actionIterator = pSet.iterator();
        actionIterator.forEachRemaining(postConditions::add);
        task.postConditions().clear();
    }
});
for(ConditionOrAction action: postConditions){
    jobPlanTask.postConditions().add(action);
}

This gets the post conditions then adds them at the bottom. There are 4 in the list to be added, however, only one in that list is added and the rest are not. There is no error or anything, has anyone else had any issues with this?

Outcomes