[jboss-user] [JBoss jBPM] - delegation with maps problem

simonbaker do-not-reply at jboss.com
Mon Oct 13 21:24:30 EDT 2008


I am successful using ArrayList as a delegation parameter in an Assignment.  I tried a HashMap, but so far it is not assigned, always null. 

I'm using jbpm-jpdl-3.2.GA version, are there any known problems with Maps?

  My successful ArrayList is processusercodingfields in the code below.  The unsuccessful HashMap is processcodingfieldvalues.

     <task name="Officer - Add Record Holds" blocking="true">
  |          <assignment class="com.rco.bpm.assignment.GeneralTaskAssignment">
  |             <currentStep>Officer - Add Record Holds</currentStep>
  |             <roles>Record Officer</roles>
  |             <processusercodingfields>
  |             	<element>UserComment</element>
  |             	<element>Promise Date</element>
  |             	<element>Due Date</element>
  |             </processusercodingfields>
  |             <processcodingfieldvalues>
  |             	<entry><key>RMS Stat Description</key><value>Number Destroyed</value></entry>
  |             </processcodingfieldvalues>
  |          </assignment>
  |       </task>
  | 


  | public class GeneralTaskAssignment implements AssignmentHandler 
  | {
  | 	private static final long serialVersionUID = 1L;
  | 	private static final Log log = LogFactory.getLog(GeneralTaskAssignment.class);
  | 
  | 	private String roles = null;
  | 	private String currentStep = null;
  | 	private boolean bIncludeRolesWithBlankRole = false;
  | 	private boolean bIncludeRolesWithBlankOrg = false;
  | 	private boolean bIncludeRolesWithBlankSubOrg = false;
  | 	private boolean bIgnoreRole = false;
  | 	private boolean bIgnoreOrgNum = false;
  | 	private boolean bIgnoreSubOrgNum = false;
  | 	private String orgNumsOverride = null;
  | 	private String subOrgNumsOverride = null;
  | 	private String actorcodingfieldname = null;
  | 	private String statdescription = null;
  | 	private ArrayList processusercodingfields = null;
  | 	private HashMap processcodingfieldvalues = null;
  | 
  | 	public void assign(Assignable assignable, ExecutionContext executionContext)
  | 		throws Exception
  | 	{
  | 		CAssignment.IAssignablePlus assignableplus = new CAssignment.AssignableTask(
  | 			assignable);
  | 		CAssignment.assign(
  | 			assignableplus,
  | 			executionContext,
  | 			this.currentStep,
  | 			processusercodingfields,
  | 			processcodingfieldvalues,
  |  			actorcodingfieldname,
  | 			this.roles,
  | 			this.orgNumsOverride,
  | 			this.subOrgNumsOverride,
  | 			false,
  | 			this.bIncludeRolesWithBlankRole,
  | 			this.bIncludeRolesWithBlankOrg,
  | 			this.bIncludeRolesWithBlankSubOrg,
  | 			this.bIgnoreRole,
  | 			this.bIgnoreOrgNum,
  | 			this.bIgnoreSubOrgNum);
  | 	}
  | 
  | }
  | 


  | public abstract interface Assignable extends Serializable {
  | 
  |   // Methods
  |   void setActorId(String string);
  |   void setPooledActors(String[] stringArray);
  | }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181967#4181967

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181967



More information about the jboss-user mailing list