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 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.
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
- Click the REST trigger icon to open its configuration dialog.
- In the Flow inputs column, select headers to start the mapping. The headers text editor on the right of flow inputs appears empty initially.
- 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.
- 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.
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.
To map the trigger output headers to the flow input headers:
