How to Create Event Workflow

Aim of this section

Shows how to create or edit an event workflow. 

Related sections

Event Workflows (Reference Manual)

Required permissions

Event Orchestration - edit

Prerequisites

  1. Make sure the required event types are enabled at your partition.

  2. Check out the general event configuration in PlatformManager. Especially pay attention to the MQ field: if it is empty, the setting is taken from the instance and it will most likely point to the PROD instance of RabbitMQ (which can only see events from PlatformManager PROD but not QA).

  3. For a workflow that starts on DATA_UPLOAD_FINISHED or DATA_DOWNLOAD_FINISHED, you need the Event Orchestration - edit permission on the account. With the permission only on a partition or an integration, the Source Type list does not offer PFM.

  4. For a workflow that starts on DATA_UPLOAD_FINISHED or DATA_DOWNLOAD_FINISHED, the feature flag eo-data-transfer-events must be active for your account. A user with the feature flag administrator permission activates the flag in Administration > PM Feature Flags, for all accounts or only for listed accounts. The flag is inactive by default. While the flag is inactive, you can still select these event types and save the workflow. PlatformManager sends no events, and the workflow does not start.

Creating Workflow

  1. Go to Account > Event Orchestration > Workflows. 

  2. Click Create Event Workflow.

  3. Fill in the following fields: 

    • Enter Workflow name of your choice and Description (optionally).

    • In Execution order define the priority of the workflow. The lower the number, the higher the priority. For example, if there are two workflows, first has Execution order = 1, the second = 5, the workflow with “1” will be executed first. This can be handy if there are more workflows with listeners waiting for the same event.

    • In Global Timeout define in how many minutes the event workflow should be cancelled if it was not executed.

    • In Workflow Type select one of the following:

      • Single-source – The workflow takes place within a single entity (e.g. partition).

        • Source Type: Select Partition, Integration, or PFM.
          In a Single-source workflow with Source Type PFM, the actions run on the account, for example Data Download.

        • Source Name: Select the source name. This will be displayed under the Target column in the Event Orchestration > Workflows table.

      • Multi-source – Combines events and actions of several entities: partitions, integrations and the account (PFM).
        For example, to run a calculation on a partition after a data upload finishes, select Multi-source. In the listener's Source step, add a source event with Source Type PFM, your account and DATA_UPLOAD_FINISHED. In the Action step, select Partition and the target partition as the Target Type and Target Name, then select Calculation.

  4. Define one or more listeners. You can enable or disable individual listeners by toggling the switch in the Enabled column. When multiple listeners are defined, they are executed in the specified order and triggered by the event associated with the previous action. The listener is started only when the triggering (received) event contains the same Job Status Tracker (JST) as the action triggered by the previous listener. The Wait for Previous Step option can be turned off to disable waiting for the previous step's completion. Each listener can consist of a group of events.
    To add a listener see the How To Add Listener section below.

A notification is displayed when the Wait for the event from the previous step option is automatically disabled in the background due to a step being moved or removed.

How To Add Listener

Click Add Listener and complete these steps:

1 – General step

  • Fill in Listener name of your choice and Description (optionally).

  • In Listener Timeout define in how many minutes the listener should be cancelled if it was not executed.

2 – Source step

Here you define one or more events which should trigger the listener. You can use a filter to make a more specific selection. You can also set up timeout and delayed trigger for the events.

Source Event

  1. Click Add Source Event.

  2. Select Source Type (either Partition, Integration, or PFM) and Source Name (specific partition or IM instance).
    For Source Type PFM, select your account as the Source Name.

  3. Select which Event Type should trigger an action.
    info Item-level events cannot be selected within the Event Workflow Listener. Item-level events can be set in the Mass Event Listener – see Mass Listeners.

    1. At a partition, not all events happening there are supported, so always check out this list here first. 

    2. For integrations, only custom events (intentionally emitted by custom code in a route) can be selected.

    3. For Source Type PFM (the account), select DATA_UPLOAD_FINISHED to start the workflow after a data upload run. Select DATA_DOWNLOAD_FINISHED to start the workflow after a data download run. Mass Listeners do not offer these event types. For the event payload and status values, see Supported Event Types in PlatformManager.

  4. Optionally apply a Filter to the event records. It can be a multi-expression. Use a JSONPath value in the Parameter field. The JSON can be different for each use case—see the log to find out the correct values, for example $.jobName, $.trackerType, $.status.
    Example of the filter expression:

    filters01 .png

    For DATA_UPLOAD_FINISHED or DATA_DOWNLOAD_FINISHED, add both filters so that the workflow starts only after a successful run of one data upload or data download. The workflow then ignores runs of other data uploads and data downloads. For the meaning of each status value, see Status Values of the Data Upload and Download Finished Events.



