[jboss-user] [JBoss jBPM] - Re: Problem executing two timers simultaneously from fork

harini mj do-not-reply at jboss.com
Fri May 15 08:52:10 EDT 2009


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

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

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



More information about the jboss-user mailing list