Example: Simple Interface from the Request-Response Collaboration Pattern
Derive either a UML interface or a ServiceInterface with a single provided interface
when two service collaboration roles interact by using the request-response 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 3: Create either a simple UML interface or a ServiceInterface with only a provided interface when all consumer-provider communication uses a "request-response" collaboration pattern. 

In Figure 1, we have a consumer, "role1," and a provider, "role2." They communicate by using a simple request-response collaboration pattern. For example, "role1" calls operations that are provided by "role2," and "role2" responds by using conventional operation returns. Here, there is no complex interaction protocol between the service consumer and the service provider.

From the perspective of the provider, we have discovered either a simple UML interface or a ServiceInterface with a single provided interface. In this instance, we have rendered this as a ServiceInterface with a single provided (realized) interface. This is shown in Figure 2.

Figure 1.  Interaction pattern that yields a simple service interface

 



Figure 2.  Static model of the simple service interface

More Information