Reputation: 7128
I want to show use of same algorithm as a black box in two-pass iteration. In first pass, I would pass a value of a flag f
as false
, and an array of one element as A[1..1]
, output of first pass would be B[1..N]
. In second pass, same algorithm would be used with f
as true
(to indicate second pass) with an input of A[1..N]
(fed from output B[1..N]
of first pass) whereas the output of second pass would be B[1..M]
Please help me drawing the UML Activity diagram for the same.
Upvotes: 1
Views: 450
Reputation: 36313
It's not a good idea to try "programming graphically". The algorithm you describe is better shown in meta code than in an activity diagram, as you already have seen. So what I'd do in your case is to have a single Action
(representing most likely some CallOperation
of some class. And the according behavior of the operation contains the description in either meta code or plain text (as you already stated above).
If for what reason ever you really want to "program graphically" you would need to use single actions for the assignments of the flag like this:
The A
and B
arrays would be just mentioned in the description of the single actions.
To actually show passing the A
and B
arrays you would need to add ActionsPin
s or Object
s with ObjectFlow
s between the single Actions
. Honestly, that would make the whole thing even more unreadable and hinder more than helping the reader:
Upvotes: 3