Search in sources :

Example 1 with ResourceRole

use of org.camunda.bpm.model.bpmn.instance.ResourceRole 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");
}
Also used : ResourceRole(org.camunda.bpm.model.bpmn.instance.ResourceRole) UserTask(org.camunda.bpm.model.bpmn.instance.UserTask) PotentialOwner(org.camunda.bpm.model.bpmn.instance.PotentialOwner) Test(org.junit.Test)

Example 2 with ResourceRole

use of org.camunda.bpm.model.bpmn.instance.ResourceRole 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");
}
Also used : ResourceRole(org.camunda.bpm.model.bpmn.instance.ResourceRole) UserTask(org.camunda.bpm.model.bpmn.instance.UserTask) HumanPerformer(org.camunda.bpm.model.bpmn.instance.HumanPerformer) Test(org.junit.Test)

Example 3 with ResourceRole

use of org.camunda.bpm.model.bpmn.instance.ResourceRole 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");
}
Also used : HumanPerformer(org.camunda.bpm.model.bpmn.instance.HumanPerformer) Performer(org.camunda.bpm.model.bpmn.instance.Performer) ResourceRole(org.camunda.bpm.model.bpmn.instance.ResourceRole) UserTask(org.camunda.bpm.model.bpmn.instance.UserTask) Test(org.junit.Test)

Aggregations

ResourceRole (org.camunda.bpm.model.bpmn.instance.ResourceRole)3 UserTask (org.camunda.bpm.model.bpmn.instance.UserTask)3 Test (org.junit.Test)3 HumanPerformer (org.camunda.bpm.model.bpmn.instance.HumanPerformer)2 Performer (org.camunda.bpm.model.bpmn.instance.Performer)1 PotentialOwner (org.camunda.bpm.model.bpmn.instance.PotentialOwner)1