A rule set (policy) can be called inside an orchestration by using the Call Rules shape. Within an orchestration, you can use the Call Rules shape to invoke a policy. The policy on its turn, invokes the rule engine which operates on the rules in the policy. The rules engine can also be programmatically called from the expression code, for example, in an Expression or Message Assignment shape. The following diagram illustrates an orchestration calling the rule engine:
The difference between calling rules from the Call Rules shape and calling rules from the Expression shape is that with the Call Rules shape the latest version will always be called, while with the Expression shape older versions will be called. The Expression shape offers more flexibility when it comes to calling rules. However, the Call Rules shape is the most common and recommended way to invoke a policy from an orchestration.
In this recipe, you will:
Create an XML schema
Create a policy using...