Hi!
I saw in drools rules that I can use:
processInstance : WorkflowProcessInstance()
I have a few questions about it.
Note that you are however responsible yourself to insert the process instance into the session and, possibly, to update it, for example, using Java code or an on-entry or on-exit or explicit action in your process.
1. How can I use it in the code?
2. As well, there could be more than one process instance running - for example if there a few requests for the process - so how do I make sure that it's the one that is running?
3. It says in the documentation
Actions have access to globals and the variables that are defined for the process and the predefined variable context
. This variable is of type org.drools.runtime.process.ProcessContext
and can be used for several tasks
How can I retrieve this context variable?