Overview of developing with Designer

Developing with IBM App Connect Designer you can easily create integrations that connect your applications (apps) in minutes, whether they are on the cloud or a private network, and with no coding required.

In Designer, you don't have to develop everything yourself; for example:

  • You can use templates that match your integration needs or to develop from for your own integrations
  • You can import flow configuration files from others to develop in your Designer, or can export your flows to share with others
  • You can use APIs that are shared within your IBM Cloud organization, and can share your API flows with others
  • Your can interact with message flows (developed with the App Connect Toolkit) that are running in App Connect on IBM Cloud, in Cloud Pak for Integration, or in App Connect Enterprise elsewhere.

What you develop ... flows

In high-level terms, you develop a flow (similar in nature to a business process flow) that defines the order and behaviour of a sequence of activities.

When developing with Designer, you have the choice of two types of flow to create: an event-driven flow and a flow for an API.

In an event-driven flow, you identify an event that can occur to trigger the flow to run. The event can be a change in the first application in the flow (the source application), a scheduled interval or specific dates and times, or when called by another flow. You also identify actions to be performed in one or more target applications when the flow runs. The flow links the event to the actions so that, whenever the event occurs, the actions are automatically triggered in the target applications.

For example, you might create a flow so that at scheduled dates and times (the event), App Connect automatically performs a sequence of actions to retrieve data about sales contacts from an on-premises Db2 database, use IBM Watson to analyse the tone of any comments in the data, and then update or create a lead in Salesforce.

Figure 1. Flow diagram for an event-driven flow in Designer
Flow diagram for an event-driven flow in Designer

(Click image to view full size)

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

Figure 2. Flow diagram for an API flow in Designer
Flow diagram for an API flow in Designer

(Click image to view full size)

Each time your flow runs counts towards your monthly quota.

While developing with Designer, you might also make use of message flows (developed by using the App Connect Enterprise Toolkit) running on an integration server, such as in IBM Cloud Pak for Integration, in App Connect Enterprise installed on premises, or in App Connect on IBM Cloud:

  • You might be developing a flow in Designer to call a message flow to do special processing.
  • You might be developing a flow in Designer to be called by a message flow, to exploit smart connectors to perform actions on cloud-native applications.

For example, in Designer you might develop an event-driven flow to be triggered when called from a message flow running in IBM Cloud Pak for Integration. The flow then updates or creates a Salesforce lead, then sends an email to notify a Sales rep, and finally returns the Salesforce lead ID to the message flow to complete of the lead in IBM Cloud Pak for Integration.

Figure 3. An event-driven flow as a callable flow.
An event-driven flow as a callable flow.

(Click image to view full size)

Besides events and actions, you can add nodes for specialized processing such as conditional logic, logging, batch processing, and CSV parsing. For example, in the flow diagram for the event-driven flow (above), an If node is used to take different actions depending on whether sales data contains comments.

High level process for developing

Creating a flow

A quick and easy way to create an event-driven flow or an API flow is to use a pre-built template from the App Connect gallery of templates. If needed, you can then adapt the template to your needs.

Alternatively, if you don't see a suitable template, you can import a flow definition file; for example, from supplied samples or from a flow that another developer has exported from their Designer.

When you create a flow from a template or imported flow definition file, it is good practice to examine the flow to understand and validate its behavior, how its event and actions are configured, and how data is mapped. Also, you may need to connect to applications used by the flow, choose a different app account, or otherwise change the configuration of the flow or the mapping of data to suit your needs.

Alternatively, you can create a new flow from scratch, perhaps following one of the App Connect tutorials for specific use cases. You'd then build up the flow yourself, adding an event to trigger the flow, one or more actions to be performed in target applications or APIs, and optionally selecting specialized processing such as conditional logic, logging, batch processing, and CSV parsing.

Completing a flow

Completing a flow involves the following three simple high-level steps: Connect, configure, and then map.

  1. Connect: For a flow to pass data between your applications or APIs, you must connect App Connect to each application and API used in the flow. You can have multiple accounts connected to each application or API. For some cases, you'll need only an email address (or user name) and password to connect. For others, you might require information such as subdomain or host details, or an API key. You can connect to your applications from the Applications tab on the App Connect Catalog page, and connect to your shared APIs from the APIs tab. You might find it most convenient to use the App Connect Catalog page to define your connections before creating a flow. You can also connect to applications or imported APIs from the flow editor while completing a flow.
  2. Configure: After creating a flow, you need to configure the behavior of the event and actions, and configure any logic and other tools used in the flow. You can choose from a wide range of events and actions that are defined for the applications and APIs in the IBM App Connect catalog. To configure the behavior of an event or action, you configure fields for that node in the flow; for example: To trigger a flow when a new Asana task is created, select from an Asana account the Workspace or Organization, and optionally a Team or Project:
    Figure 4. Adding an event with configuration fields
    Adding an event with configuration fields

    (Click image to view full size.)

    When you create an API flow, you configure one or models graphically by giving a name to a model and adding properties to be used by flows that implement operations in the API.

    Figure 5. For API flows, you configure a model
    For API flows, you configure a model

    (Click image to view full size.)

  3. Map: If you want an action to use data from the flow's event or from an action earlier in the flow, you can map fields from the event or earlier actions. This mapping is typically a simple activity to select fields from the event or from previous target applications in the flow; for example: (Select the image to view the full flow editor screen capture.)
    Figure 6. Selecting an event field

    (Click image to view full size.)

    In such mapping, you can customize the data passed by apply JSONata functions such as to convert text to upper or lower case, or to calculate number of items returned by an earlier retrieve action. For example, an action in your flow might retrieve an array of Salesforce accounts, and when mapping a field in a later action you might apply a JSONata function to select the first account from the array and select that account's ID field:

    Figure 7. A JSONata function used to customise a mapping

    (Click image to view full size.)

Testing and debugging

When you create, edit, or import event-driven or API flows, App Connect automatically validates each application or toolbox node in the flow. If validation errors are detected, a warning icon Warning icon for flow validation is displayed on any nodes that require your attention. Validation errors are typically reported for unconnected or disconnected accounts, missing mappings in required fields, and invalid syntax in JSONata expressions that you type into fields. You must resolve all validation errors before you can start the flow.

When ready to test, you can start flows in Designer to run in your App Connect instance. When a flow is triggered, the flow's tile on the App Connect dashboard indicates if it ran successfully or encountered problems.

If you need to troubleshoot your flows in IBM App Connect on IBM Cloud, or find out what they're doing, you can view messages in the built-in log viewer or access the logs from an IBM Log Analysis with LogDNA service instance that's configured to receive platform services logs in IBM Cloud.

To aid testing, you can also enable debug logging and can choose to add actions in your flow to emit log or notification messages.

Exporting and sharing

You can export a flow to a flow definition file that can be imported into another instance of App Connect; for example, to import the flow to run in a separate production instance of App Connect on IBM Cloud. or for other people to import into their App Connect instance to develop the flow in their Designer. (In the same way, you can import flow definition files into your App Connect instance.)

You can export an API flow to a BAR file that can be imported to run the API flow in IBM Cloud Pak for Integration.

Using Designer, you can choose to share API flows with other members of your IBM Cloud organization to make the API available for discovery.

You can also expose and manage API flows by using the API management capabilities in IBM Cloud or transfer the API to IBM API Connect for more advanced API management. You can also download an API definition as an OpenAPI document (in YAML or JSON format) that can be imported into an API management tool or REST client of your choice.