Activity Beta : two arrows to a single activity?

+1 vote
asked Feb 5, 2015 in Wanted features by MAV (460 points)
retagged Feb 5, 2015 by plantuml

Hello guys,

As others, I would like to draw activity diagrams in which two arrows can be pointing to a single activity.

I read different messages in the Q&A about this topic and I would like to know if the GOTO feature has been implemented or not.

If it is, what is the synthax?

An example of activity diagram with this scenario : http://www.zimagez.com/zimage/examplemultiplearrows.php

Thx,

Mathieu

1 Answer

0 votes
answered Feb 5, 2015 by plantuml (223,540 points)

No, Goto is still on the todo list.

We know that this is a very asked feature, but it needs a lot of work.

This may sound strange, but there is no way of representing your example in a programming language (Java/C/PHP/C##/C++...) without repeating "activity1".

You will have to write something like:

if (condition1()) {
  if (condition2()) {
    activity2();
  } else {
    activity1();
  }
} else {
  activity1();
}

This impossibility to write your algorithm without repeating activity1() is the key of the issue here.

Somehow, you have to break execution flow, and this is not (yet) possible with PlantUML.

 

 

commented Mar 10, 2015 by carolg (100 points)
I have the same need than Mathieu. Thanks
...