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:
- Open the model properties page.
- Click on Configuration Variables.
- Click Add.
- Click in the Name column and enter
the variable name
Environment.
- Enter
TEST as default value in the Default Value
column entry field.
- Optionally add a description.

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
- Create a manual trigger followed by a manual activity
Starting Activity.
- Right-click the activity and select
Split Behavior > XOR.

- Create an activity named Activity Production Only.
This will be the activity to be performed in production mode only.
- Create another activity Continue
to be performed after the production activity or from the starting
activity directly.
- 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.
- 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:

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