Problem/Motivation
Not sure if this is an ECA issue or a BPMN.iO issue:
Cloning an ECA model does not alter the event, condition, and action IDs within the cloned model – only the Process ID for the entire model. This often presents no problems. But if you have complex models that perform similar functions on the same entities (and e.g. you are using the same custom token names from one model to the next for ease of syntax), the models can conflict in mysterious ways.
Steps to reproduce
I discovered this when I created a model that employed the Views: Execute Query action. I cloned that model and changed the source View for that action, as it was performing functions on a different field within the same entity type. In the Views UI, the preview for the View associated with the cloned ECA model displayed the expected results, but the output from the cloned ECA model (based on and looping through the results of that View) was producing strange and different results that included data from the original ECA model and its View (which was triggered prior to the cloned view in the ECA dashboard model order).
I then changed the IDs for all the events, conditions, and actions for the cloned model. When I then subsequently triggered both models, everything worked as expected.
Proposed resolution
Generate new ID hex codes for all elements within an ECA/BPMN.iO model during the cloning process, not just the model ID.
Thanks!
Remaining tasks
User interface changes
API changes
Data model changes