Skip to content

Getting Started

Installation

Install the Modeler module using Composer:

composer require drupal/modeler

Then enable the module:

drush en modeler

Dependency

The Modeler module requires the Modeler API module (modeler_api ^1.1). Composer will install it automatically.

Prerequisites

The Modeler module does not work on its own -- it requires a Model Owner module that defines what is being modeled. The most common model owner is ECA (Event-Condition-Action), which lets you build automated workflows in Drupal.

To get started with ECA and the Modeler:

composer require drupal/eca
drush en eca modeler

Opening the modeler

Once a model owner is installed, you can access the modeler through that module's interface. For example, with ECA:

  1. Navigate to Administration > Configuration > Workflow > ECA (or /admin/config/workflow/eca).
  2. Click Add ECA model to create a new workflow, or click an existing model to edit it.
  3. The modeler opens.

The modeler opening for the first time with an empty canvas

First workflow

Here is how to create a simple workflow:

1. Add an event

Click the + Event button in the toolbar. Select the event type -- for example, "Entity insert" to trigger the workflow when content is created.

Adding an event node to the canvas

2. Configure the event

When you select the event node, the Property Panel opens on the right. Fill in the configuration form -- for example, choose which entity type should trigger the event.

3. Add an action

Hover over the event node and click the + (quick-add) button that appears. Select an action from the popup -- for example, "Send email". The action node is placed automatically and connected to the event with an edge.

4. Add a condition (optional)

Hover over the edge between the event and the action. Click the + button that appears to add a condition. This lets you control when the action fires -- for example, "Entity is new".

5. Configure and save

Click each node to configure it in the Property Panel. When you are done, click Save in the toolbar (or use the close button to save and return to the model list).

Next steps