Sun Identity Manager Deployment Reference

Referencing Variables

You can use <ref> expressions in a rule to reference the values of external variables. The context in which the rule is used determines the names of the available variables.

In the following example, the form uses a rule to calculate an email address. The form defines the global.firstname and global.lastname fields, and the rule references those fields. The email address is calculated by concatenating the first letter of global.firstname with global.lastname and the string.

Example 4–10 Calculating an Email Address

<Rule name=’Build Email’> 

The next example shows how a workflow uses a rule to test whether a transition to a particular activity should be taken. This workflow defines a user variable that contains the User view. The rule returns true if any simulated resources are assigned to this user or returns null if no simulated resources are assigned. The workflow engine interprets null as false and would consequently not take the transition.

Example 4–11 Testing a Transition

<Rule name=’Has Simulated Resources’>