I want to declare a variable that share between all process instance of same process definition. How can I define this process definition scope variable?
I am afraid this seems to be impossible as the largest variable scope is the process instance itself. You can however pass Variables from/to Call Activities. But I don’t think this is what you are looking for. Also note that variables passed from/to Call Activities are not shared but in fact copied.
You can read up on variables and their scopes in the documentation.
https://docs.camunda.org/manual/7.10/user-guide/process-engine/variables/
More Information about the Call Activity can be found in the docs as well.
https://docs.camunda.org/manual/7.9/reference/bpmn20/subprocesses/call-activity/
In case you are interested in digging a bit deeper into how the engine’s internal representation of process instancen and the different scopes are, here is an article that covers that topic.
I hope this helped. Let me know if anything is unclear.
Cheers,
Miklas
you have to implement the storage outside of the engine in your business environment.
Depending on your technology (Spring or JEE or…) it should be easy as the frameworks offers a lot for simple implementations.
Hope this helps, Ingo