Using advanced mode with IBM App Connect Enterprise Designer

Applications in IBM App Connect Enterprise Designer provide an advanced mode capability that you can use during create actions. 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, you can switch to advanced mode editing, which provides extra capabilities for editing flows. This topic describes the additional configuration that is required when you want to use advanced mode.

Before you begin

Install IBM® App Connect Enterprise 13.0.1.0 or later to use IBM App Connect Enterprise Designer.

In IBM App Connect Enterprise Designer, create a message flow that contains an input node and an application node by completing Creating an event driven flow.
The following example has a Scheduler node, a JSON parser node, and a Slack node.
This image shows a flow containing a Scheduler node, a JSON Parser node, and a Slack node.

About this task

This task describes generic instructions for using advanced mode for discovery connectors in IBM App Connect Enterprise Designer. The example that is shown is for a Slack node.

Procedure

  1. Create a blank JSON schema as described in Creating a JSON schema file. Populate the JSON file with entries that relate to the action that you are performing in IBM App Connect Enterprise Designer. For example:
    slackmessage.schema.json
    
    {
      "$schema": "http://json-schema.org/draft-04/schema#",
      "type": "object",
      "properties": {
        "destinationType": {
          "type": "string"
        },
        "objectId": {
          "type": "string"
        },
        "text": {
          "type": "string"
        },
        "parse": {
          "type": "string"
        },
        "messageAttachment": {
          "type": "object",
          "properties": {
            "messageText": {
              "type": "string"
            },
            "preText": {
              "type": "string"
            },
            "id": {
              "type": "integer"
            },
            "fallBack": {
              "type": "string"
            },
            "extracts": {
              "type": "string"
            }
          },
          "required": [
            "messageText",
            "preText",
            "id",
            "fallBack",
            "extracts"
          ]
        },
        "unfurlLinks": {
          "type": "boolean"
        },
        "unfurlMedia": {
          "type": "boolean"
        },
        "username": {
          "type": "string"
        },
        "asUser": {
          "type": "boolean"
        },
        "iconUrl": {
          "type": "string"
        },
        "iconEmoji": {
          "type": "string"
        },
        "threadTimestamp": {
          "type": "string"
        },
        "replyBroadcast": {
          "type": "boolean"
        }
      },
      "required": [
        "destinationType",
        "objectId",
        "text",
        "parse",
        "messageAttachment",
        "unfurlLinks",
        "unfurlMedia",
        "username",
        "asUser",
        "iconUrl",
        "iconEmoji",
        "threadTimestamp",
        "replyBroadcast"
      ]
    }

    For more information about creating JSON schemas, see json-schema.org.

  2. In the sidebar navigation menu, click Designer to open the Designer page.
    Any flows that you created before are displayed.
  3. Click the tile for the flow that you want to use for advanced mode.
    The flow opens in the Flow editor.
  4. Select the JSON Parser node.
    The configuration panel is displayed.
  5. Configure the JSON Parser node as required, Populate the Example JSON field with the JSON schema that you created in step 1.
  6. Click Generate to generate the schema.
  7. Select the node that you want to configure for advanced mode.
    The configuration panel opens.
  8. Click Map options menu and select Switch to advanced mode.
    This image shows the icon for Map options menu and the menu option "Switch to advanced mode."
    In the "Send message" section, the fields Destination type, and Send to are displayed.

Populate the required fields, Destination type, Send to, and the target field Text. (All the other target fields are optional).

  1. Populate the required fields and the required target field Text by placing the cursor in the input field, clicking Insert a mapping, and selecting a mapping from the Available mappings table. The available mappings in the table are derived from the JSON Parser node.

    Optionally, you can populate the fields manually by typing in the required values. For example, you can type the value channel in Destination type.

    Optionally, you can insert a function by clicking Insert a function and selecting a function from the Functions menu.
    This image shows the icon for inserting a function.
    For example, if you type HELLO WORLD in the Text field, you can select Insert a function > Functions > String functions > $lower case(). The text HELLO WORLD{{$lowercase(«string»)}} appears in the Text field. The incoming message HELLO WORLD is converted to hello world when it is sent to the destination.
    This image shows the functions menu.
    This image shows the functions menu.

