[jboss-user] [JBoss jBPM] - Re: Concurrent Processing using Fork in synchronous manner
drashmi30
do-not-reply at jboss.com
Fri Jul 6 11:52:45 EDT 2007
I have already seen this JIRA but this JobExecutorThread comes into picture when you mark the node execution to be in asynchronous mode. But my case is not like that.
Consider the below processdefinition:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <process-definition
| xmlns="" name="mainprocsimple1_JBPM">
| <join name="join1">
| <transition name="" to="end1"></transition>
| </join>
| <start-state name="start">
| <transition name="" to="fork1"></transition>
| </start-state>
| <fork name="fork1">
| <transition name="tr1" to="state1"></transition>
| <transition name="2" to="state2"></transition>
| </fork>
| <node name="mainnode_sleep120">
| <action class="org.jbpm.tutorial.action.Sleep_120_ActionHandler">
| </action>
|
| <transition name="" to="join1"></transition>
| </node>
| <node name="mainnode_sleep80">
| <action class="org.jbpm.tutorial.action.Sleep_80_ActionHandler">
| </action>
|
| <transition name="" to="join1"></transition>
| </node>
| <state name="state1">
| <transition name="tim" to="mainnode_sleep80"></transition>
| </state>
| <end-state name="end1"></end-state>
| <state name="state2">
| <transition name="" to="mainnode_sleep120"></transition>
| </state>
| </process-definition>
|
In the above example, when i signal state1 and state2 simultaneously, then the execution flows to mainnode_sleep80 and mainnode_sleep120. But since in mainnode_sleep80, I call an ActionHandler which simply makes a sleep for 80 secs and in the other node mainnode_sleep120, the ActionHandler makes a sleep of 120 secs. The path of execution for mainnode_sleep80 completes successfully but when mainnode_sleep120 completes after making a sleep for 120 secs, we get an error as StaleObjectStateException saying that the row was already updated or deleted in another transaction.
The above scenario is only an example of our process and not the real case. We are just trying to find out why we are getting this error and whether there is any solution to avoid such an error.
I make myself very clear that I am not looking for async operation. I want the normal sync operation.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4061372#4061372
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4061372
More information about the jboss-user
mailing list