Search in sources :

Example 1 with TaskNextActorResponse

use of com.plumdo.flow.rest.task.TaskNextActorResponse in project plumdo-work by wengwh.

the class RestResponseFactory method createTaskNextActorResponse.

public TaskNextActorResponse createTaskNextActorResponse(Task task, List<IdentityLink> identityLinks) {
    TaskNextActorResponse taskNextActor = new TaskNextActorResponse();
    taskNextActor.setProcessDefinitionId(task.getProcessDefinitionId());
    taskNextActor.setTaskDefinitionKey(task.getTaskDefinitionKey());
    taskNextActor.setTaskDefinitionName(task.getName());
    for (IdentityLink identityLink : identityLinks) {
        if (identityLink.getGroupId() != null) {
            taskNextActor.addActorInfo(identityLink.getGroupId(), TaskNextActorResponse.TYPE_GROUP, identityLink.getType());
        } else if (identityLink.getUserId() != null) {
            taskNextActor.addActorInfo(identityLink.getUserId(), TaskNextActorResponse.TYPE_USER, identityLink.getType());
        }
    }
    return taskNextActor;
}
Also used : TaskNextActorResponse(com.plumdo.flow.rest.task.TaskNextActorResponse) IdentityLink(org.flowable.engine.task.IdentityLink)

Aggregations

TaskNextActorResponse (com.plumdo.flow.rest.task.TaskNextActorResponse)1 IdentityLink (org.flowable.engine.task.IdentityLink)1