Event Type

Parameter

Value

DATA_UPLOAD_FINISHED

$.dataUploadId

The ID of the data upload. Open the data upload and copy the ID from the URL.

DATA_UPLOAD_FINISHED

$.status

SUCCESS. The other values are SUCCESS_WITH_ERRORS and FAILED.

DATA_DOWNLOAD_FINISHED

$.dataDownloadId

The ID of the data download. Open the data download and copy the ID from the URL.

DATA_DOWNLOAD_FINISHED

$.status

SUCCESS. The other value is FAILED.

Skip Event

Click > Skip Events to expand the configuration of skip events. Here you can define specific events that allow workflows to bypass certain steps under predefined conditions.

Skip Events have a higher priority over standard Source Events, meaning that if a Skip Event is received, it will override any other events for that specific step. Skip Events follow the same structure and format as Source Events.

When a step in a workflow receives a Skip Event:

  • No Action Triggered: The step will not execute any associated actions.

  • Pass-Through to Next Step: The Skip Event passes to the subsequent step in the sequence.

  • Condition Fulfillment Check: For the next step to proceed, it must fulfill the conditions of the initial event in the Source Event section; otherwise, it will also be skipped.

You can:

  • Start a workflow with a Skip Event: Allows you to define conditions where the workflow starts, but certain steps can be immediately skipped.

  • Skip multiple steps: Each step evaluates the Skip Event condition, if met, the step will not execute and will be passed over, continuing the workflow without interruption.

  • Finish a workflow with a Skip Event: Ends a workflow when triggered. If the Skip Event condition is met, the workflow will bypass any remaining steps and finish.

Adding a Skip Event
  1. Navigate to Skip Event settings: Within the listener configuration, go to the Source tab and click Add Skip Event.

  2. Define Source Event parameters:

    • Source Type: Choose the type of integration, partition, or PlatformManager (PFM)

    • Source Name: Select the specific source instance.

    • Event Type: Specify the event type.

  3. Apply Filters:

    • Use filters to further define the conditions under which the Skip Event will be triggered. Set Parameter and Value pairs as needed.

Source Events Combination Logic

If there are multiple Source Events, define what Source Events Combination Logic should be used:

  • All – The listener waits until all defined events are received and then continues with the action.

  • One of – The listener continues with the action as soon as any of the defined events is received.

Timeout

Specifies time between the first and last event in case of the "All" option for Source Events. If this timeout is exceeded, the listener will stop waiting for events and the current workflow run will be terminated.

Delayed trigger

If a delay is specified, the workflow will wait for the selected amount of time before processing begins. This delay will start when the first event is received.

Wait for the event from the previous step

If checked, the listener becomes dependent on an event from the previous listener. This option is available only for the second and subsequent steps.

3 – Action step

Here you define where the triggered action should take place. The action will be triggered with an empty payload as default. Multiple actions (with different targets) can be defined within one listener.

In a workflow that starts on DATA_UPLOAD_FINISHED or DATA_DOWNLOAD_FINISHED, select an action that does not start the data upload or data download that the workflow listens to. For example, a DATA_DOWNLOAD_FINISHED workflow whose Data Download action starts the same data download runs in a loop.

  1. Select Target Type (either Partition, Integration, or PFM) and Target Name (specific partition, IM instance, or your account for PFM).
    ℹ️ The Target Type and Target Name fields are only editable for multiple source workflow type.

  2. Action Type: Defines what should happen at the target partition / IM instance.

    • Options for a partition:

      • If Logic is selected, in Action ID select a logic from the target partition to run.

      • If Calculation is selected, in Action ID select a Calculation Field Set (CFS) from the target partition to run. (Support for other types of calculation will be added in future releases.)

      • If Dataload is selected, in Action ID select a Data Load from the target partition to run. The target names of Data Feed and Data Source are displayed in parentheses.

      • If Calculation Flow is selected, in Action ID select a Calculation Flow from the target partition to run. The Calculation has to be already created in the Pricefx app (Administration > Configuration > System Configuration > Calculation Flows).

      • If PFM Workflow is selected, choose a workflow from the target partition in the Action ID field to execute.

    • Options for PFM (the account):

      • If you select Data Download, choose a data download of the account in the Action ID field to start.

      • If you select Workflow, choose an event workflow of the account in the Action ID field to start.

    • Options for an IM instance:

      • If Route is selected, in Action ID select a route from the target IM instance. The route must be of the type direct.

  3. Payload: Defines the payload content sent with the action. The fields depend on the Action Type. Logic shows Body. Route shows Body, Headers and Properties. For any other Action Type, the section shows only the note The payload is delivered only for the Logic and Route action types. It is not sent to the selected action type.

    • Body (Logic and Route)

      • Option to Use the original event payload as the body. If selected, the payload received in the body of the event will be sent as a parameter of the triggered action.

      • Alternatively, enter custom Payload content manually (JSON).

    • Headers: Specify key-value pairs for request headers by clicking Add Header (only when Action Type is Route)

    • Properties: Define additional key-value properties by clicking Add Property (only when Action Type is Route).

    For ready-to-use payload examples (Body, Headers, Properties) per action type, see Action Step Payload Examples.

  4. Fallback: Enable this function to define alternative actions if the initially set action fails to execute.

    • Number of attempts: Specifies the overall number of attempts (where 1 is the original/first attempt, 0 is not allowed) the system should make if the initial action fails. After the number of attempts is reached, the Fallback action is triggered.

    • Fallback Timeout: Defines the wait time (in minutes) before each retry attempt. If the response is not received in the defined number of minutes, the Fallback action is triggered.

    • Fallback Action: If the number of attempts is reached, one of the following action is triggered:

      • Terminate the Workflow: Stops the workflow entirely if the initial action fails.

      • Skip the Action: Continues the workflow by bypassing the failed action without triggering the fallback action.

      • Custom Action: Allows you to specify a custom fallback action to be executed if the initial action fails and the Fallback payload to be sent. Select the Action Type and Action ID of the desired action to be executed and specify the Fallback Payload.

