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