Search in sources :

Example 1 with TaskWithProcessDescriptionList

use of org.kie.server.api.model.instance.TaskWithProcessDescriptionList in project droolsjbpm-integration by kiegroup.

the class ConvertUtils method convertToTaskInstanceListPO.

public static TaskWithProcessDescriptionList convertToTaskInstanceListPO(Collection<UserTaskInstanceWithPotOwnerDesc> instances) {
    if (instances == null) {
        return new TaskWithProcessDescriptionList(new org.kie.server.api.model.instance.TaskWithProcessDescription[0]);
    }
    List<TaskWithProcessDescription> taskInstances = new ArrayList<TaskWithProcessDescription>(instances.size());
    for (UserTaskInstanceWithPotOwnerDesc task : instances) {
        org.kie.server.api.model.instance.TaskWithProcessDescription instance = convertToTaskPO(task);
        taskInstances.add(instance);
    }
    return new TaskWithProcessDescriptionList(taskInstances);
}
Also used : UserTaskInstanceWithPotOwnerDesc(org.jbpm.services.api.model.UserTaskInstanceWithPotOwnerDesc) TaskWithProcessDescription(org.kie.server.api.model.instance.TaskWithProcessDescription) ArrayList(java.util.ArrayList) TaskWithProcessDescription(org.kie.server.api.model.instance.TaskWithProcessDescription) TaskWithProcessDescriptionList(org.kie.server.api.model.instance.TaskWithProcessDescriptionList)

Aggregations

ArrayList (java.util.ArrayList)1 UserTaskInstanceWithPotOwnerDesc (org.jbpm.services.api.model.UserTaskInstanceWithPotOwnerDesc)1 TaskWithProcessDescription (org.kie.server.api.model.instance.TaskWithProcessDescription)1 TaskWithProcessDescriptionList (org.kie.server.api.model.instance.TaskWithProcessDescriptionList)1