Official Plugins (Kuzzle v2.x)
Workflows v0.x
2

This plugin is part of the Kuzzle Enterprise Plan. If you are interested, please contact us.

Workflow Plugin Overview #

This plugin allows you to define Workflows for data processing.

These Workflows are composed of conditions to be fulfilled, and actions to be performed.

Workflow definitions are dynamic, and their behavior can be modified at runtime, without restarting the application.

Workflow #

Workflows are defined in documents stored in a database. Each document contains the configuration of a Workflow.

All Workflows are stored in a workflows collection in a Kuzzle index.

Workflows are composed of two sub parts:

  • conditions: set of constraints to be met in order to execute the actions
  • actions: set of actions to execute in a defined order

workflow-schema

Some examples of what you can achieve with Workflows:

  • Enrich documents with geofencing, states-machine, external API, ...
  • Execute custom actions like sending email, http callback, ...

Predicate & Task #

Predicates and Tasks are part of the Workflow execution cycle.

A Predicate is a dynamic condition for the execution of a Workflow while a Task is an action to be performed once all conditions of the Workflow have been met.

Concretely, they are classes containing code to be executed in order to allow a high level of customization of Workflows.

These classes are registered by the plugin and then they can be used in Workflows.

Rule #

Rules are also stored as documents in the database but in a separate rules collection.

A Rule is one of the actions that can be performed by Workflow once its conditions have been fulfilled.

A Rule is also composed of conditions and actions although these are more restricted than for Workflows.

Rules allow to define more complex actions than what is achievable by Tasks, such as geofencing-based document enrichment or state-machines.

rule-schema

Engine Controller & Multi Tenancy #

A Workflow engine works on a particular index by subscribing to changes in the workflows and rules collections.

It is possible to create, update or delete Workflow engines using the EngineController.

This allows to have Workflow engines isolated by index and thus to work in a multi-tenant environment.