Initializing help system before first use

# Using Custom Scenario Types

Custom scenarios can be employed to control what a user is able to do when the scenario is displayed in the Scenario Manager, and when it is loaded onto the shelf in Xpress Insight.

The appearance and the availability of the controls are configured in the companion file, for more see Example Scenario Type Configuration. These settings are matched to the model declaration using the `scenario-type id`.

For more see Declaring Custom Scenario Types in the Mosel Model.

## Using Custom Scenario Types Programmatically

Custom Scenario Types can be created programmatically in Mosel using the following code as an example.

    declarations
        thisscenario: insightiteminfo
      end-declarations

      ! get the scenario type of the current scenario.
      thisscenario:= insightgetiteminfo(getparam("insight_scenario_path"))      ! could also use ‘.’
      ! dispatch based on scenario type and exec mode
      mmreflect~callproc(string(tolower(thisscenario.type + insightgetmode)))

Note: As of PI21.3 (July 2021), `mmreflect` replaces `xreflect`.

## Declaring New Custom Scenario Types

Additional scenario types can be added by declaring a new scenario-type in the Mosel model with a unique id.

The name is used to identify the type in the user interface so this should be unique. The name of the scenario type can also be configured in the companion file.

The id will be used if a name is not supplied (Unicity of the id is enforced by the system.)

    <scenario-type id="MYCUSTOMSCENARIO" name="Custom">
    <shelf-pill-style
           …
        ></shelf-pill-style>
    <state-icons
            …
    ></state-icons>
        <actions
            …
        ></actions>
    </scenario-type>

## Customizing the Default Scenario

A developer can change the default behavior and style by editing the `SCENARIO` type in the companion file. For example, an app developer could assign a different name to the default scenario to make it appear to be a different type in the UI. It could also be configured to disable certain operations.

    <model-companion>
    …
        <scenario-types>
            <scenario-type id="SCENARIO" name="Optimization">
            <shelf-pill-style
                …
                ></shelf-pill-style>
            <state-icons
                …
            ></state-icons>
                <actions
                …
                ></actions>
            </scenario-type>
        </scenario-types>
    </model-companion>

Parent Topic Custom Scenario Types

© 2001-2026 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.