When starting a process via the flowable API, a VARIABLE_CREATED event is sent for each modeled data object and a VARIABLE_UPDATED event is sent for each variable that the client provides on the start call (that is also modeled). On the other hand a process started via a CallActivity merges all the modeled data objects and the variables that are either inherited or defined as input parameters to the subprocess into a single map prior to setting them on the subprocess instance execution. This results in only VARIABLE_CREATED events occurring. Does it make sense to update the CallActivity behavior such that it generates the same events to starting a process from the API?
I’d say yes, it would make sense to make that behavior consistent.
I’m actually not sure if the VARIABLE_UPDATED on process instance start is good, but it’s there and we can’t change it now without breaking people’s code. So let’s indeed make it consistent.
I created the following PR (28) for this change. Thanks!
Awesome! Wiill have a look at it today/tommorow morning.