AppWorx, Dollar Universe and Sysload Community

Post/PreConditions, adding via api.

  • 1.  Post/PreConditions, adding via api.

    Posted Mar 18, 2019 01:40 PM

    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?