Oracle Waveset 8.1.1 Deployment Reference

rule Function

Calls a rule. The arguments to rule are passed by name using the argument element. The value of an argument can be specified with the value attribute if it is a simple string. The argument value can also be calculated with an expression by omitting the value attribute and instead writing an expression within the body of the argument element.

A <rule> element can also call another rule that dynamically calculate the name of another rule to call.

For more information on creating or calling rules in forms and workflows, see the chapter titled Rules.

Examples

The following expression returns the employee ID of the designated user.

<rule name=’getEmployeeId’>
    <argument name=’accountId’ value=’maurelius’/>
</rule>

<rule name=’getEmployeeId’>
   <argument name=’accountId’>
       <ref>username</ref>
   </argument>
</rule>

The following expression calls another rule that calculates the returned value.

<rule>
    <cond>
      <eq><ref>var2</ref><s>specialCase</s></eq>
      <s>Rule2</s>
      <s>Rule1</s>
    </cond>
    <argument name=’arg1’>
      <ref>variable</ref>
    </argument>
</rule>