boosting activity diagrams

0 votes
asked Oct 14, 2013 in Wanted features by jlopezvi (300 points)
Hello,

I am using PlantUML's activity diagrams in an ambitious project of C++ source code documentation. I am very keen on its capabilities. For some time now, Activity Diagrams have been in "Beta" and I would like to help continue their development.
In particular, I am missing some "major features":
- possibility for hyperlinks inside the action boxes (http://plantuml.sourceforge.net/incubation.html)
- dot&plantUML integration (http://plantuml.sourceforge.net/dot.html)
- "activity boxes", which may contain actions inside, or other "sub-activities".
Any immediate plans in this regard? Please, count on me.

3 Answers

0 votes
answered Oct 14, 2013 by plantuml (298,440 points)

Hello, in the following beta, support for hyperlink have been implemented in activity diagram beta.
https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

@startuml
start
:This is some [[http://www.google.com]] site;
stop
@enduml


We are also thinking about define a link for a whole activity box. Something like:
@startuml
start
:[[http://www.google.com]]:The link should
be define on the box itself;
stop
@enduml


Any though about that?


About DOT ( http://plantuml.sourceforge.net/dot.html ), we will not allow to mix DOT language into activity beta.
The main reason is that activity beta diagrams does not depend at all of graphviz/dot.
What are you exactly looking for ?


And about activity box countaing actions inside, there is a completely undocumented feature in sequence diagrams that may look like what you want:


http://www.plantuml.com/plantuml/form?url=SyfFKj2rKt3CoKnELR1Io4ZDoSddoiilILN8IKqhuQgkvahEIImkLd3BppVaggtbIirBKG19Spa1DTheGZH2D1HbfcU0THIN91QLS5cLvnTbMmCv-GN86W40

@startuml
Bob -> Alice : hello
note left
{{
class Foo1
}}
end note
Bob <- Alice
note right
{{
start
:work;
stop
}}
end note
@enduml

As you can see, it's possible to add subdiagram inside notes. The subdiagrams are delimited by {{ and }}

We could eventually add subdiagrams in activity beta, something like:
@startuml
start
:{{
start
:inner activity;
}};
@enduml


Please note that subdiagrams are completely independant from their parent diagrams (they are simply an image), so you cannot have links between them. Any though? (again)
 

0 votes
answered Oct 15, 2013 by jlopezvi (300 points)
edited Oct 15, 2013 by jlopezvi

Hello,

Thanks for your answer. That is great that hyperlinks are getting implemented in these diagrams! In the future documentation, maybe you'll want to add this link to let users know how to use the .cmapx files:
http://www.graphviz.org/doc/info/output.html#d:cmapx
It took some effort to me to find this information, after surfing through some (geographical) maps of PNG (Papua New Guinea)  :-)

#Nomenclature: to avoid misunderstandings, in my nomenclature "activity" is a series/group of "actions".


#Regarding hyperlinks:

I would suggest two kind of "general" hyperlinks annotated as:

:[[general hyperlink, whole action box]]:action;[[general hyperlink, upper-right corner]];

- One hyperlink spans the whole action box, it is more "visible".
Example usage: In our project, it would be used to zoom in:
https://dl.dropboxusercontent.com/u/36372825/current/actions_zooming.html
--> Representation in the diagram

- The other hyperlink spans just a corner of the box, and so it is more "discrete". It could be marked by a symbol such as

Example usage: In our project, this would be used to give a reference to the source code that corresponds to that specific action:
https://dl.dropboxusercontent.com/u/36372825/current/codereferences.html
--> Representation in the diagram

What do you think?


#Regarding activities:

In the UML standards there seems to exist the term activity (group of actions) that I have established in the #nomenclature. I would suggest the following extension in the language:

@startUML

activity: activity_title;
start
:action 1
:action 2
end

@endUML


and activities would be represented as



*Note: activities could also contain the two types of "general hyperlinks":
activity:[[general hyperlink, whole action box]]: activity_title ;[[general hyperlink, upper-right corner]];

Example usage: In our project, a diagram is generated for each function or class method that has been documented. Each of them corresponds to an activity (a group of actions). The activity_title will be the name of the method or the function.




CONTINUES.... [8000 characters limit]
 

0 votes
answered Oct 15, 2013 by jlopezvi (300 points)
edited Oct 15, 2013 by jlopezvi

...CONTINUES A PREVIOUS ANSWER

 

#Regarding "sub-activities":

We may want to group a small set of actions in a "sub-activity". Consider this possible annotation:

@startUML

activity: activity_title;
start
:action 1{{
:action 1.1
:action 1.2;
}};
:action 2;
end

@endUML


The proposed representation would be as in
https://dl.dropboxusercontent.com/u/36372825/current/actions_zooming.html
--> Representation in the diagram (mouse has to be on the figure)

action 1 would be now a sub-activity, with the same visual format as an activity



Example usage: in our project, this is a nice looking way to implement zooming capabilities, together with the use of general hyperlinks. That is to say, we may generate two diagrams for the same activity showing more or less detail, and relate both of them via hyperlinks.

What do you think? (again)

I do want to help with all of these ideas if you think that they are beneficial!

Best, Juan.

...