I would like to use Process Flow Variables to be set to a current condition in the model say: the number of resources acquired from various Acquire Resource activities. I would use this to limit the number of tokens entering a zone. The issue I am seeing is that there is no way to update these variables except manually. I would think that I could define a variable and set it wherever I wanted and am confused by the literature and explanation of this. I don't want to use a token label in this case as a variable would be much easier should I have access to set it or link it to nodes/activities. It would dynamically update and reflect the current condition for which my expression to be evaluated against anywhere in the model.
So the question is, Can I update the Process Flow Variable in the model using Custom Code activity? If so how?