[
http://jira.jboss.com/jira/browse/JBPM-429?page=comments#action_12371186 ]
Holger Szillat commented on JBPM-429:
-------------------------------------
I have made the following changes to my source-code of the jBPM v.3.1.4:
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" );
String assignmentClass = assignmentElement.attributeValue( "class" );
if ( expression != null ) {
assignmentDelegation.setProcessDefinition( processDefinition );
if ( assignmentClass != null )
assignmentDelegation.setClassName( assignmentClass );
else
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;
}
Note, that I simply read the class-element (which is allowed according to the XML-grammar)
and only set the "default" handler if the element was not specified.
Maybe it helps...
Support for external security systems
-------------------------------------
Key: JBPM-429
URL:
http://jira.jboss.com/jira/browse/JBPM-429
Project: JBoss jBPM
Issue Type: Bug
Components: Core Engine
Affects Versions: jBPM 3.0
Environment: NA
Reporter: Ashwini Kumar
Assigned To: Tom Baeyens
Original Estimate: 2 minutes
Remaining Estimate: 2 minutes
Please change the readAssignmentDelegation method in org.jbpm.jpdl.xml.JpdlXmlReader
to be the following.
The original method would ignore the class attribute assigned to swimlane assignments and
default it to org.jbpm.identity.assignment.ExpressionAssignmentHandler
Thanks,
private Delegation readAssignmentDelegation(Element assignmentElement) {
Delegation assignmentDelegation = new Delegation();
String expression = assignmentElement.attributeValue("expression");
if (expression!=null) {
assignmentDelegation.setProcessDefinition(processDefinition);
String assignmentHandler = assignmentElement.attributeValue("class");
if (assignmentHandler != null){
assignmentDelegation.setClassName(assignmentHandler);
}
else{
assignmentDelegation.setClassName("org.jbpm.identity.assignment.ExpressionAssignmentHandler");
}
assignmentDelegation.setConfiguration("<expression>"+expression+"</expression>");
} else {
assignmentDelegation.read(assignmentElement, this);
}
return assignmentDelegation;
}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira