This content has been marked as final.
Show 2 replies
-
1. Re: Problem executing two timers simultaneously from fork
kukeltje May 15, 2009 8:44 AM (in response to harinimj)The issue is timers are not executed simultaneously by the scheduler i have jobexecutor servlet entry in web.xml i am using tomcat server.
That's because they are two non-related timers. And before you ask the next question, you cannot have them be executed at the same time since that is not supported in any way.
That only one is executed is strange. Do you have a unittest with everything embedded (processdefinition and actionhandlers) that demonstrates the problem? -
2. Re: Problem executing two timers simultaneously from fork
harinimj May 15, 2009 8:52 AM (in response to harinimj)<fork name="fork1"> <transition to="Fo Officer" name="ForFoApproval"> </transition> <transition to="Mo Officer" name="ForMoApproval"> </transition> </fork> <task-node name="Fo Officer"> <task name="FOApproval"> <assignment actor-id="FOOfficer"> </assignment> <timer duedate="2 minutes" name="FoOfficerTimer"> <action name="RemindF" class="com.jpmorgan.sai.jbpmactionhandlers.RemindF"> </action> </timer> </task> <task-node name="Mo Officer"> <task name="MOApproval"> <assignment actor-id="MOOfficer"></assignment> </task> <timer name="MoTimer" duedate="2 minutes"> <action name="RemindMoOfficer" class="com.jpmorgan.sai.jbpmactionhandlers.RemindMoOfficer"> </action> </timer> The code within action handler is MOOFFFICER_APPROVAL_LOOP_COUNTER variable value is set as 0 initially when request is submitted. try{ String loopCount = (String)context.getVariable("MOOFFFICER_APPROVAL_LOOP_COUNTER"); if("3".equals(loopCount)) { context.leaveNode("MoNoResponse"); } else { context.setVariable("MOOFFFICER_APPROVAL_LOOP_COUNTER", (new Integer((new Integer(loopCount)).intValue() + 1)).toString()); context.leaveNode("MoTimeout"); } }