- Status changed to Postponed: needs info
about 1 month ago 5:31pm 28 January 2025 - 🇩🇪Germany jurgenhaas Gottmadingen
Here is some good news: the bpmn_io modeller can now edit any model, even those that comes without the XML data in the
eca.model.*
config entity.With that in mind, it's now at least possible to merge 2
eca.eca.*.yml
files into one, import that into Drupal and then open that with bpmn_io for editing. This will automatically convert that model upstream so to speak, i.e. it creates the required XML data for its canvas on the fly.Please give that a try. If this does the job for you, we could potentially see if we can provide a merge function in the UI.
- 🇩🇪Germany marco.b
Thanks for the news.
Did I understand correctly:
As a test, I can try copying the contents of 1 eca.eca.*.yml file and adding it to another one to test whether it can be opened with the bpmn_io modeller in ECA? - 🇩🇪Germany jurgenhaas Gottmadingen
Yes, but not just concatenating the 2 files. There is a list of events, a list of conditions and a list of actions. You have to being them together so that after merging there is still just 1 list for each.
- 🇩🇪Germany marco.b
> You have to being them together so that after merging there is still just 1 list for each.
Ok, but when I have 2 separate events with relating conditions and actions, how can this work?
For example I want to merge 2 models to one model - all regarding article nodes
Model 1:
E: insert article
C: field_tags value is empty
A: display msgModel 2:
E: edit article
C: field_image value is empty
A: display another msgIf I would merge this to one list all events would trigger all actions at all conditions, isn't it? Or have I misunderstood something?
- 🇩🇪Germany jurgenhaas Gottmadingen
No, of you read the yaml you can see that the elements are chained by their ids.
- 🇩🇪Germany marco.b
OK thx. Attached is the merged model.
My test failed with error 'Uploaded archive is not consistent.' at /admin/config/workflow/eca/import
- 🇩🇪Germany jurgenhaas Gottmadingen
You should only import the eca.eca.*.yml file, all the rest is of course not consistent.
- 🇩🇪Germany marco.b
> You should only import the eca.eca.*.yml file
I tried that before.
Upload 'eca.eca.process_kko3nmq.yml.tar.gz' contains only 'eca.eca.process_kko3nmq.yml'
--> brings error message: Uploaded archive is not consistent.Upload 'eca.eca.process_kko3nmq.yml' directly
--> brings error message: Unsupported file extension. - 🇩🇪Germany jurgenhaas Gottmadingen
This is not about the import function in ECA. Please use the regular config import.
- 🇩🇪Germany marco.b
Thx for feedback.
Tested upload of eca.eca_.process_kko3nmq.yml.tar.gz via /admin/config/development/configuration
Error message
The intended configuration cannot be imported because it comes from a different installation than this one. Only cloned instances of the same website can be synchronized.
I see I have to generate the file through config export and not through the ECA model export function. I will test again and report.
- 🇩🇪Germany jurgenhaas Gottmadingen
Where is that tar.gz extension coming from? A config entity is just the eca.eca_.process_kko3nmq.yml file and you can easily import that. If it contains a uuid or a _core key, then remove them and that config entity will be site agnostic.