Creating the Model in the Eclipse Modeler

In a dynamic Web project designed to deploy Stardust models to run in the Stardust Portal, create a model, e.g. ConfigVarDemoEclipse. 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:

Adding the Configuration Variable

To add the configuration variable:

  1. Open the model properties page.
  2. Click on Configuration Variables.
  3. Click Add.
  4. Click in the Name column and enter the variable name Environment.
  5. Enter TEST as default value in the Default Value column entry field.
  6. Optionally add a description.

Add variable Environment.
Figure: Add variable Environment.

Please refer to chapter Using Configuration Variables in the Modeling Guide for details on adding variables to a model.

Creating the Workflow

  1. Create a manual trigger followed by a manual activity Starting Activity.
  2. Right-click the activity and select Split Behavior > XOR.

  3. Create an activity named Activity Production Only. This will be the activity to be performed in production mode only.
  4. Create another activity Continue to be performed after the production activity or from the starting activity directly.
  5. Add a role to the model and assign it as performer of all activities and the manual trigger. For detailed information on how to add roles and assign them, please refer to chapter Defining Roles and Organizations of the Support Case Example.
  6. Create a connection from the split joint of activity Starting Activity to activity Activity Production Only and one to activity Continue, as illustrated in the following screenshot:

  7. Enter a condition transition to the transition from the split joint to Activity Production Only by double-clicking the transition line in the diagram.
  8. 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".

This reference to the variable via the transition condition is reflected in the Configuration Variables section of the model property page. Open the model property page and switch to the Configuration Variable section. In the References part, the transition and its condition referencing to our Environment variable are displayed.