User:Hummel-riegel/SRF Process

Jump to navigation Jump to search

Process format is a format bringing together the MediaWiki Graphviz extension and Semantic MediaWiki. It allows Semantic MediaWiki's inline queries to display process graphs.

You might also be interested in exporting data in pnml for Horus or individuals walking through process.


  • Installed and running Semantic Mediawiki Extension, download from here
  • Installed and running Mediawiki extension GraphViz, download from here
  • Installed and running Semantic Result Formats Extension, download from here
  • for templates you might also need Extension:ParserFunctions

  • alternatively you can get the semantic extensions (and many more) simple within the Semantic Bundle

Install instructions[edit]

Get the follwing files

and put that into /extensions/SemanticResultFormats/Process.

Get the follwing files

and put that into /extensions/SemanticResultFormats/Process/helpers.

Get the follwing files

and put that into /extensions/SemanticResultFormats/Process/templates.

Add the following to your LocalSettings.php:

$smwgResultFormats['process'] = 'SRFProcess';
require_once "$IP/extensions/SemanticResultFormats/Process/SRF_Process.php";
require_once "$IP/extensions/SemanticResultFormats/Process/SRF_SpecialCreateProcess.php";
require_once "$IP/extensions/SemanticResultFormats/Process/SRF_SpecialCreateProcess.i18n.php";

Templates and Forms[edit]

It is not necessary but recommended to have a look at our bundled Templates. They can be found in the templates-folder. They can be easily imported with Special:Import and make modelling much simpler.
There can be found:

  • Process_Form_Package.xml -> Provides some useful forms that help creating a process with Special:CreateProcess.
  • Process_Extension_Package.xml -> Provides templates to display some infoboxes and to structure the data of the Forms. See importet page "Process Extension Overview" for all pages related to the process printer.
  • Process_Extension_Example_Package.xml -> Here we provide an example process to take a look.


The use of the templates makes some of the following redundant, if you just use the basic features.


The process extension requires a number of wiki pages to be categorized as "Process Steps" (= nodes in a process graph) and to be annotated with properties denoting their connection to other nodes. Also, they should be categorized with the name of the process they belong to. A query as below then generates a sparse matrix with process nodes in the first column and their interconnections in the other columns. Setting the output "format" to "process" will render the matrix as a process graph.

Both, process specification & annotation as well as rendering the result graph is typically implemented using templates (see Templates section).

Example query which generated the example output shown below (book order process):

{{#ask: [[Category:Process Step]] [[Category:{{PAGENAME}}]]   
| ?has OrSuccessor=hasorsuccessor
| ?has Successor=hassuccessor
| ?has ConTrueSuccessor=hascontruesuccessor
| ?has ConFalseSuccessor=hasconfalsesuccessor
| ?has Condition=hascondition
| format=process
| graphlink=yes }}
| Owner=Some person

Additional query parameters (see also Extension:Semantic_Result_Formats/graph_format)[edit]

Parameter Type default Notes
format String ("process") table enables the process UI
graphname String QueryResult Names the graph
rankdir LR,RL,TB or BT LR Specifies the direction of the graph L=left,R=right,T=top,B=bottom
graphsize pointf none Specifies the size of the graph
clustercolor String No Colors clusters in the process graph
debug Yes or No No If debug code should be shown
graphvalidation Yes or No No If graph should be validated
showresources Yes or No No If ressources of a process node (defined by producesresource/usesresource) should be shown
showroles Yes or No No If roles of a process node (defined by hasrole) should be shown
showstatus Yes or No No If status for a process step (defined by hasstatus) should be displayed using one of five icons (0%, 25%, 50%, 75%, 100%)
showredlinks Yes or No No If process steps without an underlying wiki page should be highlighted
redlinkcolor String red? Label color for showredlinks
highlight String (name of wiki page) None Will highlight node from the result graph, if label matches the highlight parameter value
highlightcolor String blue? Label color for highlight
showcompound Yes or No Yes If a process node containing a sub-process should be highlighted. Requires processcat to be set (see below) and the query result needs to contain a category column (e.g. ?Category)
processcat String None Name of the category used for processes (e.g. "Process") - required for showcompound


Example Output "Book Order"

The output would be the actual diagram. However, internally, the printer passes the GraphViz markup (as below) to GraphViz ($result = renderGraphviz($graphInput);) which then generates the diagram.

You could also have the process structure exported to a PNML for the use with the Horus Business Modeler. (see more here)


To see an example in action, go to Process-Demo-Wiki. (not available anymore)