use of org.camunda.bpm.model.bpmn.instance.HumanPerformer in project camunda-bpmn-model by camunda.
the class ResourceRolesTest method testGetHumanPerformer.
@Test
public void testGetHumanPerformer() {
UserTask userTask = modelInstance.getModelElementById("_7");
Collection<ResourceRole> resourceRoles = userTask.getResourceRoles();
assertThat(resourceRoles.size()).isEqualTo(1);
ResourceRole resourceRole = resourceRoles.iterator().next();
assertThat(resourceRole instanceof HumanPerformer).isTrue();
assertThat(resourceRole.getName()).isEqualTo("Task human performer");
}
use of org.camunda.bpm.model.bpmn.instance.HumanPerformer in project camunda-bpmn-model by camunda.
the class HumanPerformerImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(HumanPerformer.class, BPMN_ELEMENT_HUMAN_PERFORMER).namespaceUri(BPMN20_NS).extendsType(Performer.class).instanceProvider(new ModelElementTypeBuilder.ModelTypeInstanceProvider<HumanPerformer>() {
public HumanPerformer newInstance(ModelTypeInstanceContext instanceContext) {
return new HumanPerformerImpl(instanceContext);
}
});
typeBuilder.build();
}
Aggregations