More compatibility with wsd syntax in Sequence Diagram

0 votes
asked Nov 6, 2013 in Wanted features by rmric (2,140 points)

Could it be possible to have some shortcuts in lifeline activation ? These are quite handy.

A->+B

A->B
activate B

B->-A

deactivate B
B->A

Of course, all the other kinds of arrow need that shortcut.

As for more compatibility with websequencediagrams, could it be possible to make the end of lines after a #  treated as a comment, and thus ignored by plantuml?

And a last wish, what about a new special kind of note, named state, which instead of having square angles would be round by default (all a matter of style of course :-). One day, we may hyperlink them to state diagram...

state over A: IDLE

1 Answer

0 votes
answered Nov 6, 2013 by plantuml (294,960 points)

Hello,

You will find on this page some interesting information on the following page:
http://plantuml.sourceforge.net/incubation.html

These features are working, and will be officially released some days.

So you can use:


@startuml
alice -> bob ++ : hello
bob -> bob ++ : self call
bob -> bib ++  #005500 : hello
bob -> geoge ** : create
return done
return rc
bob -> geoge !! : delete
return success
@enduml

 



@startuml
caller -> server : conReq
hnote over caller : idle
caller <- server : conConf
hnote over caller : connected
note over server : connected
rnote over server
 this is
 on several
 lines
endrnote
hnote over caller
 this is
 on several
 lines
endhnote

@enduml




We could add some "snote" (s as state) to implement a note that would look like a state.

Would this be ok for you ?

About the #, since this # is used in class diagram to denotate protected fields, we cannot use it as comment separator

Regards,
 

commented Nov 8, 2013 by rmric (2,140 points)
I was not aware of the incubation. Thanks.

The new syntax is fine, especially the create instance which is neat.

The case brought here ask for "enough" compatibility with wsd.

In fact, I (and many others) have a bunch of wsd files I'd love to get processed by PlantUML which is far superior. Rewriting these files is no joy. Hence, the syntax A->+B, B->-A  would be much needed. It is also more compact. Do you think it is possible?

Considering PlantUML would have a base syntax close enough to wsd for sequence diagrams, this could be the tool to recommend for RFC writing instead of a closed source software:
http://cursive.net/draft-hildebrand-html-rfc-2012-07-16.html#websequencediagram-sample

Converting the # into ' for the comments is acceptable (sed -e s/#/\'/), esp. thanks to its seldom use.

As for the state note, I would prefer the "state" keyword, for syntax compatibility. Could it be an issue with the existing keyword?

Thanks for this excellent tool, and responsiveness.

Best Regards
...