How to know the value of a variable from another pool ?
Is it possible to know the value of a variable that is in a Pool A from a task in a Pool B ?
I have a variable in my process A that changes value often. And my process B needs sometimes to know the value of this variable.
Maybe I can do that with the process Api.
Thanks in advance for your help.
You can know the value of your variable at any moment , you have juste to use "Send message event" (In ur process where your variable gets her different values) and catch it in the other process with "Receive message event"
I would go for the API, since you can invoke it "on demand". http://documentation.bonitasoft.com/javadoc/api/6.3/org/bonitasoft/engin...
You need some kind of correlation key. Do you have multiple process A and B instances running at the same time? Are process A and B started independently or one after another?
if Process A is unique, the easiest might be to: - retrieve the processDefinitionID:
- final SearchOptionsBuilder builder = new SearchOptionsBuilder(0, 5);
- builder.filter(ProcessDeploymentInfoSearchDescriptor.NAME, "My_ProcessA");
- final SearchResult<ProcessDeploymentInfo> searchRes = getProcessAPI().searchProcessDeploymentInfosStartedBy(userId, builder.done());
retrieve Process A unique instance based on its processDefinitionId: http://documentation.bonitasoft.com/list-open-instances-process
from the process instance you can retrieve any variable value