Setting multiple fallback attempts and a long timeout may slow down the processing of all events for your account. This will also affect the processing of your other Event Workflows and Mass Listeners.

If neither retry attempts nor timeout values are set, the fallback behavior might not be activated, potentially causing the listener to remain in an indefinite waiting state.

  1. Click Save Action.

Workflows_Listener.png


If you want to send events to RabbitMQ and consume them using Event Workflow, you need to use RabbitMQ PROD instance. (RabbitMQ QA consumes PlatformManager QA and cannot see events from PlatformManager PROD.)


5. To add the listener, click Finish Listener. Save the new workflow by clicking the Create button.

  1. Optionally, set up notifications. For more details see How to Create Event Orchestration Notification.

When an event triggers the workflow, the Running Workflows tab of Event Orchestration > Workflows shows the workflow. This is where you can manually stop the workflow if needed.

Check That Event Workflow Runs after Data Upload or Download

To check an event workflow that starts on DATA_UPLOAD_FINISHED or DATA_DOWNLOAD_FINISHED:

  1. Run the data upload or data download whose ID and result match the two filters you set in the Source step of the listener.

  2. Go to Account > Event Orchestration > Workflows.

  3. In the Workflows tab, open the row menu of the workflow and select Show Run History.

    The Run History tab of Logs opens, filtered to the workflow.

  4. In the Run History tab, find the run of the workflow that started after the data upload or data download finished.

Expected Result

  • While the event workflow runs, the Running Workflows tab shows the workflow.

  • The Run History tab shows one run of the event workflow for the finished data upload or data download run.

  • The action of the workflow runs, for example a data download starts.

To see the event that PlatformManager sent, go to Event Orchestration > Logs and open the Debug Logs tab.

Event Workflow Does Not Run after Data Upload or Download

If the Run History tab shows no run of the event workflow after the data upload or data download finishes, check these causes:

Cause

What to do

The feature flag eo-data-transfer-events is inactive for your account.

In Administration > PM Feature Flags, check that the flag is active for your account. Without access to PM Feature Flags, ask a user with the feature flag administrator permission.

The ID in the $.dataUploadId or $.dataDownloadId filter does not match the data upload or data download that ran.

Open the data upload or data download, copy its ID from the URL, and compare it with the filter value.

The status of the run does not match the $.status filter.

Compare the result of the run with the filter value. A failed run sends FAILED. A data upload processed with errors sends SUCCESS_WITH_ERRORS.

The data upload expired before its processing result arrived. PlatformManager sent FAILED, and the run status later changed to Processed.

PlatformManager sends one event per run. Run the data upload again.

A user canceled the data upload or data download, or PlatformManager canceled the data upload after an Integration as a Service (IaaS) workload timeout.

A run with the status Canceled sends no event. Check the run status in the run history, then start the data upload or data download again.

An IaaS data download stays in Downloading status after a timeout.

PlatformManager sends no event for this run. The workflow does not start. This is a known issue.

Timeouts

Each workflow has several timeout settings:

Timeout Type

Usage

Value

Action

Global

Maximum time the workflow waits for an event

Default: 24 hours

Workflow run deleted

Step

Maximum time a step waits for an event

Default: 24 hours

Workflow run deleted

Request

Maximum time each action waits for a response

Default: 10 minutes

Fallback action triggered

If a timeout occurs the request/step/workflow is considered to be in an error state and appropriate action are being taken.
As of PlatformManager v1.86.0, timeouts also trigger notifications.