Workflow Builder

On this page:

Event Listeners

Workflow Events enable workflows to progress based on events from outside sources. An event system allows workflows to come to a halt until a certain event occurs. When this event occurs the workflow may process the event and progress.

Note: For more on the event system from a developer perspective refer to IAP Event System in the IAP User Guide for more information. This will explain how to define/create events as well as how to define event handlers in code.

Creating a Workflow Event Listener

To create a workflow event listener:

  1. Add an eventListener task to the workflow canvas. This task type can be found under the WorkFlowEngine section of the Workflow Builder sidebar.

Add Event Listener Task

  1. Verify the purple eventListener task node is added to the canvas.

Event Listener Task

  1. Double click the Event Listener task. A New Event Listener dialog will display.

Event Listener Diaglog

New Event Listener Fields

Field Name Description
Event Source The name of the application that will be emitting the event. Note the namespace @killgore in front of helloworld. If this were from the Configuration Manager it would be @itential/app-configuration_manager. The event source matches the pronghorn.json id field.
Event Topic The name of the event defined in the "topics" section of the pronghorn.json file. This is the event that will progress the workflow. See the IAP Event System link in the note above for defining events.
Event Schema Filter This is an optional field that uses JSON schema to define and filter an event when it contains a particular piece of data. For instance, the listener will only respond to a test_pattern event when the name field is "michael".

Event Schema Filter Example

{
    "type": "object",
    "required": [ "name" ],
    "properties": {
        "name": {
            "enum": [ "michael" ]
        }
    }
}

Note: For the New Event Listener dialog that was shown above, the event listener will only progress the workflow if it receives the test_pattern event from the @killgore/helloworld application and the payload name field has the value of michael.

Running the Workflow Event Listener

When a job is triggered from a workflow containing one or more Event Listener tasks, the Event Listener task for that job will remain in a running state until it receives the expected external event. The workflow will progress when the external event is received.

Event Listener Diaglog

Note: Details to create a Workflow Event Listener Task for NSO NETCONF streams can be found here.