Flows
Each flow represents specific business logic in an app. An app can have one or more flows. A flow contains one or more activities. The flow is activated by a trigger. A new flow can be created only from the app details page. It can be created from either the Flow view or the Trigger view of the app details page.
Each flow is attached to one or more triggers. You can attach the flow to a trigger at the time of flow creation (by selecting the Start with a trigger option) or create a blank flow without a trigger (by selecting Configure flow inputs and outputs) to begin with and attach it to one or more triggers at any time after the flow has been created.
After you have created the flow, you can test it without having to activate the trigger. See the Flow Tester section for details on using the flow tester.
This section contains the following topics:
- Creating a Flow
Every app has at least one flow. Each flow can be attached to one or more triggers. You have the option to begin by creating a blank flow (flow without a trigger) too and attaching the flow to one or more triggers at a later time. Use the +Create link on the app page to create the first flow in an app. If there are existing flows in an app, click the Create button to create additional flows attached to a new trigger or to create a flow that is attached to the exiting trigger, hover over the trigger and click New flow. - Synchronizing Schema Between Trigger and Flow
If you make any changes to the schema that you entered when creating the trigger, you must propagate the changes to the flow input and flow output. - Using Subflows
TIBCO Cloud Integration - Flogo (PAYG) provides the ability to call any flow from another flow in the same app. The flow being called becomes the subflow of the caller flow. This helps in separating the common app logic by extracting the reusable components in the app and creating standalone flows for them within the app. Any flow in the app can become a subflow for another flow within the same app. Also, there are no restrictions on how many subflows a flow can have or how many times the same subflow can be called or iterated in another flow. Hence, subflows are useful when you want to iterate a piece of application logic more than once or have the same piece of logic repeat in multiple locations within the app. - Creating a Flow Execution Branch
Activities in a flow can have one or more branches. If you specify a condition for a branch, the branch executes only when the condition is met. You also have the option to create an error branch from an activity. The purpose of the error branch is to catch any errors that might occur during the execution of the activity. Branching is also supported for Error Handler flows, which serve the purpose of catching all errors at the flow level. - Duplicating a Flow
You can duplicate an existing flow in an app. All activities in the flow along with their existing configurations get duplicated to a new flow in the app and the duplicate of the original flow gets created with a default name beginning with "Copy of" in the same app. You can rename the flow by clicking on the flow name on the top left corner of the flow details page. Duplicating a flow saves you time and effort in situations when you want to create a flow with similar or same activities as an existing flow in the app. After you have duplicated the flow, you can add more activities, rearrange existing activities by dragging and dropping them in the desired location, or delete activities from the flow duplicate. - Editing a Flow
You can edit the flow name or its description after creating the flow. You can also add more activities, rearrange existing activities by dragging and dropping them in the desired location, or delete activities from the flow. - Reverting Changes to a Flow
If you have multiple flows in an app, you cannot revert changes made to a single flow. However, you can click the button on the app page, to revert all changes made to the app and revert the app to the state that it was in after the last . All changes made to the app will be lost. This can be done as long as you have not the app after making the changes. - Switching Between Flows in an App
If an app has multiple flows, you can switch between the flows within an app. - Switching Between Display Views on the App Page
When you click an app on the Apps page, the app details page opens. The flows in the app are listed in the app details page. You have the option to view this page from a Trigger view or Flow view. By default, it opens in the Flow view. Click the Switch to Trigger view to switch to the Trigger view. When you are in the Trigger view, click Switch to Flow view to go back to the flow view. - Deleting a Flow
You can delete a flow from the app page. - Configuring the Error Handler
Use the error handler to catch exceptions that occur when executing a flow. The error handler is designed to catch exceptions in any or all activities within a flow. If there are multiple flows in an app, the error handler must be configured for each flow separately. Branching is supported for error handler flows similar to the other flows. - Adding an Activity
After a flow is created, you must add activities to the flow. - Configuring an Activity
After adding an activity, you must configure it with any input data that the activity might need and the output schema for activities that generate an output. - Using the Iterator in an Activity
When creating a flow, you may want to iterate a certain piece of logic multiple times. For example, you may want to send an email to multiple people based on the output of a certain activity (let's call it activity1) in your flow. You can do this by adding a SendMail activity following activity1 in your flow and configure the SendMail activity to iterate multiple times when activity1 outputs the desired result. Each iteration of the SendMail activity is used to send an email to one recipient. This saves you the effort of creating multiple SendMail activities. - Deleting an Activity
You can delete an activity in a flow from the page for a flow. - Viewing Errors and Warnings
TIBCO Cloud Integration - Flogo (PAYG) uses distinct icons to display errors and warnings within an app.