Step 3: Add a trigger to the flow

Triggers receive events from external sources such as Kafka, Salesforce, and GraphQL. The handlers residing in the triggers, dispatch events to the flows. Flogo provides a set of out-of-the-box triggers and connectors for receiving events from external systems. In this guide, a ReceiveHTTPMessage REST trigger is used to listen to incoming REST requests.

Adding a trigger to the flow

    Procedure
  1. On the sidebar, click the Triggers option. The Triggers palette lists the triggers that serve a specific use case and each of them has a unique set of configurations.

    For more information about triggers listed, refer to Triggers.

  2. When you click the Triggers option, you see the Triggers palette. On the left side, you also see a column that displays the message "No triggers in the Flow". On the Triggers palette, drag the Receive HTTP Message trigger in the column on the left side.
  3. In the trigger configuration dialog of the Receive HTTP Message trigger, perform the following tasks:

    1. Enter /abc in the Resource path field.
    2. Click Continue.
  4. When prompted, select Copy Schema.
    Tip: You can define a JSON or Avro schema such that it is available for reuse across an app. An app-level schema can be used in any flow, Activity, or trigger configuration where a schema editor is provided. You can simply pick an existing schema from a list.

    Currently, Flogo only supports the JSON and Avro types of schemas. For more information about defining, editing, or using the app-level schema, refer to Schemas.

    The trigger configuration dialog automatically closes and you see the following screen.

    Click the icon to view the Flow Inputs & Outputs tab as seen in the following screen. Click the icon again to collapse it.

You can also create a trigger before attaching a flow to it. For more information, refer to Creating a trigger without a flow.