CreateScenario macro
The CreateScenario macro is used to create the specified Scenario and run the
initialisation macro, if specified. This macro is executed at cycle period level.
For executing the macro, the value in the Command field must be specified in this format:
CreateScenario(Name, Module, Workflow, [linked to scenario], [initialisation macro], [users], [roles])
Note: The optional parameters are specified in [ ].
This table lists the parameters that are used to determine the scenario to be created:
Parameter Name | Description |
---|---|
Name | The name of the scenario to be created. |
Module | The module in which the scenario to be created. |
Workflow | The process assigned to the scenario. |
Linked to scenario | The scenario to which the new scenario to be linked. Note: If the value is not specified, the existing scenario is not linked to the new
scenario.
|
Initialisation macro | The macro to be run when the scenario is created. Note: If
the value is not specified, the initialisation macro is not run.
|
Users | The name of the users who can access the scenario. Note:
|
Roles | The user roles who can access the scenario. Note:
|
This table lists the examples of the CreateScenario macro:
Requirement | Syntax |
---|---|
Create scenario "New Budget" in the Finance module with assigned process "Finance Scenario". Access to the newly created scenario is assigned to user "amy" | CreateScenario("New Budget","Finance","Finance Scenario","","","amy",""). |
Create scenario "Extra Shift" in the Supply module with assigned process "Supply Scenario", linking to the existing scenario "D-Upside" in the demand module. Access to the newly created scenario is assigned to SupplyAdmin role. | CreateScenario("Extra Shift","Supply","Supply Scenario","D-Upside","","","SupplyAdmin"). |
Create scenario "Final Plan" in the Integrated module with assigned process "Integrated Scenario", linking to the existing scenario "S-Upside" in the supply module and initialise with the macro "Init Integrated Scenario" to populate data. Access is assigned to user "sopadmin" and roles IntegratedAdmin and ProcessAdmin. | CreateScenario("Final Plan","Integrated","Integrated Scenario","S-Upside","Init Integrated Scenario","sopadmin","IntegratedAdmin, ProcessAdmin"). |