Step 4: Map trigger output to flow input

Flogo provides a graphical data mapper to map data between the activities within a flow, and between the trigger and the flows attached to the trigger within an app. Use the flow inputs & outputs tab to configure the input to the flow and the flow output.

Use the mapper to enter the flow or Activity input values manually or map the input schema elements to output data of the same data type from preceding activities, triggers, or the flow itself. For more information, refer to Data mappings.

When a REST service is invoked, the data from the request is produced as output by the ReceiveHTTPMessage REST trigger. For the request to be processed, this output must be used by the flow in the form of flow input. Hence, you must map the trigger output to the flow input.

Mapping the trigger output to the flow input

    Procedure
  1. Click the REST trigger icon to open its configuration dialog.
  2. In the configuration dialog, multiple tabs are displayed in a column on the left. Trigger Settings is selected by default. When you select the Map to Flow Inputs tab, the Available data and Flow inputs panes are displayed. Flow inputs are the list of data entering the flow to define. The flow input value can be entered manually or by mapping the data available in the available data pane. The trigger outputs are also included in this pane.

  3. In the Flow inputs column, select headers to start the mapping. The headers text editor on the right of flow inputs appears empty initially.
  4. To map the trigger output headers to the flow input headers:

    1. Drag headers from the Available data pane to the headers in the Flow inputs pane. Alternatively, click headers from the Flow inputs pane, then drag headers from the Available data pane, into the text editor.
    2. The text editor now displays $trigger.headers and a connection line between the two panes. This indicates that you have successfully mapped the trigger output headers to the flow input header. The numbers at the end of the connection line indicate the total number of mappings for the selected element.