[ Team LiB ] Previous Section Next Section

Decomposing an Action

Actions can be decomposed into subactivities. I can take the delivery logic of Figure 11.1 and define it as its own activity (Figure 11.2). Then I can call it as an action (Figure 11.3 on page 121).

Figure 11.2. A subsidiary activity diagram

graphics/11fig02.gif

Figure 11.3. The activity of Figure 11.1 modified to invoke the activity in Figure 11.2

graphics/11fig03.gif

Actions can be implemented either as subactivities or as methods on classes. You can show a subactivity by using the rake symbol. You can show a call on a method with syntax class-name::method-name. You can also write a code fragment into the action symbol if the invoked behavior isn't a single method call.

    [ Team LiB ] Previous Section Next Section