Start moving code from the ECA module
Problem/Motivation
The goal of this module is to move the integration code out of the ECA module so that other modules can use it to integrate with BPMN.iO and other modelers, without depending on ECA.
This issue, along with related issues for the ECA and BPMN.iO modules, should be a big step towards a first alpha release of this module.
Proposed resolution
For this issue, start moving code from ECA to this module: probably at least the following classes
Drupal\eca\Annotation\EcaModeller- The
Drupal\eca\Plugin\ECA\Modellernamespace Drupal\eca\PluginManager\ModellerDrupal\eca\Service\ModellersDrupal\eca\Entity\Model
Testing instructions
For now, the easiest way to test #3513173: Start moving code from the ECA module, #3513175: Remove code that is added to the Modeler API module, and #3513176: Use the new Modeler API module is to set repositories in composer.json like this:
"repositories": [
{
"type": "vcs",
"url": "https://git.drupalcode.org/issue/modeler_api-3513173"
},
{
"type": "vcs",
"url": "https://git.drupalcode.org/issue/eca-3513175"
},
{
"type": "vcs",
"url": "https://git.drupalcode.org/issue/bpmn_io-3513176"
},
{
"type": "composer",
"url": "https://packages.drupal.org/8"
}
],
Then, install all three modules from their issue forks:
composer require drupal/bpmn_io dev-3513176-modeler-api
Then enable the modules:
drush en bpmn_io
Optionally, get a head start with your favorite ECA recipe:
## Import recipe
composer require drupal-eca-recipe/eca_lib_0029
# Enable recipe with Drush (requires version 13 or later):
drush recipe ../recipes/eca_lib_0029
# Enable recipe without Drush:
cd web && php core/scripts/drupal recipe ../recipes/eca_lib_0029
# Rebuilding caches is optional, sometimes required:
drush cr
I think the new Drupal\modeler_api\Entity\Model entities get created if you edit a model (and it saves automatically). If you want to convert existing Drupal\eca\Entity\Model entities all at once, the update function will do it:
drush updatedb
But if you apply a recipe that creates ECA entities, then you may have to run the update function directly. For example, using drush php,
require 'modules/contrib/eca/eca.install';
eca_update_8012();
Remaining tasks
User interface changes
API changes
Various classes are moving from the Drupal\eca namespace to the Drupal\modeler_api namespace. This will require new major versions of the ECA and BPMN.iO modules.