Java Code Examples for org.camunda.bpm.engine.delegate.DelegateTask#setAssignee()

The following examples show how to use org.camunda.bpm.engine.delegate.DelegateTask#setAssignee() . 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: AssigneeOverwriteFromVariable.java    From camunda-bpm-platform with Apache License 2.0 5 votes vote down vote up
@SuppressWarnings("unchecked")
public void notify(DelegateTask delegateTask) {
  // get mapping table from variable
  DelegateExecution execution = delegateTask.getExecution();
  Map<String, String> assigneeMappingTable = (Map<String, String>) execution.getVariable("assigneeMappingTable");
  
  // get assignee from process
  String assigneeFromProcessDefinition = delegateTask.getAssignee();
  
  // overwrite assignee if there is an entry in the mapping table
  if (assigneeMappingTable.containsKey(assigneeFromProcessDefinition)) {
    String assigneeFromMappingTable = assigneeMappingTable.get(assigneeFromProcessDefinition);
    delegateTask.setAssignee(assigneeFromMappingTable);
  }
}
 
Example 2
Source File: ReactorSpringStarterApplication.java    From camunda-bpm-reactor with Apache License 2.0 4 votes vote down vote up
@Override
public void notify(DelegateTask delegateTask) {
  delegateTask.setAssignee("foo");
}
 
Example 3
Source File: CaseTaskCreateListener.java    From camunda-bpm-reactor with Apache License 2.0 4 votes vote down vote up
@Override
public void notify(DelegateTask delegateTask) {
  delegateTask.setAssignee("me");
}
 
Example 4
Source File: ReactorSpringApplication.java    From camunda-bpm-reactor with Apache License 2.0 4 votes vote down vote up
@Override
public void notify(DelegateTask delegateTask) {
  delegateTask.setAssignee("foo");
}
 
Example 5
Source File: AssignTaskListener.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public void notify(DelegateTask delegateTask) {
  delegateTask.setAssignee("demo");
}
 
Example 6
Source File: TaskListenerEventLifecycleTest.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
@Override
public void notify(DelegateTask delegateTask) {
  delegateTask.setAssignee("demo");
  delegateTask.setOwner("john");
  delegateTask.setDueDate(new Date());
}
 
Example 7
Source File: AssigneeAssignment.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public void notify(DelegateTask delegateTask) {
  delegateTask.setAssignee("kermit");
}
 
Example 8
Source File: SetAssigneeListener.java    From camunda-bpm-platform with Apache License 2.0 4 votes vote down vote up
public void notify(DelegateTask delegateTask) {
  String assignee = (String) delegateTask.getVariable("assignee");
  delegateTask.setAssignee(assignee);
}