Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

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

+3 votes
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!
asked Apr 22, 2016 in Wanted features by boshka (1,030 points)

1 Answer

0 votes

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 ?

answered Apr 22, 2016 by plantuml (125,210 points)
looks ok! many thanks!
Hi, how about adding (along with skinparam colorArrowSeparationSpace X)
skinparam colorArrowThickness Y ?

And BTW, am I able to insert current date/time into diagrams?
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.
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
yes, seems ok now!! Thank you!
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...