Several new Business Process tasks have been made available for the latest version of Clarify. Many allow for better looping and control structure operations. The tables below provide details about each Business Process task, its purpose, parameters, and usage. Within each task description, bold text indicates mandatory parameters. All parameters are Input, unless designated as Output.
New Types for Parameters and Variables
Type | Description |
---|---|
Dictionary | A collection containing key value pairs. The keys are of type String and the values can by any object type. |
List | A collection containing an ordered list of objects. |
JSON | Data that is structured in the JSON format. |
Dictionary - Create
This task initializes a variable or parameter of type Dictionary as an empty Dictionary.
Parameter | Type | Description |
Dictionary | Dictionary | The resulting Dictionary. |
Dictionary - Get
This task gets an item in the dictionary with a specified key.
Parameter | Type | Description |
Result | Any | The item that was retrieved.. |
Dictionary | Any extends Dictionary | The dictionary that an item will be retrieved from. |
Key | String | The key of the item in the dictionary. |
Dictionary - Has Key
This task returns a boolean indicating whether or not an entry with the specified key exists in the dictionary.
Parameter | Type | Description |
Dictionary | Any extends Dictionary | The dictionary that will be checked for a specified key. |
Key | String | The key that will be checked. |
Result | Boolean | The result indicating whether or not an entry with the specified key was found. |
Dictionary - Keys
This task returns a list containing all keys in the dictionary.
Parameter | Type | Description |
Result | List | A list of all keys in the dictionary. |
Dictionary | Any extends Dictionary | The source dictionary. |
Dictionary - Values
This task returns a list containing all values in the dictionary.
Parameter | Type | Description |
Result | List | A list of all values in the dictionary. |
Dictionary | Any extends Dictionary | The source dictionary. |
Dictionary - Put
This task puts a new entry in the dictionary with the specified key.
Parameter | Type | Description |
Dictionary | Any extends Dictionary | The dictionary that the new entry will be added to. |
Key | String | The key of the new entry that will be added to the dictionary. |
Entry | Any | The value of the new entry that will be added to the dictionary. |
Dictionary - Remove
This task removes an entry from the dictionary with the specified key.
Parameter | Type | Description |
Dictionary | Any extends Dictionary | The dictionary that the entry will be removed from. |
key | string | The key of the entry to remove from the dictionary. |
Dictionary - Size
This task returns the number of entries in the dictionary.
Parameter | Type | Description |
Result | Long | The number of entries in the dictionary. |
Dictionary | Any extends Dictionary | The dictionary that the number of entries will be counted from. |
Force step failure
This task can be used within a control structure task to force the entire step that it is contained within to fail.
Parameter | Type | Description |
Message | String | An optional error message to display when the task executes. |
For example, in the Business Process below the Force Step Failure task has been included within a While Do task. If the ReadLocationsFA (File Adapter) is not read for some reason, then the entire step will fail and an error message will appear in the Auditor.
List - Create
This task initializes a variable or parameter of type List as an empty List.
Parameter | Type | Description |
List | List | The resulting list. |
List - Get
This task gets an item in the list at a specified index.
Parameter | Type | Description |
Result | Any | Output. |
List | Any extends list | The list containing the item. |
Index | Long | The index of the item to be retrieved. |
List - Add
This task adds an item to the list.
Parameter | Type | Description |
List | Any extends list | The list to be added to. |
Item | Any | The item to be added to the list. |
List - Remove
This task removes an item from the list at a specified index
Parameter | Type | Description |
List | Any extends list | The list that an item will be removed from. |
Index | Any | The index of the item to be removed. |
List - First
This task gets the first item in the list.
Parameter | Type | Description |
List | Any extends list | The list that the first item will be retrieved from. |
Result | Any | The first item in the list. |
List - Last
This task gets the first item in the list.
Parameter | Type | Description |
List | Any extends list | The list that the last item will be retrieved from. |
Result | Any | The last item in the list. |
List - Size
This task gets the number of items in the list.
Parameter | Type | Description |
Result | Long | The size of the list. |
List | Any | The list that the number of items will be counted from. |
List - Index Of
This task gets the index of a specific item in a list.
Parameter | Type | Description |
Result | Long | The index of the first occurrence of the item in this list, or -1 if this list does not contain the item. |
List | Any | The list that will be searched. |
Item | Any | The item to search for in the list. |
Note: This task is available in version 5.03 and later.
List - Contains
This task checks if a list contains a specific item (and returns a boolean).
Parameter | Type | Description |
Result | Long | True if the specified list contains the specified item; otherwise, false. |
List | Any | The list that will be searched. |
Item | Any | The item to search for in the list. |
Log Info
This task logs the provided String value.
Parameter | Type | Description |
Message | String | The String value to be logged. |
JSON - Create
This task initializes a JSON variable or parameter as an empty JSON body.
Parameter | Type | Description |
json | JSON | The resulting JSON body. |
JSON - Read From Type
This task converts either a String or a Storage Node to a JSON object.
Parameter | Type | Description |
Result | JSON | The resulting JSON object. |
Data to read | String or Storage node | The source data that will be converted to a JSON object. |
JSON - Get
This task gets an object (of type String, Long, Double Boolean, List, Dictionary, or JSON) from the root of the JSON object with the specified name.
Parameter | Type | Description |
JSON | JSON | The source JSON object. |
Name | String | The name of the JSON object to be retrieved from the root of the source JSON object. |
Result | <String, Long, Double, Boolean, List, Dictionary, or JSON> | The data with the specified name at the root of the JSON object. |
JSON - Set
This task sets an object (of type String, Long, Double Boolean, List, Dictionary, or JSON) in the root of the JSON object with the specified name.
Parameter | Type | Description |
JSON | JSON | The source JSON object that data will be added to. |
Name | String | The name of the object to be set in the root of the source JSON object. |
Value | <String, Long, Double, Boolean, List, Dictionary, or JSON> | The data to be set in the root of the source JSON object. |
JSON - To Dictionary
This task converts a JSON object to a dictionary
Parameter | Type | Description |
JSON | JSON | The source JSON object. |
Result | Dictionary | The converted dictionary representation of the source JSON object. |
JSON - To List
This task converts a JSON object to a list. Assumes the JSON object being converted is a JSON array, otherwise a runtime exception will be thrown.
Parameter | Type | Description |
JSON | JSON | The source JSON object. |
Result | List | The converted list representation of the source JSON object. |
JSON - To Storage Node
This task converts a JSON object to a Storage Node.
Parameter | Type | Description |
JSON | JSON | The source JSON object. |
To Storage node | Storage node | The storage node containing the data from the source JSON object. |
For each (Control Structures)
For each item in a list, a specified task is executed. This includes multiple tasks.
Do while (Control Structures)
Executes tasks while a specified condition is true. Tasks are executed before the condition is checked. The specified task is executed before the condition is checked. This means that the specified task is always executed at least one time. Then the condition is checked. If the condition is true, then it executes again (then the condition is checked again). And so on.
While do (Control Structures)
While a specified condition is true, a specified task is executed. The condition is initially checked before the given task is executed. This means that the condition is checked first before the task is performed. If the condition isn't immediately true, then the task is never executed.
If/Then/Else (Control Structures)
If a given condition is true, a specified task(s) will be executed in the “then” block. If the given condition is false, the specified task(s) will be executed in the “else” block. In the example below, different Business Processes will execute based on the result of the initial “If” statement.
XML - Data Splitter
This task will take an XML document and split it into several fragments using a defined path to a specific XML element.
Parameter | Type | Description |
Document | StorageNode | The XML document to split. |
Path | String |
The path to split on relative to the root of the document, i.e. /root/element. Tip! Use the ObjSchema Editor’s Copy Path option to easily get the path for splitting. |
Result | List | The list of StorageNodes that the XML document was split into. |
Note: This task is available in version 5.03 and later.
XML - Split Multiple Roots
This task sets an object (of type String, Long, Double Boolean, List, Dictionary, or JSON) in the root of the JSON object with the specified name.
Parameter | Type | Description |
JSON | JSON | The source JSON object that data will be added to. |
Name | String | The name of the object to be set in the root of the source JSON object. |
Value | <String, Long, Double, Boolean, List, Dictionary, or JSON> | The data to be set in the root of the source JSON object. |
Note: This task is available in version 5.03 and later.
Comments
0 comments
Please sign in to leave a comment.