[ Team LiB ] Previous Section Next Section

Pins and Transformations

Actions can have parameters, just as methods do. You don't need to show information about parameters on the activity diagram, but if you wish, you can show them with pins. If you're decomposing an action, pins correspond to the parameter boxes on the decomposed diagram.

When you're drawing an activity diagram strictly, you have to ensure that the output parameters of an outbound action match the input parameters of another. If they don't match, you can indicate a transformation (Figure 11.8) to get from one to another. The transformation must be an expression that's free of side effects: essentially, a query on the output pin quary that supplies an object of the right type for the input pin.

Figure 11.8. Transformation on a flow

graphics/11fig08.gif

You don't have to show pins on an activity diagram. Pins are best when you want to look at the data needed and produced by the various actions. In business process modeling, you can use pins to show the resources produced and consumed by actions.

If you use pins, it's safe to show multiple flows coming into the same action. The pin notation reinforces the implicit join, and UML 1 didn't have pins, so there's no confusion with the earlier assumptions.

    [ Team LiB ] Previous Section Next Section