Sparx Systems Forum

Enterprise Architect => Uml Process => Topic started by: Harro_Kremer on July 20, 2004, 04:10:28 am

Title: Activity diagram: multiple instance of same object
Post by: Harro_Kremer on July 20, 2004, 04:10:28 am
In my activity diagram a document is received (represented by an object) and, depending on 2 decisions, "routed" to two different activities. In real life, the document is not changed.

When modelling this using an activity diagram, EA limits the number of instances of an object to 1, rather than the 3 I'd like to use.

1) What is the best way to model my activity diagram?

2) Does this constraint stem from the UML specification or is particular for EA?
Title: Re: Activity diagram: multiple instance of same ob
Post by: sargasso on July 20, 2004, 04:38:35 pm
1) In an activity diagram the links between behavioral elements (activities, sub-activities, actions, events and decisions) are control flows or object flows. Links between objects and these behavioral elements are dependencies (i.e. this action depends on object document, etc).
Thus, you dont "need" more than one instance of the document object in the diagram.
At a guess, your activity model begins with an event "Document arrives", drawn using a Receive icon.  This has a control flow to Activity (or Action) "Receive", which processes the decision as to which of "Action A" or "Action B" will be sent the document.  There are two control flows out of Receive to Action A and Action B, each having a constraint ("guard") "actionable by Action A" or "actionable by Action B" respectively, and each of these has control flows leading to a "FlowFinal" termination element.  Something like:
 
Code: [Select]
                             >Document arrives]
                                          |
                    [Receive]
                /                                              \
 {actionable by A}  {actionable by B}
                    |                                                           |
              [Action A]                  [Action B]
                                          \                                            /
                             (Flow Final)

Now you can add one instance of a document object with 3 dependency links to Receive, Action A and Action B  and voila problem solved.

2) Dunno - I think its an early UML restriction? There was no way to indicate that a diagram element was a "copy".

hth
Bruce