How does the function to copy elements between models work exactly? I’ve played around a bit and when I copy a task in one model and paste it in another model, the ID remains the same, but when I change the details on the right, these are only updated in the current model and not available in the other.
My steps:
Create model 1: Start → Task 1 → Task 2 → End
Create model 2 with the default start event only
Copy Task 2 from model 1
Paste Task 2 in model 2
In model 2, link the start event to task 2 and add end event: Start → Task 2 → End
Compare Task IDs in both models → they’re the same
Add an element description to Task 2 in model 2
Check the element description for Task 2 in model 1 → it’s empty
Am I copying the same element and now have two references to one object in the DB or do I have two separate objects with the same ID (not quite sure how that would work)? If it’s the first one, how come the description isn’t updating - if it’s the second option, how can two objects have the same ID?
But maybe it’s something else completely - please enlighten me! Perhaps the IDs only have to be unique within a model?
Edit: I just tested to copy and paste a task within the same model and then the description stays and the task also gets a new ID.
I had another question, but managed to get to the answer myself. Perhaps the result of my little test can help other noobs down the road if they face the same dilemma: It’s not possible to paste an object with an ID that exists in the target model. Or rather, it’s possible to paste, but Camunda assigns a new ID so there are no conflicting IDs.
But in the extension this means that if you have the same task in multiple processes, it’s not possible to make changes once and have them propagate automatically, right? I’d have to go through all processes and change the task everywhere, or is there a clever way to do this (assuming you can’t put it in a common subprocess)?
Correct. The only true way of avoiding repetitive work would be through using a call activity, but that will influence your process design quite a bit.
I’m afraid that’s it. Something like a “format brush” in Excel/Google Sheets that copies all properties from one element to another would be a neat feature.