Search in sources :

Example 1 with Actors

use of org.kie.workbench.common.stunner.bpmn.definition.property.assignee.Actors in project kie-wb-common by kiegroup.

the class UserTaskPropertyReader method getActors.

public Actors getActors() {
    // get the user task actors
    List<ResourceRole> roles = task.getResources();
    List<String> users = new ArrayList<>();
    for (ResourceRole role : roles) {
        if (role instanceof PotentialOwner) {
            FormalExpression fe = (FormalExpression) role.getResourceAssignmentExpression().getExpression();
            users.add(fe.getBody());
        }
    }
    return new Actors(renderActors(users));
}
Also used : ResourceRole(org.eclipse.bpmn2.ResourceRole) ArrayList(java.util.ArrayList) PotentialOwner(org.eclipse.bpmn2.PotentialOwner) Actors(org.kie.workbench.common.stunner.bpmn.definition.property.assignee.Actors) FormalExpression(org.eclipse.bpmn2.FormalExpression)

Aggregations

ArrayList (java.util.ArrayList)1 FormalExpression (org.eclipse.bpmn2.FormalExpression)1 PotentialOwner (org.eclipse.bpmn2.PotentialOwner)1 ResourceRole (org.eclipse.bpmn2.ResourceRole)1 Actors (org.kie.workbench.common.stunner.bpmn.definition.property.assignee.Actors)1