Using Custom Scenario Types
Custom scenarios can be employed to control what a user is able to do in the scenario through the UI.
This capability enables developers to add logic into their models that will only display certain controls to the user after a scenario has been fully configured.
The appearance and the available controls are configured in the companion file. These settings are matched to the model declaration using the scenario id, for more see Model Declaration.
Customizing the Default Scenario
A developer can globally change the behavior and style of the all scenarios by editing the default 'SCENARIO' type.
<scenario-type id="SCENARIO" name="Optimization"> <shelf-pill-style … ></shelf-pill-style> <state-icons … ></state-icons> <actions … ></actions> </scenario-type>
Adding New Custom Scenario Types
Additional scenario types can be added by declaring a new scenario-type with a unique id and name. (Unicity of the id is enforced by the system, the name is used to identify the type in the user interface so it is recommended that this is unique too.)
<scenario-type id="MYCUSTOMSCENARIO" name="Custom"> <shelf-pill-style … ></shelf-pill-style> <state-icons … ></state-icons> <actions … ></actions> </scenario-type>