跳转至

Automation Tasks Library#

🔒 Administration.AutomationTasksLibrary

🔒 AutomationTasksLibrary.Show

An Automation Task Library is a set of metadata that contains sufficient information to integrate automation tasks to be used in the Automation Workflow Designer without the need of any coding or development skills. It is also intended to allow you to see the configured settings of a Task that was created in earlier versions of the installed system.

Each Automation Tasks Library will use the existing packages in the configured repository, which can be one of the options configured under the /Cmf/System/Configuration/ConnectIoT/RepositoryLocation configuration entry. Those packages will contain metadata information that can be used to configure the tasks library and allow it to be loaded in the Critical Manufacturing MES.

Warning

Multiple libraries can be created that use different versions of the same package. However, there can only be one package set as default for each package name loaded in the system.

Default Automation Tasks Library#

There can only be one default Automation Tasks Library for each combination of package and its respective version. When you create a new Automation Tasks Library and set it as default, the previously default library will reset the default flag.

Metadata example#

Below you can see a simple example of the metadata configuration that is located in the package.json file in the package used as a base for the Automation Tasks Library, as it is displayed on the entity page:

Info
    "metadata": {
      "converters": [
        {
            "name": "MyConverter",
            "class": "AnyToConstantConverter",
            "inputType": "String",
            "outputType": "Boolean",
            "parameters": {
                "argumentOne": "Integer",
                "argumentTwo": {
                    "displayName": "MyAnyToConstantConverter",
                    "dataType": "Integer"
                },
                "firstArray": {
                    "displayName": "Something",
                    "dataType": "Enum",
                    "infoMessage": "Select the logical operation to perform",
                    "enumValues": [
                        {
                            "And": "Logic AND"
                        },
                        {
                            "Or": "Logic OR"
                        }
                    ]
                },
                "secondArray": {
                "dataType": "Enum",
                "enumValues": [
                  "a",
                  "b"
                ]
              }
            }
          }
        ],
        "tasks": [
          {
            "name": "My New Task",
            "displayName": "(ATL) Task",
            "class": "SendFujiNeximReplyTask",
            "iconClass": "icon-core-tasks-connect-iot-lg-drivernotification",
            "iconSVG": " M305.7 442.9H694.3V374.3H305.7V442.9zM305.7 237.1H694.3V305.7000000000001H305.7V237.1zM305.7 511.4H694.3V580H305.7V511.4zM831.4 854.3V145.7000000000001C831.4 120.5 810.9 100 785.6999999999999 100H214.3C189.1 100 168.6 120.5 168.6 145.7000000000001V624.1C168.6 624.7 168.8 625.3 168.8 625.9000000000001L168.6 625.7V671.4000000000001V717.1L351.4 900H416H419.9H785.5999999999999C811 900 831.4 879.5 831.4 854.3zM762.9 831.4H397.1V717.1C397.1 691.9000000000001 376.6 671.4000000000001 351.4000000000001 671.4000000000001H237.1V168.5H762.8000000000001V831.4z",
            "isProtocol": true,
            "isController": false,
            "lifecycle": "Productive",
            "lifecycleMessage": "Productive Task",
            "dependsOnProtocol": "[@criticalmanufacturing/connect-iot-driver-fujinexim]",
            "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": ""
              }
            },
            "settings": {
              "General": {
                "Section1": [
                  {
                    "name": "Setting 1",
                    "displayName": "Enum 1",
                    "settingKey": "EnumKey1",
                    "enumValues": [
                      "Value1",
                      "Value2",
                      "Value3"
                    ],
                    "defaultValue": "Value1",
                    "infoMessage": "Info message Enum"
                  },
                  {
                    "name": "Setting 2",
                    "displayName": "DisplayName 2",
                    "settingKey": "Second",
                    "dataType": "boolean",
                    "defaultValue": true
                  },
                  {
                    "name": "Setting 3",
                    "displayName": "DisplayName 3",
                    "settingKey": "Third",
                    "dataType": "string",
                    "defaultValue": "Default 3",
                    "settings": {
                      "infoMessage": "Random info message",
                      "infoMessageLeftAligned": true
                    }
                  }
                ]
              },
              "Tab2": {
                "Section1": [
                  {
                    "name": "Setting 1",
                    "displayName": "DisplayName 1",
                    "settingKey": "Fourth",
                    "dataType": "boolean",
                    "defaultValue": false,
                    "infoMessage": "Info message Object",
                    "settings": {
                      "infoMessageLeftAligned": true
                    }
                  },
                  {
                    "name": "Setting 2",
                    "settingKey": "Fifth",
                    "dataType": "integer",
                    "infoMessage": "Info message Number",
                    "defaultValue": 19,
                    "settings": {
                      "min": 2,
                      "max": 20,
                      "infoMessageLeftAligned": true
                    }
                  },
                  {
                    "name": "Setting 3",
                    "displayName": "Enum2",
                    "settingKey": "EnumKey2",
                    "infoMessage": "Random value",
                    "enumValues": [
                      "Value4",
                      "Value5",
                      "Value6"
                    ]
                  }
                ],
                "Section2": [
                  {
                    "name": "Setting 4",
                    "settingKey": "Sixth",
                    "dataType": "String",
                    "defaultValue": "Default Setting 4"
                  },
                  {
                    "name": "Setting 4",
                    "settingKey": "Seventh",
                    "dataType": "object",
                    "infoMessage": "Info message Object",
                    "defaultValue": {
                      "test": "Random number test",
                      "testInt": 55555
                    },
                    "settings": {
                      "infoMessageLeftAligned": true
                    }
                  }
                ]
              }
            }
          }
        ]
      }

The Automation Tasks Library page is available in the Administration page group. All task libraries can be used with any of the Automation Controllers and subsequently in Automation Workflows.

Sequence Of Steps#

The necessary steps for correctly configuring and using an Automation Tasks Library is the following:

  1. Configure the RepositoryLocation in the Configuration menu under the Administration section. For more information, see System Configuration Entries.
  2. Create the Automation Tasks Library.