Need a way to color and number different routes on an activity diagram

+3 votes
asked Apr 22, 2016 in Wanted features by boshka (1,310 points)
Ok, I have a great activity diagram.

Now I need to indicate (with color) all possible routes on the diagram, and number each colored route as a scenario. Is it possible?

like

start

:do something;

if(a)then(yes)

:do a;

else(no)

:do b;

endif

stop

 

So, in addition to the arrows that this will draw, i need 2 more colored routes (arrows from start to end) and need a way to refer to them by number.

So that I have: main diagram, then over it route 1 (red) - going from start throuh branch(yes) to the end, and route 2  (blue) - going from start throug branch (no) to the end.

So start and end will have multiple colored arrows.

Ideally i want to have as many routes as I need (10-20).

The routes then will be attached to use cases description etc. and used to prepare the test cases.

Could you help with this?

Thank you!

1 Answer

0 votes
answered Apr 22, 2016 by plantuml (134,510 points)

I'm not sure to fully understand your need.

Speaking about arrow colors, you can use:

start
-[#blue]->
:do something;
-[#blue]->
if(a)then(yes)
-[#blue]->
:do a;
-[#blue]->
else(no)
:do b;
endif
-[#blue]->
stop

Is this what you are looking for ?

commented Jul 24, 2016 by boshka (1,310 points)
looks ok! many thanks!
commented Aug 2, 2016 by boshka (1,310 points)
edited Aug 2, 2016 by boshka
Hi, how about adding (along with skinparam colorArrowSeparationSpace X)
skinparam colorArrowThickness Y ?

And BTW, am I able to insert current date/time into diagrams?
commented Sep 12, 2016 by boshka (1,310 points)
Hi!
I have the same issue (http://plantuml.sourceforge.net/qa/?qa=4411/need-way-color-and-number-different-routes-activity-diagram&show=4709#c4709) with multiple svgs in the document when I set the color for state background using a gradient notation. The colors become overriden by the svgs added lower in the document flow.
commented Sep 13, 2016 by plantuml (134,510 points)
Multiple svgs issue should be fixed with last beta
https://dl.dropboxusercontent.com/u/13064071/plantuml.jar
Tell us if it's not working for you
commented Sep 13, 2016 by boshka (1,310 points)
yes, seems ok now!! Thank you!
...