This functionality is only available for certain module packages.

You are here: Concepts > IT philosophy > Commands and actions

Commands and actions

Commands are objects that have exactly one method, called an ‘execute’ method. A sequence of methods can be called by assembling a list of commands. Such a list is used, for example, in connection with SequenceSelectionActions.

The plug-ins of the system provide commands via system libraries:

Management tasks, e.g. activating and deactivating the formula cache (Start/StopFormulaCacheCommand) or saving changes (SaveObjectCommand), are provided as atomic commands. These are then assembled into a sequence to automate a workflow.

This fine-granular division into commands makes sense so as to provide options for performance optimization (e.g., use of an active formula cache for several commands, etc.).

Actions connect the user interface (UI) to the application logic.

The Action system object is the superclass for all future options that will be available when calling application-logic commands from the user interface.

Thus far, the types provided by the system areSelectionActions, which always require selecting the object or objects for which an action is to be carried out. In the future, there may also be actions that don’t require selection, and hence function ‘globally’.

A SelectionAction takes a set of selected objects (selectedEOs, usually a multi-selection) and transfers it to its internal run method

SelectionActions have the following attributes:

Note: To make this change visible, the view must be closed and re-opened (or EEC must be restarted).

Finding SelectionActions:

When modifying a pop-up structure that consists of many actions, it is important to ensure that it is possible to navigate from a pop-up entry to the corresponding action. This can be achieved by executing the action via the context menu while holding down the [CTRL] key.

SelectionActions can be adjusted in any manner via scripts. But customizing the UI does require scripting expertise in this case. Scripts also have the disadvantage that the script code specifies when to call which commands, for example. The relationship between actions and commands is not modeled, and therefore cannot be navigated.

For defining simple actions, the system object SequenceSelectionAction has been defined. It allows for the specification in table form of a sequence of Commands.

The relationships between actions and commands are modeled for SequenceSelectionAction. This means that it is possible, for example, to use standard mechanisms (ALT+ mouse) to navigate from the table with commands (see the above screenshot) directly to the commands.

When a SequenceSelectionAction is executed, a script is created automatically from the modeled sequence of commands in the background, and then executed as a general SelectionAction.