Creating a Blank Flow (Flow without a Trigger)
You can create a flow in the Flogo App without attaching it to a trigger. This method of creating a blank flow is useful when the logic for the flow is available, but you do not know the condition under which the flow should activate. You can start by creating a flow with the logic and attach it to one or more triggers at a later time.
Procedure
- Click an app name on the Apps page in TIBCO Cloud Integration - Flogo (PAYG) to open its page.
-
Click the
Create link if this is the first flow in the app. If one or more flows exist in the app, click the
Create button.
The Add triggers and flows dialog opens.
-
Enter a name for the flow in the
Name text box.
Flow names within an app must be unique. An app cannot contain two flows with the same name.
- Optionally, enter a brief description of what the flow does in the Description text box. The Flow button is selected by default.
- Click Create.
-
Select
Configure flow inputs and outputs.
The flow gets created with the flow details page opens displaying the Input tab of the Flow Inputs & Outputs tab.
You can configure the inputs and/or outputs to the flow in the Input or Output tab. See Flow Inputs & Outputs Tab.
Mapping trigger outputs to flow inputs and flow outputs to trigger reply creates a contract between the trigger and the flow. Hence, when you attach the flow to a trigger later, you must map the output of the trigger to the flow input. You have the option to attach your flow to one or more triggers at any later time after the flow has been created. See Attaching a Flow to One or More Triggers for details.
- Enter a JSON schema containing the input fields to the flow in the Input Settings tab and click Save.
- Enter the JSON schema containing the flow output fields in the Output Settings tab and click Save.
- Click the left facing arrow on top of the blue label when done to retract the Flow Inputs & Outputs page.
- Add a Return activity (from the Default category) to the flow if you want the flow to return some data. Click and drag the Return activity to the right to make room to add other activities.
-
Hover your mouse over the shaded square to expose the add activity button (). Click the add activity button to add an activity.
After adding an activity, be sure to configure its properties by clicking on the activity tile. If there are any errors in the activity, fix the errors before proceeding. See Errors and Warnings section for more details.
- Continue adding activities by clicking the successive () buttons. To add an activity between two exisiting activities, you can drag the activities to the right in order to make room for the new activity then click the button to add the new activity.
-
If you added a
Return activity, click the
Return activity to configure the parameters that the flow outputs after completing execution. The
Return activity displays the parameters that you had configured in the
Output Settings tab of the
Flow Inputs & Outputs dialog.
Anything that the flow outputs after execution must be mapped into the Return activity of the flow. If any trigger needs to send a response back to a server, its output must be mapped to the output of the Return activity. This is done in the Map from Flow Outputs tab of the trigger.
- When you are ready to add a trigger, refer to Adding Triggers to a Flow to add one or more triggers to the flow. For triggers that need to send back a response to the server, you must map the flow output (elements in the Return activity) to the reply of the trigger (Map from Flow Outputs tab in the trigger configuration dialog).