arts: one for each composite role, similar to what is done for conditions. The goal provides flexibility of choice between different collaborations with the same goal to provide options for ensuring that reaching the goal can be achieved SO that the service can continue to execute correctly. For example, if one authentication pattern is not achievable, for example, because con- straints cannot be satisfied, another alternative with the same goal can be chosen SO that the service can execute correctly. 5.4.3 Global PESM Diagrams Graphically, a global PESM is used to depict the dynamic composition of collabo- rations according to the composition policy. In Figure 5.7, a PESM diagram for the tele-consultation service is given. The global PESM diagram and composition policies describe how the associated behavior of the subcollaborations should be How to Model Dynamic Service Composition Using UML 2.x PESM teleconsultation PDP1 Rule2: T: ? (Request registration, External, PatientT) PDP1_Rulel: C: Patient T.is a Patient of Doctor, T: ? (Request registration, External, PatientT) PatientT.NeedsAssistance, C: Patient T is a Patient of Doctor, ReceptionistT.onduty, TeleSvcDsk.online PatientT.AssistanceNotNeeded, G: PatientT.registeredByAssister, TeleSvcDsk.online ReceptionistT.assistedRegistrationComplete, G: Patient T.registered, eleSvcDsk.registrationComplete TeleSvcDsk.registrationComplete prs (registeree ->PatientT, pcrs (assisted caller -> Patient T, reg assister-> registrar TeleSvcDsk : registration ReceptionistT, assisting registrar -> TeleSvcDsk) : I aidedRegistration PDP4_Rule2: PDP4_Rulel: T: ! (RegistrationOK, TeleSvcDsk, T: ! (RegistrationOK, TeleSvcDsk, PatientT) ReceptionistT) C: Patient is a Patient of Doctor, C: PatientT is a Patient of Doctor, TeleSvcDsk.online, TeleSvcDsk.online, DoctorT. AvailableForConsultation, DoctorT. AvailableForConsultation Patient T.registered Patient T.registered G: TeleSvcDsk.svcAccessed, G: TeleSvcDsk.svcAccessed, DoctorT.consultationComplete, DoctorT.consultationComplete, Pati