SoaML - Simple Interface

From Training Material
Jump to: navigation, search

Simple Interface (an UML inteface) is usually used to model basic services.

Basic services are:

  • independent from the context
  • usually do not know who is the caller
  • do not call the caller back

Examples of basic services:

  • Data Services (e.g. CustomerAccount service containing interface with operations like getCustomerData, deleteCutomer, etc...)
  • Logic Services (e.g. Calendar service, which interface would contain operations like isLeapYear, dateSubtract, dateAdd, etc....)


Examples

Simple Interface Example.png Simple interface NobleProg example.png

Instructions

  • The type of the service port is the UML interface “CustomerAccountInterface” that has two operations getCustomerData and deleteCustomerData
  • Participant CRM provides the service, the participant ERP consumes the service
  • The CRM participant has the capability to offer the service
  • The CRM participant has two owned behaviors that are the methods of the operations provided through the CustomerAccountService service
  • The CustomerAccountInterface fully describe the service (no need for ServiceContract or ServiceInterface)
  • The <<ReqestPoint>> uses the conjugate port marked with the tilde "~" character (note that in the Sparx EA you need to mark it explicitly in options and show the element type, do not put the tilde character directly into the name of the port)

Exercises

  1. Define CalendarService and an interface with operations isLeapYear, dateSubtract, dateAdd
    1. Assume that the dates are passed as the ISO date string
    2. Model sample participants consuming and providing the service