Actually I looked further and found there are no calls to the getter or setter of variables on ProcessDefinitionEntityImpl in the engine. I thought that if the variables were defined in the process definition xml then they would at least be linked to the process definition entity but now I'm thinking not. The most relevant-looking tests actually just go through the runtimeService to get variables from the running instance after starting (Activiti/VariableScopeTest.java at develop · Activiti/Activiti · GitHub with XML at Activiti/activiti-engine/src/test/resources/org/activiti/engine/test/db at develop · Activiti/Activi... ). My impression is that this is a gap.
I've also done a bit of code research and would like to make sure I havent missed anything.
Am I correct in that there is currently no way to get / lookup Process Variables of a ProcessDefinition? (Weither required or not is not important at this time).
Is so, I guess I'll have to find a way to make a database for holding these in parallel to the deployed processDefinitions.
Thanks for your input.
If your goal is only to define a list of variables used in the process in the process, I think that Data objects is optimal.
And, you can get that list by the following code.
Ah thanks, tried around a bit with those, hadnt had the idea to get them via the bpmn model.
Yeah getting that far is atleast a good first step for my usecase, I'll be able to build up on top of that.
Thanks alot for your help.
Might be a stupid Question, but: Am I correct in that the DataObjects can only be defined programmatically or in the xml file ? and not in the Activiti Editor?