Possibility to merge ECA-Models to one

Created on 3 October 2022, over 2 years ago
Updated 13 July 2023, over 1 year ago

Problem/Motivation

This is a kind of meta-issue:
After having build several models I recognized that in some cases I would have more visueal transparency about related workflow topics if I had build some of the separate models into one model.

So I came to the idea of asking about a feature to choose 2 (or more) separate ECA-Models and let it merge to one.
I imagine that the chosen model workflows stand next to each other with their own start event etc. in one model as target.

Would this be outside of scope or an interesting feature request?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Feature request
Status

Active

Version

1.2

Component

Miscellaneous

Created by

🇩🇪Germany marco.b

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇩🇪Germany jurgenhaas Gottmadingen
  • 🇩🇪Germany jurgenhaas Gottmadingen
  • 🇩🇪Germany jurgenhaas Gottmadingen
  • Status changed to Postponed: needs info about 1 month ago
  • 🇩🇪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 msg

    Model 2:
    E: edit article
    C: field_image value is empty
    A: display another msg

    If 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.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Missing feedback.

Production build 0.71.5 2024