Shared Arrays


Like variables, arrays are used to represent data in a task that may be different each time a task runs. But unlike standard variables, arrays can contain multiple rows and optionally multiple columns. In AutoMate, arrays have the ability to become ā€¯shared", which means they are accessible throughout an entire workflow. Unlike normal arrays that are created and shared within a single task, the value of a shared array can be read by other objects or modified by other tasks that reside in the same workflow.

Shared arrays are declared at the workflow level. This informs the workflow that the contents of the array can be shared between all objects in the workflow. For example, if an array created and altered in Task A running on Agent A, is declared by the workflow as a shared array, the values of that array can be retrieved and modified in Task B, C or D running on other Agents within the same workflow.

Creating & Managing Shared Arrays

In order for an array to be declared as a shared array, it must be added to the Shared Arrays tab of the Workflow Designer.

To add a shared array to a workflow:

  1. From the Workflow Designer, select the Shared Arrays tab.

  2. Right click anywhere inside the Shared Arrays section. This will display a pop-up menu. Select the Add Array option as shown below, circled in red.

  1. A dialog titled Workflow Array appears as shown below.

  2. Enter the required information then click OK to save and close.

To delete an existing shared array:

  1. From the Shared Arrays tab, right-click the array to delete. To select more than one array, hold down CTRL during selection.

  2. Select Delete Array from the right-clcik menu that appears.

  3. To delete all selected arrays, select Delete Selected Arrays.

To edit an existing shared array:

  1. From the Shared Arrays tab, right-click the array to edit.

  2. Select Edit Array from the context menu that appears.

  3. The Workflow Array dialog appears.

  4. Make the appropriate modifications and click OK to save changes.

To rename an existing shared Array:

  1. From the Shared Arrays tab, right-click the array to rename.

  2. Select Rename Arrays from the context menu that appears.

  3. Enter a new name for the array. Make sure that associated workflows or tasks point to the new array name, otherwise an error will occur during execution.

See Also

About Datasets | Workflow Designer | Multi-machine Workflows | Shared Arrays | Shared Variables | Expression Builder | Constants