It is generally considered the good practice to make services stateless – i.e. consumers of a service are not aware of what state the service is in. However, in specifying a service, it is often necessary to specify the allowable states to constrain how implementations of the service will behave. The S5 Viewpoint is a specification of those states and the possible transitions between them.
Usage
The intended usage of the S5 includes:
- Service behaviour specification.
Creating a Service States diagram
To create a Service States diagram:
- Click on Service States in the Action Artifact area, and then select Create New Diagram.
- You are creating a table for managing the state diagrams. Type a name for the table. You can create multiple tables based on different contexts (e.g. by phases, purposes, etc).
- This opens a table where you can create and manage state diagrams. Click on New Service State Machines Definition above the table to create a new row.
- Under the first column, select the context to create state diagram, which is a ServiceSpecification.
- Under the second column, create the state diagram(s). The diagram created will be added to the selected context element as a sub-diagram.