-
1. Re: [jBPM 4.2] ProcessInstance
kukeltje Nov 23, 2009 2:56 PM (in response to mike_burton)Best is to get it from the api (including the query api) and not use the database directly. What is the issue you have?
-
2. Re: [jBPM 4.2] ProcessInstance
mike_burton Nov 23, 2009 3:55 PM (in response to mike_burton)I am able to successfully deploy the process definition and able to start the process instance with process definition key.
My requirement is the workflow (process instance) should move to the next step in workflow process after some user interaction. But i am not sure from which table i can get the process instance id for that process deifnition so that i can signal it. Also how to get the process instance id from table for that specific process definition.
Please clarify me
Thaks for your response -
3. Re: [jBPM 4.2] ProcessInstance
edeleflie Nov 23, 2009 8:30 PM (in response to mike_burton)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