UML之Activity Diagram

A simple example of an activity diagram

A subsidiary activity diagram

Invoke the subsidiary activity

If you want to show who does what, you can divide an activity diagram into partitions, which show which actions one class or organization unit carries out.

A signal indicates that the activity receives an event from an outside process.

As well as accepting signals, we can send them. This is useful when we have to send a message and then wait for a reply before we can continue.

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 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.

An expansion region marks an activity diagram area where actions occur once for each item in a collection.

A flow final indicates the end of one particular flow, without terminating the whole activity

猜你喜欢

转载自gstarwd.iteye.com/blog/630291