[JBoss jBPM] - delegation with maps problem
by 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);
| }
|
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
15 years, 12 months
[JBoss jBPM] - Re: Action not executing in timer
by kukeltje
I don't think you will have any luck with your Jira issue. Let me explain a little more (this can be read in other articles as well, even the jBPM docs I think)
Normally the client only has 'control' for a very small amount of time. A second is a lot already. Timers that need to go off within a second are mostly useless. Remember, this is mainly workflow!!! so clashes occur rarely
If a transition is taken and after that something goes wrong, the best thing to do is to go back to the last wait-state. That is the situation where external action was needed. That external action can be repeated (e.g. task not ended, user has to do it again) This is easiest done with a transaction roll-back in the database. Committing on each node boundary or even within nodes (creation of timers) would make this impossible to do and result in a lot more complicated system.
If you want to have a STP system with (probably) persistency on nodes etc... you can have a look at the PVM and simply develop your own language and behaviour on top of that. Might also be that an 'stp' language is developed, though I'm not sure.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4181894#4181894
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4181894
15 years, 12 months