3.6.4Process services by activity diagram

These services have an implementation described in activity. These models represent the « business rules », manipulating the « business objects » through method calls, loop calls, existing service calls….

Then, it is possible to create services with various input parameters and to define a type for each of them, as well as the service return type.

The service as well as its activity diagram must have the same name.

output_html_mf4355c3.png

Figure 1 : process stereotyped service representation

Stereotype applicable to process operation

  • process

Operation described in an activity diagram.

Rules

  • Parameters are optional.
  • The return type must be filled, but may be “void”.
  • A process service must be represented by an activity diagram: For each process service there must be an activity diagram with the same name as the operation included in the service. Inversely, an activity diagram must be associated with a process service.

Activity diagrams and process services

Activity diagrams are used to represent a process service implementation modeling. Activity diagram elements are contained in a « PK_SERVICE » stereotyped package.

output_html_32a3d3b5.png

Figure 2 : A process service representation

Design items

output_html_4faf4a7f.png Initial node

output_html_522c50b1.png Call operation action

output_html_m6b8b15fe.gif Object declaration

output_html_601b06b6.png Control flow.

output_html_3f43a787.png Final node

Rules

  • Diagrams always start with an initial node and finish with a final node.
  • The first call must be the operation stereotyped “Process”.
  • A parameter call in a pin in must by declared in an “Object declaration” or in a previous pin out.
  • Collaborations containing activity diagrams must be contained in a « PK_SERVICE » stereotyped package.

Call composition and rules

Calls are made of « Business Object » methods or of other methods coming from other services. A call return must contain an instance name put in the « recurrence ». The instance name can be used again as parameter for another call.

output_html_67f426bb.png

Figure 3 : Instance name in process service

Condition

output_html_m7c4582ee.png Decision.

After a Call operation action, a decision can be modeled. The decision outgoing transitions carry the condition and are described in the [guard]. The action script in use is the operators found in Java (==, <>, !=, etc.) in addition to simple operation such as getters. The [weight] is used to define the order of the decision, min weight to max weight.

  • All decisions must be associated to a corresponding junction.
  • The weight property must be filled for all the outgoing transitions.

output_html_m7cdd95ef.png

Figure 4 : Condition in process service

Loop

output_html_34793e20.pngExpansion region.

An expansion region is used in an activity diagram to create a loop. It takes a list to scan as input.

An expansion region must have an incoming flow and an outgoing flow. Possible incoming flows are: Initial node, Call operation Action, decision node and another expansion region. Possible outgoing flows are: final node, Call operation Action, decision node and another expansion region.

In the Expansion region body a sub-part of the activity diagram is defined. This sub-diagram contains the detailed actions to process inside the loop. It starts with an initial node and finishes by a call operation action.

output_html_m5a9d0200.png

Figure 5 : Loop in process service

Specific code

  • Opaque action

An opaque action is an operation that contains raw code. 


BLU AGE is a registered trademark of NETFECTIVE TECHNOLOGY S.A. - Trademarks are property of their respective owners
Do not copy or divulge without written permission