Populate any optional target fields that you want to include.

  1. Optionally, filter the target fields by inputting text into the search field. For example, if you type the text "User" into the search field, only the fields Username and As user appear in the list of target fields.
  2. Populate any optional target fields that you want to include by placing the cursor in the target field. Text is displayed after the field to describe the purpose of the target field. Complete the target fields as described in the following list. The mappings in the Available mappings table are derived from the JSON schema that you created in step 1.
    The target fields are:
    1. Text: A message text to be sent. (Text is the only target field that is required. All other target fields are optional).
    2. Parse: Specifies how the message is parsed. By default, it is set to "none". Click Insert a mapping, and select a mapping from the Available mappings table.
    3. Link names: Indicates whether to link channel names and usernames. Select True, False, or Custom. If you select Custom, click Insert a mapping, and select a mapping from the Available mappings table.
    4. Message attachments: The structured message attachments.

      The mapping for the Message attachments field must include child mappings for the fields Message text, Pre-text, ID, Fallback, and Extracts. In this example, the JSON schema that you created in step 1, includes the following section:

      The following mappings are generated in the Available mappings table from the preceding section of the JSON schema file:
      This image shows the message attachment child mappings in the available mappings table.
      Click Insert a mapping, and select a mapping from the Available mappings table. For this example, select the mapping messageAttachment.
    5. Message text: The attachment text to be sent. Click Insert a mapping, and select a mapping from the Available mappings table. For this example, select the child mapping messageText.
    6. Pre-text: The optional text that appears above the attachment block. Click Insert a mapping, and select a mapping from the Available mappings table. For this example, select the child mapping preText.
    7. ID: The identifier of an attachment. Click Insert a mapping, and select a mapping from the Available mappings table. For this example, select the child mapping iD.
    8. Fallback: The plain-text summary of the attachment. Click Insert a mapping, and select a mapping from the Available mappings table. For this example, select the child mapping fallBack.
    9. Extracts: The extracts for an attachment. Click Insert a mapping, and select a mapping from the Available mappings table. For this example, select the child mapping extracts.
    10. Unfurl links: Select True, False, or Custom. Select True to enable the unfurling of primarily text-based content. If you select Custom, click Insert a mapping, and select a mapping from the Available mappings table.
    11. Unfurl media: Select True, False, or Custom. Select False if you want to disable the unfurling of media content. If you select Custom, click Insert a mapping, and select a mapping from the Available mappings table.
    12. Username: The bot's username. This property is only applicable when you set the value of As user property to False. Click Insert a mapping, and select a mapping from the Available mappings table.
    13. As user: Select True, False, or Custom. Select True to post the message as the authenticated user, instead of as a bot. By default the value is set to False. If you select Custom, click Insert a mapping, and select a mapping from the Available mappings table.
    14. Icon URL: The URL to an image to use as the icon for the message. This property is only applicable when you set the value of As user property to False. Otherwise, it is ignored. Click Insert a mapping, and select a mapping from the Available mappings table.
    15. Icon emoji: The emoji to use as the icon for the message. If you set this value, it overrides the icon URL. This property is only applicable when you set the value of As user property to False. Click Insert a mapping, and select a mapping from the Available mappings table.
    16. Thread timestamp: Specify another message's timestamp value to make this message a reply. Click Insert a mapping, and select a mapping from the Available mappings table.
    17. Reply broadcast: The value in this field indicates whether a reply is made visible to everyone in the channel or conversation. The default value is false. You must use this property along with the Thread timestamp property. Select True, False, or Custom. If you select Custom, click Insert a mapping, and select a mapping from the Available mappings table.

    Optionally, you can populate the fields manually by typing in the required values. For example, you can type the value FRED in Username.

    Optionally, you can insert a function by clicking Insert a function and selecting a function from the Functions menu.
    This image shows the icon for inserting a function.
    For example, if you type FRED in the Username field, you can select Insert a function > Functions > String function > $lower case(). The text FRED{{$lowercase(«string»)}} appears in the Username field. The incoming message FRED is converted to fred when it is sent to the destination.
    For more information about Advanced mode, see Using Advanced mode editing in the IBM App Connect Enterprise as a Service documentation.
  3. Optionally, you can edit the data that is associated with a mapping and preview your changes by completing the following steps:
    1. Place the cursor in a target field, for example, Username. By default, the text "SampleUsername" is displayed after the target field.
    2. Click Insert a mapping, and select a mapping from the Available mappings table, for example. username.
    3. In the "Send message" section, click the pencil icon to view available mappings and edit your sample data.
      This image shows the pencil icon to view available mappings and edit your sample data.
      The table "Context and sample data" is displayed.
    4. In the table, select the mapping username and change the data "Sampleusername" to "Fred". The text "Fred" will be displayed after the Username target field.

What to do next

Return to Creating an event driven flow and complete the remaining steps.

For more information about advanced mode, see Using Advanced mode editing in the IBM App Connect Enterprise as a Service documentation.