@Override
public void onAssignment(DelegateTask delegateTask) throws Exception {
String assignee = delegateTask.getAssignee();
String processDefinitionId = delegateTask.getProcessDefinitionId();
DelegateInfo delegateInfo = delegateService.getDelegateInfo(assignee,
processDefinitionId);
if (delegateInfo == null) {
return;
}
String attorney = delegateInfo.getAttorney();
new DelegateTaskCmd(delegateTask.getId(), attorney).execute(Context
.getCommandContext());
}