Creating the Model in the Portal Modeling Perspective

In a dynamic Web project designed to deploy Stardust models to run in the Stardust Portal, create a model, e.g. ConfigVarDemoWeb. For detailed information on creating dynamic Web projects for usage with the Stardust Portal, please refer to the Rapid Application Development guide.

Proceed as follows:

Creating the Workflow

  1. Create a manual trigger followed by a manual activity Starting Activity.
  2. Right-click the activity and create an XOR gateway.

  3. Create a follow-up activity named Activity Production Only. This will be the activity to be performed in production mode only.
  4. Create another XOR gateway to join the transition from the first gateway and activity Activity Production Only.

  5. Create a follow-up activity Continue to be performed after the production activity or from the starting activity directly.

  6. Assign the administrator as participant for the lane.

Entering a Condition and implicitly create the Configuration Variable

Now we enter a condition transition to the transition from the first gateway to Activity Production Only:

  1. Double-click the transition line in the diagram.
  2. In the transition condition property page dialog, enter the following Condition Expression:
    "${Environment}" == "PRODUCTION";
    To refer to the value of the variable, the variable name is escaped as $"Environment".

  3. The condition is now displayed in the diagram.

This reference to the variable via the transition condition creates a configuration variable accordingly. The configuration variable and the reference are reflected in the Configuration Variables tab of the model property page. Open the model property page and switch to the Configuration Variables tab. In the References part, the transition and its condition referencing to our Environment variable are displayed.

Configuration Variable
Figure: Configuration Variable displayed in Model Properties

Add TEST as default value for the configuration variable. If the variable is not changed, the model runs in test mode.

Add variable Environment.
Figure: Add variable Environment.