![]() I thought a good exercise would be to write some workflows I normally write code for. Instead, I thought it would be best to show a few simple examples of the ECA module in action. It's difficult to explain how to use this interface in detail without writing pages of meticulous (and boring!) text. Meaning, if you put together a workflow you can detail every condition and step through that workflow so it's much easier to see what is going on when you next edit it. What's great about this interface is everything can be annotated and labelled. ![]() ECA also knows about how Drupal works so if you react to an entity event then ECA will transmit the entity forwards through the workflow. The panel in the right hand side is a dynamic inspector that will update depending on what you have selected. Gateways (the diamonds) can be used to chain multiple conditions together, or trigger multiple actions. Most of the time you'll only need to deal with events (the circles), actions (the rounded rectangles) and conditions (the arrows that connect them). Although it does get a bit of time to get used to using it, there isn't really a lot going on. I'll admit when I first saw this screen it was pretty intimidating. Head over to the ECA admin page at /admin/config/workflow/eca and you should see an (empty) list of the available models. Once you have decided what you want to do with ECA you can install the necessary sub-module and then start building your workflows. The usage of ECA means also talking about using BPMN.IO since that's the simplest way to interface with creating and viewing workflows. This might seem like a lot of different modules, but this separation of concerns means that you don't need to install modules you would never use and prevents bloating the site. For example, if you want to work with pages of content then you would enable ECA Content. What module you enable depends on what it is that you want to do. ECA Workflow - Content entity workflow actions.ECA Views - Execute and export Views query results within ECA.ECA User - User events, conditions and actions.ECA Queue - Events, conditions and actions for queued operations.ECA Misc - Miscellaneous events and conditions from Drupal core and the kernel.ECA Log - Events and actions for Drupal log messages.ECA Form - Form API events, conditions and actions.ECA Content - Content entity events, conditions and actions.ECA Cache - Actions to read, write or invalidate cache items.ECA Base - Base events, conditions and actions.ECA Access - Events and actions to control access on entities and fields.There are a few modules packaged with ECA and these can be enabled when you want to work with different parts of Drupal. Let's take a look at the modules available within ECA ECA sub-modules There are quite a few sub-modules packaged with ECA that allow you to integrate with different parts of Drupal. Out of the box the ECA module doesn't have a massive amount of integrations. ![]() With those modules installed you can now visit the ECA admin page at /admin/config/workflow/eca and start building your workflows. We can now install the ECA and BPMN.IO modules. It is a separate requirement, but can also be installed through composer. There are a couple of interfaces available, but we will use the BPMN.IO module.īPMN.IO is a JavaScript framework that allows flow diagrams to be used and therefore gives the ECA module a well rounded interface. In order to configure the ECA module we need an interface. The ECA module on its own just handles the actual events, conditions and actions. To install ECA we first need to add it to our project, which can be done using composer. In this article, I will talk about installing the ECA module and go onto how to use it and some examples of it in use. It is well written, well thought out, and has a considerable number of unit tests that backup what the code is doing. The module has under 200 installs right now, and considering the quality of the module really isn't representative. Using this module you can put together some amazing workflows without writing a single line of code. The module works by listening for events, which it runs through one or more conditions, before running one or more actions. Since the stable release of this module a few weeks ago I have been looking into it and see what makes it work. The Event Condition Action (or ECA) module is a set of Drupal modules that allows site builders to create custom workflows without having to write any code. ![]()
0 Comments
Leave a Reply. |