Commands
Commands are used to either create a new instance or manipulate an already existing instance of a root entity. Only root entities can have commands. A command can be added on the instance page of a root entity by using the Add Command capability which can be found in the Associated Commands at this Level section.
Command types
Solution Designer provides two different command types for root entities:
Factory Command: This type of command will be used to create new instances of the root entity to which it is assigned
Instance Command: This type of command is used to manipulate the current state of an existing instance of the root entity to which it is assigned
Both command types accept an Input entity (new or existing) and can raise Business Events as well as Business Errors.
Create commands
Commands are defined using the following master data:
Local Identifier: Identifier of the command. this value must be unique within the namespace and cannot be changed afterwards. Please note that only the characters A-z (without special characters), digits and the special character "_" are permitted for naming fields! Furthermore, identifiers may not begin with a digit (required)
Label: Label of the command (optional)
Short Label: Short label of the command (optional)
Notes: Useful information regarding the command definition (optional)
Edit commands
You can edit a command by visiting a Root Entity's instance page and clicking on the Command in the Associated Commands at this Level section.
Edit master data
You can edit the Master Data using the Info capability and navigating to the section Master Data.
The following fields can be edited:
Label
Short Label
Notes
Add input entity
It is possible to assign an Input entity to a command by either clicking on Create new private entity or Select existing entity in the Input section of the command's instance page. To add properties to the input entity click on the Add capability and choose
Create new property
Associate existing property
See properties for further details on creating properties.
Add business events
To add a Business Event to a command that will get published each time the command is executed, click on Add event in the Business Events section of the command's instance page. There are two options when adding an Event to a command:
Add new event
Add existing event
Regarding already existing events, a list of all the events that have been created in a project is shown. It is also possible to search for a specific event using the Search capability. One or more events can be selected in order to be added to the command.
Read more about events.
Add business errors
To add a Business Error to a command that will get returned each time the command cannot be executed, click on Add error in the Business Errors section of the command's instance page. There are two options when adding an Error to a command:
Add new error
Add existing error
Regarding already existing errors, a list of all the errors that have been created in a project is shown. It is also possible to search for a specific error using the Search capability. One or more errors can be selected in order to be added to the command.
Read more about business errors.
Delete commands
You can delete a command by using the Delete capability in the Associated Commands at this Level section of the root entity's Overview page or by using the Details view of a command. Alternatively, you can use the Info capability to access the Details view and there you can use the Delete capability.