ice possibilities, where all or some of the collaborations may have more concrete specializations as will be demonstrated in Section 5.7. In Rossebo and Runde [4] we defined a Backus-Naur Form (BNF) grammar for policy rules, which is given in Figure 5.5. Signal represents the actual content of a message, C-role and E-role are names, representing composite and ele- mentary roles (or in the case of a hierarchical PESM, subcomposite roles), respec- tively. Pred is a Boolean predicate, C-name is the name of a collaboration, and Cu is the name of a collaboration use. As can be seen from the definition, a policy rule consists of four parts: trigger, condition, action, and goal. The definition of these rules is derived from the event- condition-action rule paradigm of active database systems [13]. In order to ensure correct dynamic composition of a service, the system is obliged to execute the given action when a policy rule applies. An example of a global policy rule is given in Figure 5.6. In a policy rule, the trigger T and condition C together define when the policy rule is applicable. The trigger is the event of receiving or sending a message sent to/ from a composite role, which will then be the role discovering the trigger and <Policy rule > T : <Trigger> C : <Condition> A : <Action> G : <Goal> <Trigger > <Event> <Condition> Pred, C-role.Pred, C-role Pred} +, <Action> Cu ( E-role -> C-role { E-role -> C-role }+, ) : C-name <Goal> C-role.Pred { C-role.Pred }+, <Event> { ! | ? } <Message> <Message> ( Signal C-role , C-role ) Figure 5.5 Extended BNF syntax for global policy rules, with +, denoting one or more separated by commas with trailing comma optional, | denoting alternatives, and { } as meta parentheses. (With kind permission from Springer Science+ Business Media: J. E. Y. Rossebo and R. K. Runde. Specifying service composition using UML 2.0 and composition policies. In MoDELS 2008, Vol. 5301, LNCS, pp. 520-536. Springer, Berlin, 2008.) Service Delivery Platforms PDP4 Rule ! ( RegistrationOK, TeleSvcDsk, Pati