Sequence diagrams in Dokuwiki pages

You can easily integrate nice sequence diagramms into Dokuwiki pages using the format plugin and Trace2UML. In the following example you see how it looks and how to use it.
You can read how to install Trace2UML in Ubuntu here.

http://trace2uml.tigris.org

<format trace2uml>
                       ~   (!)   00BA0AFC:clTransHandler   
                       ~   ==>   00BA0AFC:clTransHandler   receiveTelegram(...)
                       ~   <==   00BA0AFC:clTransHandler   
                       ~   ==>   00BA0AFC:clTransHandler   sendResponse(...)
 00BA0AFC:clTransHandler   ==>   00BA0AFC:clTransHandler   recRespTransComplete(clResponderTrans* pTransaction)
 00BA0AFC:clTransHandler   <==   00BA0AFC:clTransHandler   
                       ~   <==   00BA0AFC:clTransHandler   
                       ~   ==>   00BA0AFC:clTransHandler   receiveTelegram(...)
 00BA0AFC:clTransHandler   (!)   00B4AD60:clRouterTrans    
 00BA0AFC:clTransHandler   ==>   00B4AD60:clRouterTrans    receiveTelegram(...)
  00B4AD60:clRouterTrans   ==>   00B4AD60:clRouterTrans    sendPendingTel()
  00B4AD60:clRouterTrans   <==   00B4AD60:clRouterTrans    
  00B4AD60:clRouterTrans   ==>   00B4AD60:clRouterTrans    recAdrResult(tAddrResults Result)
  00B4AD60:clRouterTrans   ==>   00BA0AFC:clTransHandler   recRoutTransComplete(clRouterTrans *pTransaction)
 00BA0AFC:clTransHandler   (X)   00B4AD60:clRouterTrans    
  00B4AD60:clRouterTrans   <==   00BA0AFC:clTransHandler   
  00B4AD60:clRouterTrans   <==   00B4AD60:clRouterTrans    
 00BA0AFC:clTransHandler   <==   00B4AD60:clRouterTrans    
                       ~   <==   00BA0AFC:clTransHandler   
</format>

Configure the format plugin

You can configure the format plugin to understand Trace2UML by adding this paragraph into conf/default.php file of the format plugin:

$conf['trace2uml']=array('name' => 'sequence diagram',
   'xhtml' => array('ext' => 'png',
                    'pre' => "",
                    'post' => "",
                    'command' => 'xvfb-run /usr/bin/Trace2UML -i @INFILE@ -o @MEDIAFILE@'))

The Trace2UML syntax

  ;      lines starting with ';' are comments. They are not drawn.
  #      lines starting with '#' are visible comments. They are drawn with a horizontal line.
  !      this is used to notify the existence of an object (the creation is not in the scope of the trace).
         This is automatically inserted when you use an object name not mentioned before.
 (!)     this is used to notify an object creation.
 (X)     this is used to notify an object deletion.
 >--     this is used to notify an asynchronous message send.
 -->     this is used to notify an asynchronous message receive.
 >->     this is a shortcut when typing traces by hand.
         Creates both an asynchronous message send and a corresponding message receive.
 ==>     this is used to notify a synchronous function call.
 <==     this is used to notify a synchronous function return.
 ret(#)  is an alternative way to notify a synchronous function return.
         # has to be the event number of the corresponding synchronous fuction call.
 >>>     this is used to notify a state change.
 note:   this is used to add a "note" to an object.
 ...     a line with only 3 dots is drawn as an "interrupton".
 [...]   everything set into square brackets is treated as user data.
         It stays in the trace line without having any effect on the graphics.
         You can use it for timestamps or remarks.
howto/trace2uml_in_dokuwiki.txt ยท Last modified: 2015/05/13 16:30 by thomas
GNU Free Documentation License 1.3
Powered by PHP Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 Valid HTML5