@Test public void startsFromUnderscore() { UserTask userTask = bpmn2.createUserTask(); UserTaskPropertyWriter userTaskPropertyWriter = new UserTaskPropertyWriter(userTask, variableScope, new HashSet<>()); Actors actor = new Actors(); actor.setValue("startsFromUnderscore"); userTaskPropertyWriter.setActors(actor); assertEquals("startsFromUnderscore", getActors(userTask).get(0).a); assertTrue(getActors(userTask).get(0).b.startsWith("_")); }
public void setActors(Actors actors) { for (String actor : fromActorString(actors.getValue())) { PotentialOwner potentialOwner = bpmn2.createPotentialOwner(); potentialOwner.setId("_"+UUID.randomUUID().toString()); FormalExpression formalExpression = bpmn2.createFormalExpression(); formalExpression.setBody(actor); ResourceAssignmentExpression resourceAssignmentExpression = bpmn2.createResourceAssignmentExpression(); resourceAssignmentExpression.setExpression(formalExpression); potentialOwner.setResourceAssignmentExpression(resourceAssignmentExpression); task.getResources().add(potentialOwner); } }
UserTaskPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setActors(Actors actors) { for (String actor : fromActorString(actors.getValue())) { PotentialOwner potentialOwner = bpmn2.createPotentialOwner(); potentialOwner.setId("_"+UUID.randomUUID().toString()); FormalExpression formalExpression = bpmn2.createFormalExpression(); formalExpression.setBody(actor); ResourceAssignmentExpression resourceAssignmentExpression = bpmn2.createResourceAssignmentExpression(); resourceAssignmentExpression.setExpression(formalExpression); potentialOwner.setResourceAssignmentExpression(resourceAssignmentExpression); task.getResources().add(potentialOwner); } } }
UserTaskPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setActors(Actors actors) { for (String actor : fromActorString(actors.getValue())) { PotentialOwner potentialOwner = bpmn2.createPotentialOwner(); potentialOwner.setId("_"+UUID.randomUUID().toString()); FormalExpression formalExpression = bpmn2.createFormalExpression(); formalExpression.setBody(actor); ResourceAssignmentExpression resourceAssignmentExpression = bpmn2.createResourceAssignmentExpression(); resourceAssignmentExpression.setExpression(formalExpression); potentialOwner.setResourceAssignmentExpression(resourceAssignmentExpression); task.getResources().add(potentialOwner); } } UserTaskPropertyWriter(UserTask task, VariableScope variableScope, Set<DataObject> dataObjects); }
UserTaskPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setActors(Actors actors) { for (String actor : fromActorString(actors.getValue())) { PotentialOwner potentialOwner = bpmn2.createPotentialOwner(); potentialOwner.setId("_"+UUID.randomUUID().toString()); FormalExpression formalExpression = bpmn2.createFormalExpression(); formalExpression.setBody(actor); ResourceAssignmentExpression resourceAssignmentExpression = bpmn2.createResourceAssignmentExpression(); resourceAssignmentExpression.setExpression(formalExpression); potentialOwner.setResourceAssignmentExpression(resourceAssignmentExpression); task.getResources().add(potentialOwner); } } UserTaskPropertyWriter(UserTask task, VariableScope variableScope, Set<DataObject> dataObjects); void setAsync(boolean async); void setSkippable(boolean skippable); void setPriority(String priority); void setSubject(String subject); void setDescription(String description); void setCreatedBy(String createdBy); void setAdHocAutostart(boolean autoStart); void setTaskName(String taskName); void setActors(Actors actors); void setReassignments(ReassignmentsInfo reassignments); void setGroupId(String value); void setOnEntryAction(OnEntryAction onEntryAction); void setOnExitAction(OnExitAction onExitAction); void setContent(String content); void setSLADueDate(String slaDueDate); void setNotifications(NotificationsInfo notificationsInfo); }
UserTaskPropertyWriter extends MultipleInstanceActivityPropertyWriter { public void setActors(Actors actors) { for (String actor : fromActorString(actors.getValue())) { PotentialOwner potentialOwner = bpmn2.createPotentialOwner(); potentialOwner.setId("_"+UUID.randomUUID().toString()); FormalExpression formalExpression = bpmn2.createFormalExpression(); formalExpression.setBody(actor); ResourceAssignmentExpression resourceAssignmentExpression = bpmn2.createResourceAssignmentExpression(); resourceAssignmentExpression.setExpression(formalExpression); potentialOwner.setResourceAssignmentExpression(resourceAssignmentExpression); task.getResources().add(potentialOwner); } } UserTaskPropertyWriter(UserTask task, VariableScope variableScope, Set<DataObject> dataObjects); void setAsync(boolean async); void setSkippable(boolean skippable); void setPriority(String priority); void setSubject(String subject); void setDescription(String description); void setCreatedBy(String createdBy); void setAdHocAutostart(boolean autoStart); void setTaskName(String taskName); void setActors(Actors actors); void setReassignments(ReassignmentsInfo reassignments); void setGroupId(String value); void setOnEntryAction(OnEntryAction onEntryAction); void setOnExitAction(OnExitAction onExitAction); void setContent(String content); void setSLADueDate(String slaDueDate); void setNotifications(NotificationsInfo notificationsInfo);  }