Skip to content

Using Automation Tasks Library Inputs/Outputs#

Tasks typically have a set of inputs and outputs that inform the behavior of the task. These fields may also be defined with the use of Automation Task Library.

AutomationTaskInputs Object#

Property Description Notes
Key Name of the input Mandatory, String
Value Type of the value required.
Note: To allow simplicity, two types of values should be accepted, one for most cases (string) and one for special and less frequent cases (object).
Mandatory, String from enum:
• Any (Default)
• String
• Integer
• Long
• Decimal
• Boolean
• DateTime
• Object
• Buffer
• Password
• ReferenceType
OR AutomationTaskInputType

AutomationTaskInputType Object#

Property Description Notes
Type Type of input port where:
Static – Same as using the value as string, but allowing the display name to be changed.
Activate – The Task activation input. Only one allowed.
AutoPort – Activation of the input auto ports functionality for this task.
Dynamic – The inputs can be added/removed.
Mandatory, String from enum:
• Static
• Activate
• AutoPort
• Dynamic
DataType Data type of the input (used when Type is static). String from enum:
• Any (Default)
• String
• Integer
• Long
• Decimal
• Boolean
• DateTime
• Object
• Buffer
• Password
• ReferenceType
DisplayName Text to be displayed in the GUI, defaults to Name if not defined. Optional, String
DefaultValue Default value serialized. Optional, any
Settings Extra settings to use to model the behavior of the field. These settings are different per type. See Mandatory settings per Input/Output Type. Optional, Object
Condition Expression (MathJS) that will be parsed to identify if this input is to be displayed.
Example: timerType != null && timerType != “CronJob”
Options, String

AutomationTaskOutputs Object#

Property Description Notes
Key Name of the output. Mandatory, String
Value Type of the value to emit.
• Note: To allow simplicity, two types of values should be accepted, one for most cases (string) and one for special and less frequent cases (object).
Mandatory, String from enum:
• Any (Default)
• String
• Integer
• Long
• Decimal
• Boolean
• DateTime
• Object
• Buffer
• Password
• ReferenceType
OR AutomationTaskOutputType

AutomationTaskOutputType Object#

Property Description Notes
Type Type of output port where:
Static – Same as using the value as string, but allowing the display name to be changed.
Success – The Task success output port emitted when it executed successfully. Only one allowed.
Error – The task error output port which emits the error that occurred during execution.
AutoPort – Activation of the output auto ports functionality for this task.
Dynamic – The outputs can be added/removed.
Mandatory, String from enum:
• Static
• Success
• Error
• AutoPort
• Dynamic
DataType Data type of the output (used when Type is static). String from enum:
• Any (Default)
• String
• Integer
• Long
• Decimal
• Boolean
• DateTime
• Object
• Buffer
• Password
• ReferenceType
DisplayName Text to be displayed in the GUI, defaults to Name if not defined. Optional, String
Settings Extra settings to use to model the behavior of the field. These settings are different per type. See Mandatory settings per Input/Output Type. Optional, Object
Condition Expression (MathJS) that will be parsed to identify if this output is to be displayed.
Example: timerType != null && timerType != “CronJob”
Options, String

Mandatory settings per Input/Output Type#

Input/OutputType Property Description Notes
AutoPort SettingKey Key of the settings where the value will be stored. Must be unique within the entire set of settings in the task. Mandatory, String
" Destination Input/Output to use when the new entry is created. By default, an input port should be sent to the “Input” and an output port should be sent to “Output”. Optional, String from enum:
- Input
- Output
- InputAndOutput
Dynamic SettingKey Key of the settings where the value will be stored. Must be unique within the entire set of settings in the task. Mandatory, String
TabName Text to display in the tab. Optional, String. Defaults to Inputs/Outputs, depending on the entry. Optional, String
CanAdd Flag indicating if the user is allowed to add new entries. Optional, Boolean. Defaults to false. Optional, Boolean
CanDelete Flag indicating if the user can remove existing entries. Optional, Boolean. Defaults to false. Optional, Boolean
CanSort Flag indicating if the user can reorder existing entries. Optional, Boolean. Defaults to false. Optional, Boolean
CaptionKey Name of the entry that will be used as caption of the item list. Mandatory, String
SubCaptionKey Name of the entry that will be used as sub-caption of the item list. Optional, String
LeafDefinition List of entries to render per entry. Mandatory, AutomationTaskSetting[]
ReferenceType ReferenceTypeName Type of entity to represent in the input/output. port Optional, String

