I’ve been experimenting with the signal end- and start event and I am wondering if it’s possible to ‘create’ a custom variable as my process ends. A more detailed explanation in the scenario below:
My process starts with variables A, B and C. As my process comes to completion, a signal end event will trigger a different proces (or more than one). I’d like the new processes that catch this signal to know this signal came from this specific process definition by adding a variable D. How can I create a variable D with a random value so that my new processes also have this variable D with the random value in their local variables?
Any help is appreciated.
I looked at this before and I have again just now but this page only works with variables already in the model. Either mutating variable names or making an expression with existing variables. They all refer to a source of some sort which refers to the variables in scope. I’m looking to create a new one. Or am I wrong here?
the sourceExpression should be the way to go. You can, for example, add a bean with a method to return a new value. It has to confirm to the expression language. Look at this example how to invoke a method: https://docs.camunda.org/manual/7.10/user-guide/process-engine/expression-language/#inputoutput-parameters
Hope this helps, Ingo
I managed to solve my problem thank you.