Example: Complex ServiceInterface from "CallBack" Collaboration Pattern
Derive a ServiceInterface with provided and required interfaces when Service Collaboration
roles interact by using the callBack interaction pattern.
Relationships
Main Description

Guideline: Identify Service Interfaces from Collaboration Role Interaction Patterns presents four rules for describing ServiceInterfaces based upon pairs of interacting roles in Service Collaborations. The rule illustrated here is:

Rule 4. Create a ServiceInterface with a provided interface and a required interface when the provider role responds back to the consumer role with a callBack message.  In this case, the provider role requires that the user be able to accept messages; therefore, the provider requires an interface with the consumer. 

In Figure 1, "role1" sends a message to "role2," and "role2" responds with a callBack. From the perspective of the provider, "role2," two interfaces are involved:

  • A provided (realized) interface that offers the operation: "do This"
  • A consumed (required) interface that offers the operation: "callBack"

The ServiceInterface might be created and configured as shown in Figure 2.

Figure 1.   The callback collaboration pattern

  

Figure 2.  Modeling the structure of a complex service interface