return task;
}
protected Delegation readAssignmentDelegation(Element assignmentElement) {
Delegation assignmentDelegation = new Delegation();
String expression = assignmentElement.attributeValue("expression");
String actorId = assignmentElement.attributeValue("actor-id");
String pooledActors = assignmentElement.attributeValue("pooled-actors");
if (expression!=null){
assignmentDelegation.setProcessDefinition(processDefinition);
assignmentDelegation.setClassName("org.jbpm.identity.assignment.ExpressionAssignmentHandler");
assignmentDelegation.setConfiguration("<expression>"+expression+"</expression>");
} else {
if ( (actorId!=null)
|| (pooledActors!=null)
) {
assignmentDelegation.setProcessDefinition(processDefinition);
assignmentDelegation.setClassName("org.jbpm.taskmgmt.assignment.ActorAssignmentHandler");
String configuration = "";
if (actorId!=null) {
configuration += "<actorId>"+actorId+"</actorId>";
}
if (pooledActors!=null) {
configuration += "<pooledActors>"+pooledActors+"</pooledActors>";
}
assignmentDelegation.setConfiguration(configuration);
} else {
assignmentDelegation.read(assignmentElement, this);
}
}
return assignmentDelegation;
}