In an event-driven flow you identify an event that can occur in your source application and actions that can be performed in one or more target applications. The flow is triggered when the event occurs.

Creating an event-driven flow takes just a few steps:

  1. On the Dashboard page in IBM App Connect Designer, click New, then click Event-driven flow to start creating the flow.
  2. Complete the following steps. As you progress, App Connect automatically saves your changes. If you navigate away from the flow at any stage, the flow is saved as a draft flow that you can complete at another time.
    1. Enter a name that identifies the purpose of your flow, for example: Contact tasks for new attendee
    2. Select the first (source) application, and the event to trigger the flow. For hints and tips about using specific applications, see the other “how to” pages under How to guides for apps.
    3. If you haven’t connected to the application already, you can do so now to allow App Connect to interact with your application.
    4. Add a target application, and the action to be performed.
      1. If you haven’t connected to the application already, you can do so now to allow App Connect to interact with your application.
      2. Populate any required fields for the target application, and any other fields that you want to use for the target application.

        Note: In each required field for the target application, ensure that you provide a value as needed by the target application. If you map the name of a source field, you should ensure that the source application will pass a suitable value; otherwise, if a value passed is invalid the flow can’t complete successfully. In your flow, you can use conditional logic to do something appropriate if a value passed is invalid.

        Considerations:

        • In the default edit view for some create actions, you can select the parent object within which to create a new object; for example, for the Asana action Create Task, you can select the project within which to create the task; for example:
          *Project
          Event team tasks

          If the parent object is later deleted, then when you next edit the flow it displays a message to indicate that the object no longer exists; for example:

          *Project
          No object with ID "232105349566428" exists in the target system.

          Where the ID value is the system ID for the parent object.

        • In the default edit view for an action, some applications have fields that are hidden because they are not needed for general use cases. For more advanced use cases, to be able to work with all available fields for objects, you can switch to advanced mode editing.
        • If a field name is truncated, hover over the field name to display the full name.
          A required field with truncated name and mouse pointer used to show full name
        • You can add the names of source fields, apply functions to transform source data, and type text. For more information, see Techniques for specifying data to be passed to a target application or API.
        • If a target field references an object in the source app (like a Contact in Salesforce) and the object is deleted from the source app, then the flow displays a message to indicate that the object no longer exists; for example:
          No object with ID "232105349566428" exists in the target system.
          Where the ID value is the system ID for the object.
    5. (Optional) Insert other target applications, and the actions to be performed, as in the previous step. You can insert a target application at any (+) point in the flow.
      A multi-node flow, with the source application and 2 target applications
      A multi-node flow, with the source application and 2 target applications

      Considerations:

      • You can add a maximum of 10 target applications (actions).
      • Actions are performed in the order shown on the canvas.
      • If one of the actions fails, the following actions won’t be performed, but any previous actions won’t be reversed.
      • In the target fields for an action, you can map data from the trigger application or from previous target applications in the flow.
    6. (Optional) If you choose an action to retrieve or update data in one of your applications, you can add a condition to retrieve or update a single record.

      For example, the following condition retrieves a single record where the email address of the Insightly lead matches the email address in the trigger application, and the Insightly lead comes from Ireland.

      Example Retrieve action that returns a single record where the email address of the Insightly lead matches the email address in the trigger application, and the Insightly lead comes from Ireland

      Considerations:

      • You can add a maximum of 10 conditions. If you add more than one condition, all the conditions must be matched to succeed.
      • You can retrieve a single record only. If the condition matches more than one record, or no records, you’ll see an error message on the dashboard. The following actions won’t be performed, but any previous actions won’t be reversed.
    7. (Optional) You can add some conditional logic to your flow. If you want your flow to do different things depending on the data that it receives from the trigger application, you can add one or more “If” nodes to your flow. For more information, see How do I add conditional logic to a flow?.
    8. (Optional) You can parse the data returned by an app in your flow, for subsequent use by another app. For example, if data is returned as a JSON string, you’ll need to parse it into a JSON object before using the data as input into another app. For more information, see How do I parse a JSON string that is returned in a flow into a JSON object for subsequent use? and How do I parse CSV text that is returned in a flow into a JSON object for subsequent use?.
  3. Choose one of the following options to complete your flow:
    • To save and start your flow, open the options menu [⋮] on the banner, and then and click Start flow. Then, to exit the flow, click Dashboard. Your flow is displayed on the Dashboard as Running, and is listening for the event that you configured.
    • To save but not start your flow, click Dashboard. Your flow is displayed on the Dashboard as Stopped, and can be started manually from the menu:
      Flow menu options to manage or edit the flow

Note: If you do not complete the flow, the flow is displayed on the Dashboard with the label (!) Incomplete.

For simple step-by-step examples of how to create a flow for different use cases, see the other tutorials for App Connect.

2 comments on"Introduction: Creating an event-driven flow"

  1. Hi All , I am trying to retrieve the contact details from Salesforce while connecting the Salesforce I’m getting the below error. Could you please tell me what could be reason.

    Something went wrong
    Something went wrong while getting details about the application’s object.
    To help resolve this issue, contact IBM with the reference P3hI23amH.

    • Ian_Larner June 12, 2018

      @raghu,
      Please check your Salesforce account. If using a free account, you need to use the Developer account. Otherwise, your edition of Salesforce needs to be enabled for API access (“API enabled”). Have you looked at the page How to use IBM App Connect with Salesforce?

      If your account is OK, please let us know. You might want to check the forum on dWAnswers, and then maybe add (submit) a ticket through IBM Cloud unified support – see Access IBM Support.

      Regards,
      Ian

Join The Discussion

Your email address will not be published. Required fields are marked *