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.
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
- 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.
- In the sidebar navigation menu, click Designer to open the
Designer page.
Any flows that you created
before are displayed.
-
Click the tile for the flow that you want to use for advanced mode.
The flow opens in the Flow editor.
- Select the JSON Parser node.
The configuration panel is
displayed.
- Configure the JSON Parser node as required, Populate the Example
JSON field with the JSON schema that you created in step 1.
- Click Generate to generate the schema.
- Select the node that you want to configure for advanced mode.
The
configuration panel opens.
- Click Map options menu and select 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).
- 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 menu.
For example, if you type
HELLO WORLD in the
Text field, you can select . 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.
Populate any optional target fields that you want to include.
- 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.
- 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:
- Text: A message text to be sent. (Text is the only
target field that is required. All other target fields are optional).
- 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.
- 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.
- 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:
Click Insert a mapping, and select a mapping from the
Available mappings table. For this example, select the mapping
messageAttachment.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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
menu.
For example, if you type
FRED in the
Username
field, you can select . 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.
- Optionally, you can edit the data that is associated with a mapping and preview your
changes by completing the following steps:
- Place the cursor in a target field, for example, Username. By default,
the text "SampleUsername" is displayed after the target field.
- Click Insert a mapping, and select a mapping from the
Available mappings table, for example. username.
- In the "Send message" section, click the pencil icon to view available mappings and edit your
sample data. The table "Context and sample data" is displayed.
- 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.