Actions

The Actions section specifies the list of actions that execute every time a trigger fires.

Defining actions

To define an action, click the action icon in the Insert Action ribbon group. The main ribbon contains commonly used actions. To see all available actions, click All Actions button. To see available commands over the selected action, right-click it and select command from the list.

UUID-e88c780c-20fd-4ac2-32c5-d87d9671e8ca.png

Nested actions

Some actions cannot be used on their own. Their specific functionality requires them to be nested below some other action. Use buttons in Action Order ribbon group to change action placement. Each action is identified with the ID number that shows its position in the list, including nesting. This ID number will be displayed in the error message so you can find the problematic action easier.

UUID-7cda050d-5e85-d9bd-6bf4-1e1b227b0fa3.png
[Note] Note

The Print Label action is a good example of such action. You have to position it under the Open Label action, so it references the exact label to print.

Action execution

The actions in the list execute once per trigger. Listed actions are executed from top to bottom, so the listing order of actions is important.

There are two exceptions. The actions For Loop and Use Data Filter execute nested actions for multiple times. For loop action executes for as many times as defined in its properties, and the Use Data Filter for as many times as there are records in a data set returned from the associated filter.

Loftware runs as service under a specified Windows user account and inherits security permissions from the account. For more details, see the section Running in Service Mode in Loftware Automation User Guide.

Conditional actions

Each action can be set as a conditional action. Conditional action only runs if the provided condition allows it to be run. Condition is a single line script (VBScript or Python). To define the condition, click the Show execution and error handling options in action properties to expand the possibilities.

UUID-302dd779-eb43-b16d-6216-fe15c7b66dc2.png

In this case, the action executes only if the previous action has completed successfully, so the internal variable ActionLastErrorID has value 0. To use such condition with internal variables, you must first enable the internal variable.

Identifying actions in configuration error state

If an action is not completely configured, it is marked with a red exclamation icon. Such actions cannot execute. You can include such action in the Action list, but you will have to complete the configuration, before you can start the trigger. If one of the nested actions is in error state, all parent expansion arrows (to the left of the action name) are also colored red as an indicator of sub-action error.

UUID-eee99ccf-d83f-d7c4-7520-a2bb7bf0f690.png

In this case, the Open Label action reports configuration error. There is no parameter specified for the label name. The red exclamation icon pops up next to the erroneous parameter in the action itself, in the action list, in the Actions tab, in the trigger tab, and in the Configuration Items tab. This makes the issue easy to identify.

Disabling actions

By default, every newly created action is enabled and executes if a trigger fires. You can disable the actions that you don't need, but still want to keep the configuration. A shortcut to action enabling & disabling is a check box on the right hand side of the action name in the list of defined actions.

UUID-07cad230-602f-d53f-4c3a-1c8bacbc2888.png

In this case, the Print Label action is still defined in the actions list, but has been disabled. Currently, it is not needed and will be ignored during the processing, but you can easily re-enable it at any time.

Copying actions

You can copy an action and paste it back into the same or any other trigger. You can use standard Windows keyboard shortcuts, or right-click the action.

Right-clicking the action displays the available contextual commands available for the currently selected object.

Automation Builder also enables you to make a selection of multiple actions, and to perform copy, paste and delete operations with them. To make a selection, Use Ctrl/Shift + Click on the required actions.

[Note] Note

Multiple actions can only be selected under the same parent action, i.e. all selected actions must be on the same level.

Navigating the action list

Use your mouse to select the defined action and click the respective arrow button in Action Order group in the ribbon. You can also use keyboard. Cursor keys move the selection in the action list, Ctrl + cursors keys move the action position up and down, and also left and right for nesting.

Describing the actions

About group allows you to describe all Loftware actions.

  • Name: by default, action name is defined by its type and is therefore not unique. Define a custom name to make it instantly recognizable among other actions, in logs and in potential error messages.

  • Description: user notes for the selected action. Description is displayed in actions explorer.

  • Action Type: read-only field which displays the type of action.