Types of flows

In high-level terms, a flow defines the order and behavior of a sequence of activities that enable applications to interact. IBM® App Connect supports two types of flows: event-driven flows and flows for an API.

Event-driven flows

In an event-driven flow, you identify an event that can occur, which automatically triggers defined actions in one or more applications. An event can be considered as a change or an activity that occurs in an application; for example, a contact is created in Salesforce. An action is an operation that App Connect initiates in an application when a flow runs; for example, contact details are retrieved from Salesforce (so they can subsequently be processed in some way later in the flow).

IBM App Connect supports streamed, polled, and scheduled events. An event node for one of these event types is always the starting point in an event-driven flow.

Streamed events

App Connect is preconfigured to support event streaming from certain applications. These applications, which are deemed source applications, will send event notifications in real time to App Connect whenever a particular type of change occurs in the application; for example, an object or a record is created or updated. If you create a flow with an event node that supports streaming, whenever an event notification is received, App Connect will trigger the flow to run so that it can perform the relevant action in one or more applications, termed target applications.

The following example of an event-driven flow specifies that whenever a new contact is created in Salesforce (a streamed event), a task should be created in Asana (an action).

Example of an event-driven flow with event streaming
Polled events

In addition to the preconfigured streamed events that can be used to trigger flows, you can configure events to trigger a flow by polling an application for new or updated objects. App Connect will poll the application at regular intervals that you specify in order to identify new or updated objects, and then trigger the flow to complete the actions.

The following example of an event-driven flow illustrates how a Salesforce instance can be polled at defined intervals for new contacts and used to trigger the creation of a task in Asana.

Example of an event-driven flow with events by polling
Scheduled events

App Connect provides a built-in Scheduler as a toolbox utility, which you can configure to trigger your flows at regular intervals or at specific dates and times in order to perform actions in one or more target applications.

The following example of an event-driven flow illustrates how the Scheduler can be configured to run Salesforce and Slack actions on a schedule. The Scheduler triggers the flow immediately after it's started and then at repeating hourly intervals every Thursday, to retrieve details of new accounts that were created in Salesforce and to generate messages for interested parties in a Slack channel.

Example of an event-driven flow with the Scheduler

For more information about event-driven flows, see Creating event-driven flows from scratch.

Flows for an API

Flows for an API (alternatively referred to as an API flow) provide a way to implement an API. An API flow contains a request, actions for one or more target applications, and a response. The request uses a model that you define to request the creation, replacement, or retrieval of data objects or records in your applications. When the request is submitted, each target application performs its action, and then the flow returns a response, which either confirms that the actions were successful, or returns the data that was requested.

The following example of an API flow defines an API that accepts request data (submitted by trade show attendees) through a facility such as a web page or mobile app. The flow uses that data to create leads in Insightly, and then returns a response code (and response data if appropriate) from Insightly.

Example of an API flow

For more information about API flows, see Creating flows for an API from scratch.