1 Reply Latest reply on Oct 13, 2008 9:38 PM by simonbaker

    delegation with maps problem

    simonbaker

      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);
      }