Workflows

Workflows are powerful tools that allow you to automate processes and procedures in the DataEngine. In this post, we will delve into the detailed use of workflows to ensure that you can make the best use of this feature.

Basic Settings

Before we go deep, let’s take a look at the basic settings for workflows. We will consider aspects such as the workflow name, the associated workflow module, and trigger options. Workflows can be activated in various scenarios, including “Always,” “Only on Save,” and “Only on Scheduler.” Choose the option that best suits your requirements. You can also specify whether the workflow should run repeatedly and whether it should be triggered for import operations, all records, only modified records, or only new records.

In addition, the “Workflow Order” field provides the option to determine the sequence of workflows. Smaller numbers are executed first, followed by higher numbers. This is particularly crucial when workflows build upon each other, and the execution order is significant. Furthermore, you can specify whether the “Date Modified” field of the record should be reset. This option should generally remain enabled and only affects workflows processed by the scheduler.

Workflow Scheduler

A workflow can be triggered by the scheduler, typically running every minute. There is also the option to create a custom scheduler using the “Process AOW Workflow (Custom In Scheduler)” feature. This custom scheduler can then be selected during the configuration of the workflow under “Run.” Workflows utilizing a custom scheduler will only be executed if this specific scheduler is active; otherwise, no triggering will occur. A practical example of this would be a scheduler performing a calculation for all records once a week. In such cases, it is advisable to disable the “Update Date Modified” option.

You can find more information about custom schedulers here: Scheduler

Workflow Execution Conditions

Workflow execution is controlled by conditions. You can create conditions based on fields, values, and operations. Various logical operators are available to combine conditions, allowing you to specify precisely when the workflow should be triggered. You have the option to link multiple conditions to refine your workflow logic.

Important: Conditions are always linked with AND. An OR link cannot be mapped within a workflow.

For JSON fields, there are now two new conditions for workflows (and reports)—Is empty and Is not empty—in addition to Is valid and Is not valid. This allows you to check whether the JSON contains values or is empty:

DataEngine Workflow Condition JSON field validation
DataEngine Workflow Condition JSON field validation

Whether a JSON is valid or invalid can have a major impact on its further processing. JSON fields are often processed automatically via workflows. Only if the JSON is valid will the subsequent processes function optimally.

Using a condition, records with invalid JSONs can be explicitly targeted within a workflow action. For this purpose, the JSON field type includes the operators Is Valid and Is Not Valid in the conditions.
These operators can be used to verify whether the specified field contains a valid JSON string. This can be useful for checking, for example, whether a valid JSON has been written to the DataEngine via an API. This helps prevent subsequent actions from failing.

For example, this can be implemented using two workflows: one workflow checks whether the JSON is valid and then executes the desired actions. The second workflow checks for invalid JSON and, for example, sends a notification or displays this in a report.

Relationship Matching Logic

An important aspect of workflow creation is the Relationship Matching Logic. If a condition includes a field from a 1:n relationship, you can specify whether the condition should apply to “at least one” or “all” records in that relationship. This option allows fine-tuned control of workflow logic based on the relationships between records.

Handling Empty Date Entries

In workflows, you may need to process date entries. It’s important to note that empty date entries should always be compared to NULL. This practice ensures the correct execution of your workflow logic.

Possibilities for Comparison

The following types are possible as comparisons in the conditions:

  • Value
    Here you can check against a specific value that should be entered in the Value field.
  • Field
    With a field, you select a specific field and check the conditions against the field
  • Any change
    With any change, the system checks whether the field has been changed since the last backup. Please note that the last backup is decisive. It is therefore not advisable to use the condition in a workflow if other workflows have already changed the data record. In this case, no change would be recognised.

Workflow Actions

Now that we’ve covered the basics, let’s take a look at the various actions that can be performed in workflows. The DataEngine offers a wide range of actions, including:

These diverse actions allow you to implement a wide range of automations and integrations into your workflows.

Marini Systems GmbH | Website | Privacy Statement | Legal