[jboss-user] [jBPM Users] - Re: [jBPM 4.2] ProcessInstance
edeleflie
do-not-reply at jboss.com
Mon Nov 23 20:30:53 EST 2009
mike,
When creating the ProcessInstance, you will get a processInstanceId back. Save it.
The processInstanceId is the key into the jBPM API world.
If you want to find out all the current tasks (often only 1) for your process instance then you do this:
taskService.createTaskQuery().processInstanceId(youSavedId).list()
Then if you want to bump the Task on to the next one ... do something like this:
outcomes = taskService.getOutcomes(tasks[0].getId()) // gets outcomes just for the first currently running task.
then do:
taskService.completeTask( tasks[0].getId(), yourDesiredOutcome)
Etienne
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4267183#4267183
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4267183
More information about the jboss-user
mailing list