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