Example for Static inputs and outputs:

Screenshot showing a configuration screen with mandatory settings for Tasks and Workflows, including a reference type named "workflow" with ID "691".

{
    "inputs": {
        "input1": {
            "type": "Static",
            "dataType": "Integer",
            "displayName": "input01Integer",
            "defaultValue": 10
        },
        "input2": {
            "type": "Static",
            "dataType": "Integer",
            "displayName": "input02Integer",
            "defaultValue": 12345
        },
        "Activate": {
            "type": "Activate",
            "dataType": "",
            "displayName": "Enable",
            "defaultValue": ""
        },
        "input3": "Boolean"
    },
    "outputs": {
        "output1": "String",
        "output2": {
            "type": "Static",
            "dataType": "Integer",
            "displayName": "output02Integer"
        },
        "output3": "DateTime",
        "Success": {
            "type": "Success",
            "dataType": ""
        },
        "Error": {
            "type": "Error",
            "dataType": ""
        }
    }
}

The task now has a set of inputs and outputs. The Success, Error and Activate are special cases, where they are defined by a particular type. All tasks should have Success, Error and Activate.

Example for AutoPort inputs and outputs:

![Here is the ALT text:

Screenshot showing a table with two rows, each representing an input/output type, with columns for "Input" and "Output".](../images/atl_example_empty_autoport_inout.png)

{
    "inputs": {
        "__inputs": {
          "type": "AutoPort",
          "dataType": "Any",
          "displayName": "Link here to add new",
          "settings": {
            "settingKey": "inputs",
            "destination": "Input"
          }
        }
    },
    "outputs": {
        "__outputs": {
          "type": "AutoPort",
          "dataType": "Any",
          "displayName": "Link here to add new",
          "settings": {
            "settingKey": "outputs",
            "destination": "Output"
          }
        }
    }
}

Notice also that the AutoPorts also dynamically adds a settings tab for inputs and outputs.

Screenshot showing a configuration page for input/output settings with an empty auto-port setting.

When linking new inputs or outputs, they will be shown in the corresponding tabs. The destination will inform you on what tab the link should be added.

Example for Dynamic inputs and outputs:

Screenshot showing a configuration screen with mandatory settings for Input/Output types.

{
    "inputs": {
        "dynamicInput": {
          "type": "Dynamic",
          "settings": {
            "settingKey": "_inputs",
            "tabName": "Dynamic Example",
            "canAdd": true,
            "canDelete": true,
            "canSort": true,
            "captionKey": "name",
            "subCaptionKey": "defaultValue",
            "leafDefinition": [
              {
                "name": "name",
                "displayName": "Name",
                "settingKey": "name",
                "dataType": "string",
                "settings": {
                  "disabled": false
                }
              },
              {
                "name": "description",
                "displayName": "Description",
                "settingKey": "description",
                "dataType": "string",
                "settings": {
                  "disabled": true
                }
              },
              {
                "name": "value",
                "displayName": "Value",
                "settingKey": "dataType",
                "dataType": "ComplexType"
              },
              {
                "name": "defaultValue",
                "displayName": "Default Value",
                "settingKey": "defaultValue",
                "dataType": "DynamicType",
                "settings": {
                  "dataTypeKey": "dataType"
                }
              }
            ]
          }
        }
    }
}

Notice that the Dynamic also adds a settings tab for displaying the dynamic. Notice also, the ComplexType and the DynamicType matching. This allows us to have a responsive matching between two types. If you want to dynamically add or modify the dynamic, through scripting, you should invoke the this.rebuildColumnTree() method to recalculate the tree of dynamic leafs.