Passing parameters from and to MetaBot Logic
- Última actualización2020/05/07
Passing parameters from and to MetaBot Logic
As an Automation Expert, when you are creating automation that comprise a combination of TaskBots and MetaBot Logics, you would want to pass its parameter values from one to another for smooth functioning of your automation.
Automation Anywhere allows you to pass parameters from a Logic to other TaskBots, Logics, and Dll APIs. The reverse is also possible - you can pass parameters from TaskBots, Logics, and Dll APIs to Logics.
What is 'Passing of Parameters'?
When you create MetaBot Logic, you want to ensure that it can be optimally used in various TaskBots and MetaBot Logics. To achieve this, you first have to create variables with different parameter types - None, Input, Output, and InputOutput.
Each variable, based on its parameter type, is then used as an input parameter or output parameter or both in a TaskBot/ MetaBot Logic.
When it is used as an input parameter, you can add values to the variable or assign another variable as its value.
When it is used as an output parameter, you can only assign variables as its value. This will be read during automation execution.
This is passing of parameters from and to MetaBot Logic.
Refer Using MetaBot Logic in TaskBots and MetaBot Logics to know how to use variables as parameters.
Refer Variables - Parameter Types for details on types of parameters.
Passing parameters from Logic to TaskBot and from TaskBot to Logic
The table below shows the variable behavior when it is passed as a parameter from Logic to TaskBot and vice versa:
Variable type in TaskBot (T1) / Logic (L1) | Variable type in TaskBot (T2) / Logic (L2) | Behavior |
---|---|---|
Value (V1) | Value (V2) | V1 overwrites V2 |
List (L2) | V2 is converted to 1x1 list and is assigned V1's value | |
Array (A2) | V2 is converted to 1x1 Array and is assigned V1's value | |
Random (R1) | Value (V2) | V1 overwrites V2 |
List (L2) | V2 is converted to 1x1 list and is assigned V1's value | |
Array(A2) | V2 is converted to 1x1 Array and is assigned V1's value | |
List (L1) | Value (V2) | First index of the list is assigned when it is used outside of the loop. In loop, the value is assigned with reference to counter. If it is outside of the range, then first index is considered. |
List (L2) | V1 overwrites V2 | |
Array (A2) | V2 is converted to nx1 Array and is assigned V1's value | |
Array (A1) | Value (V2) | You have to input row and column of V1 and its value is assigned to V2 |
List (L2) | You have to input the column of V1 and its value is assigned to V2 | |
Array (A2) | V1 overwrites V2 |
Passing parameters from Logic to API Dlls and from API Dlls to Logic
The table below shows the variable behavior when it is passed as a parameter from Logic to API Dlls and vice versa:
Variable type being passed from Logic | Variable type of DLL API | Behavior |
---|---|---|
Value (V1) | Value (V2) | V1 overwrites V2 |
List (L2) | Not supported. Read-only cell | |
Array (A2) | Not supported. Read-only cell | |
Random (R1) | Value (V2) | V1 overwrites V2 |
List (L2) | Not supported. Read-only cell | |
Array (A2) | Not supported. Read-only cell | |
List (L1) | Value (V2) | First index of the list is assigned when it is used outside of the loop. In loop, the value is assigned with reference to counter. If it is outside of the range, then first index is considered. |
List (L2) | V1 overwrites V2 | |
Array (A2) | Not supported. | |
Array - A X B (A1) | Value (V2) | You have to input row and column of V1 and its value is assigned to V2 |
List (L2) | You have to input the column of V1 and its value is assigned to V2 | |
Array (A2) | V1 overwrites V2 when V2 is A X B type. If V2 is one dimensional, you have to input the column. |
Passing Credential Variables
To securely store sensitive information that is necessary to play automation, the Control Room user with Locker Admin permission creates 'Credential Lockers' comprising 'Credential Names' and 'Attribute Names'. These credentials and attributes are used by Bot Creators (Client users who create tasks), from Credential Lockers in various commands that require credential inputs.
These special category of variables are centrally stored in a 'Credential Locker' to which the Control Room user with Locker Admin will have exclusive access privileges.
While creating automation a Bot Creator, can pass the credential variables from a TaskBot to MetaBot Logic and from MetaBot Logic to another MetaBot Logic ONLY if the Control Room administrator enables the setting passing of credential variables from one TaskBot /MetaBot Logic to another TaskBot /MetaBot Logic in the Control Room.
If the setting is disabled after you have used the credential variables, upon saving the TaskBot /MetaBot Logic, an error message is shown.