RunCommand macro at scenario level

The RunCommand macro used to run a command on a Data source. This macro can be executed for Supply Planning or Database data sources at the scenario level.
This table lists the parameters used to execute the RunCommand macro at scenario level:
Parameter Details
Data Source The data source for which the command is executed. Possible values:
  • Supply Planning
  • Database
Command Text The command to execute for the specified data source.

The value for the Command field must be specified in this format: RunCommand (Data Source, Command Text).

Table 1. Example
Requirement Parameter
Run the "workflow: Solve" command on the "Production" data source. RunCommand("Production","workflow: Solve")

The command is executed against/for the specified Data source on successful validation and execution of the macro.

This table lists the Cycle Period status and the related validation messages:
Source Cycle Period status Source Scenario status Can Execute? Validation message
Pending N/A No Cannot run macro {0} because Cycle Period has status "Pending".
Running Any Yes N/A
Paused Any Yes N/A
Completed Any Yes N/A
Aborted Stopped Yes N/A
Archived Any No Cannot run macro {0} because Cycle Period has status "Archived”
Validation is performed when you execute the RunCommand macro. If validation fails, the macro is aborted, and the related error message is displayed. This table lists the error messages displayed for various validation failures:
Validation Condition Error Message
RunCommand supports data source type ‘Supply Planning’ or ‘Database’ only. The RunCommand macro requires a data source of type Supply Planning or Database.
Check the data source is valid. data source {0} cannot be found.
When Data Source type = Supply Planning, the second parameter must be a valid Supply Planning command. That means the parameter value must be in “workflow: workflowname” format. Else, the command is rejected and an error message is displayed. Command {0} is not a valid for Supply Planning.