Java Code Examples for org.camunda.bpm.model.bpmn.instance.UserTask#getResourceRoles()

The following examples show how to use org.camunda.bpm.model.bpmn.instance.UserTask#getResourceRoles() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ResourceRolesTest.java    From camunda-bpmn-model with Apache License 2.0 5 votes vote down vote up
@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");
}
 
Example 2
Source File: ResourceRolesTest.java    From camunda-bpmn-model with Apache License 2.0 5 votes vote down vote up
@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");
}
 
Example 3
Source File: ResourceRolesTest.java    From camunda-bpmn-model with Apache License 2.0 5 votes vote down vote up
@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");
}
 
Example 4
Source File: ResourceRolesTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@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");
}
 
Example 5
Source File: ResourceRolesTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@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");
}
 
Example 6
Source File: ResourceRolesTest.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@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");
}