[jboss-user] [JBoss jBPM] - Re: next task/node name in processInstance
cheets
do-not-reply at jboss.com
Mon Aug 27 01:58:12 EDT 2007
sorry for not being more clear, but my scenario is like this.. A user performs some action to finish a task on one webpage. In the java side, I capture what action the user performed, modify the task accordingly (set variables, etc), end it and close the context.
now, to decide which page to show next, i need to know what the next task is going to be. I retrieve the same processInstance from the tables, and find out the current unfinished tasks, but it gives me the same previous task as unfinished when i use jbpmtemplate.findProcessInstance(processId), although the database has been updated with the new task status.
I resolved this problem by using jbpmcontext.loadProcessInstance(processId), which gives me an updated data set from the database.
(why did this happen, is this expected behavior?)
I realize now that getting the next task is not possible as such, because a task may end and then fork into multiple tasks, or go into wait for join, in both cases, something like task.nextTask is not possible to retrieve. am i right?
thanks for all the replies!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4078212#4078212
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4078212
More information about the jboss-user
mailing list