public class AssigneeOverwriteFromVariable implements TaskListener {
@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