-
1. Re: Start an Process From a State
jsvitak Apr 15, 2013 4:14 AM (in response to 7ab3rn4t3)Hello Fabio,
I am not sure if I have correctly understood your scenario. But you can implement own service tasks - work item definitions and handlers for them, which are java classes. Refer to Domain-specific processes chapter in the documentation. In these service tasks you can implement own java code, which is able to query database for information or to persist some information to the database.
Usually you start business process, it runs several nodes and stops for example at the first human task. The process execution ends here and engine returns from startProcess method. You can restore the engine execution when completing a task. User completes his task and immediately in the same time the process execution is restored in order to execute next nodes in process flow. I can recommend the book jBPM 5 Developer Guide, where you can find more information how to develop these scenarios.
Params which you supply when starting the process are mapped to process variables, these can be accessed anywhere in the process directly or using kcontext, refer to 6.8.1 Data section of the documentation for more details.
I do not know what you mean by 'a specific state'. Usually the execution of suspended process is restored after human task, or asynchronous service task. If you want to start another flow in the process during its execution, use signals and catch events.