<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://en.wiki4.bluespice.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rvogel</id>
	<title>BlueSpice Helpdesk - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://en.wiki4.bluespice.com/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rvogel"/>
	<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/wiki/Special:Contributions/Rvogel"/>
	<updated>2026-05-18T19:54:56Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=8041</id>
		<title>How to debug</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=8041"/>
		<updated>2023-12-15T15:50:57Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Help others to help you==&lt;br /&gt;
Sometimes things go wrong. In many cases the user is then confronted with cryptic or no error messages at all. This page provides help about getting more information about what exactly went wrong, so it can be fixed quickly. This is especially important when asking for help on locations like [https://community.bluespice.com community.bluespice.com].&lt;br /&gt;
&lt;br /&gt;
Additional information can also be found at [[mediawikiwiki:Manual:How_to_debug|&amp;quot;Manual:How to debug&amp;quot; on MediaWiki.org]].&lt;br /&gt;
&lt;br /&gt;
{{Textbox|boxtype=warning|header=Check for sensitive information|text=Most of the techniques described here will output very detailed information about the error, but also about the system and the context. The output may contain sensitive information like usernames, passwords, pathes, access-keys and many more. Before posting any information retrieved by this kind of debugging on a public location (like [https://community.bluespice.com community.bluespice.com]), make sure to redact all potential sensitive information!|icon=yes}}&lt;br /&gt;
&lt;br /&gt;
== Generic information ==&lt;br /&gt;
In general it is a good idea to provide additional context information about the error. Usually this information is easily to access/gather by the one who reports an error and very valueable to anyone trying to help.&lt;br /&gt;
&lt;br /&gt;
Such information can be&lt;br /&gt;
* Browser used (Firefox, Chrome, Edge, ...), ideally with the version&lt;br /&gt;
* URLs (which page the error occurs on, additional parameters that may play into the error)&lt;br /&gt;
* User permission level or role (admin, reader, editor, reviewer, ...)&lt;br /&gt;
&lt;br /&gt;
Again: Be careful if the shared information contains sensible data and redact it if required.&lt;br /&gt;
&lt;br /&gt;
== Server side debugging ==&lt;br /&gt;
There are various ways to get more information about errors by changing some configuration on the server side.&lt;br /&gt;
&lt;br /&gt;
=== Wiki application ===&lt;br /&gt;
&lt;br /&gt;
==== Enable detailed error reporting ====&lt;br /&gt;
Within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file, please add the following lines:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$GLOBALS[&#039;wgShowSQLErrors&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgDebugDumpSql&#039;]  = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowExceptionDetails&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowDBErrorBacktrace&#039;] = true;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will turn error messages like &amp;lt;code&amp;gt;internal_api_error_DBQueryError&amp;lt;/code&amp;gt; into a more detailed stack of program calls, including database queries and responses.&lt;br /&gt;
&lt;br /&gt;
==== General debug log ====&lt;br /&gt;
Sometimes it can be useful to see all debugging information the application produces. To enable this general debug log please add the following lines within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
if ( isset( $_GET[&#039;dodebuglog&#039;] ) ) {&lt;br /&gt;
    $GLOBALS[&#039;wgDebugLogFile&#039;] = &amp;quot;$IP/cache/debug.log&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Be aware that this configuration is set conditionally. It will only be used if the URL accessed in the browser contains some query string like  &amp;lt;code&amp;gt;dodebuglog=1&amp;lt;/code&amp;gt;. This is to allow a more isolated debug log file. Otherwise other requests (like calls to the &amp;lt;code&amp;gt;load.php&amp;lt;/code&amp;gt; entrypoint for CSS and JS content) may also add into this file, which makes analysis more difficult.&lt;br /&gt;
&lt;br /&gt;
==== Log channels ====&lt;br /&gt;
&lt;br /&gt;
== Client side debugging ==&lt;br /&gt;
Many errors occur only on the client and server side debugging will not help. In such cases the webbrowser can be used to retrieve more information.&lt;br /&gt;
&lt;br /&gt;
=== Browser development tools ===&lt;br /&gt;
Most modern browsers have sophisticated development tools. Usually they can be accessed by pressing the &amp;lt;code&amp;gt;F12&amp;lt;/code&amp;gt; key on the keyboard. &lt;br /&gt;
&lt;br /&gt;
==== JavaScript console ====&lt;br /&gt;
When some interface element (button, dialog, ...) does not behave like it should, it is usually worth checking the browsers JavaScript console.&lt;br /&gt;
&lt;br /&gt;
{{Textbox|boxtype=tip|header=Nothing listed?|text=Sometimes it may be required to re-do the action that lead to the error with &#039;&#039;open console&#039;&#039; rather than opening it later.}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_JS_console_01.png|center|frame]]&lt;br /&gt;
&lt;br /&gt;
One can click the link on the right side of the line to see the location of where the error has emerged from.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_JS_console_02.png|center|frame]]&lt;br /&gt;
&lt;br /&gt;
====Network panel====&lt;br /&gt;
Sometimes network communication in the background of the application fails. In such cases, the &amp;quot;Network&amp;quot; panel of the browsers developer tools may reveal more information.&lt;br /&gt;
&lt;br /&gt;
The error is also shown in the &amp;quot;Console&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_Network_panel_01.png|center|frame]]&lt;br /&gt;
&lt;br /&gt;
When in the &amp;quot;Network&amp;quot; panel, one can select the faulty request from the list to get more information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_Network_panel_02.png|center|frame]]&lt;br /&gt;
&lt;br /&gt;
The various tabs &amp;quot;Header&amp;quot;, &amp;quot;Payload&amp;quot;, &amp;quot;Response&amp;quot;, etc. can provide useful information.  When reporting such an issue, you can just &amp;quot;copy&amp;quot; the information using the context menu.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_Network_panel_03.png|center|frame]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=8040</id>
		<title>How to debug</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=8040"/>
		<updated>2023-12-15T15:50:06Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Help others to help you==&lt;br /&gt;
Sometimes things go wrong. In many cases the user is then confronted with cryptic or no error messages at all. This page provides help about getting more information about what exactly went wrong, so it can be fixed quickly. This is especially important when asking for help on locations like [https://community.bluespice.com community.bluespice.com].&lt;br /&gt;
&lt;br /&gt;
Additional information can also be found at [[mediawikiwiki:Manual:How_to_debug|&amp;quot;Manual:How to debug&amp;quot; on MediaWiki.org]].&lt;br /&gt;
&lt;br /&gt;
{{Textbox|boxtype=warning|header=Check for sensitive information|text=Most of the techniques described here will output very detailed information about the error, but also about the system and the context. The output may contain sensitive information like usernames, passwords, pathes, access-keys and many more. Before posting any information retrieved by this kind of debugging on a public location (like [https://community.bluespice.com community.bluespice.com]), make sure to redact all potential sensitive information!|icon=yes}}&lt;br /&gt;
&lt;br /&gt;
== Generic information ==&lt;br /&gt;
In general it is a good idea to provide additional context information about the error. Usually this information is easily to access/gather by the one who reports an error and very valueable to anyone trying to help.&lt;br /&gt;
&lt;br /&gt;
Such information can be&lt;br /&gt;
* Browser used (Firefox, Chrome, Edge, ...), ideally with the version&lt;br /&gt;
* URLs (which page the error occurs on, additional parameters that may play into the error)&lt;br /&gt;
* User permission level or role (admin, reader, editor, reviewer, ...)&lt;br /&gt;
&lt;br /&gt;
Again: Be careful if the shared information contains sensible data and redact it if required.&lt;br /&gt;
&lt;br /&gt;
== Server side debugging ==&lt;br /&gt;
There are various ways to get more information about errors by changing some configuration on the server side.&lt;br /&gt;
&lt;br /&gt;
=== Wiki application ===&lt;br /&gt;
&lt;br /&gt;
==== Enable detailed error reporting ====&lt;br /&gt;
Within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file, please add the following lines:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$GLOBALS[&#039;wgShowSQLErrors&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgDebugDumpSql&#039;]  = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowExceptionDetails&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowDBErrorBacktrace&#039;] = true;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will turn error messages like &amp;lt;code&amp;gt;internal_api_error_DBQueryError&amp;lt;/code&amp;gt; into a more detailed stack of program calls, including database queries and responses.&lt;br /&gt;
&lt;br /&gt;
==== General debug log ====&lt;br /&gt;
Sometimes it can be useful to see all debugging information the application produces. To enable this general debug log please add the following lines within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
if ( isset( $_GET[&#039;dodebuglog&#039;] ) ) {&lt;br /&gt;
    $GLOBALS[&#039;wgDebugLogFile&#039;] = &amp;quot;$IP/cache/debug.log&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Be aware that this configuration is set conditionally. It will only be used if the URL accessed in the browser contains some query string like  &amp;lt;code&amp;gt;dodebuglog=1&amp;lt;/code&amp;gt;. This is to allow a more isolated debug log file. Otherwise other requests (like calls to the &amp;lt;code&amp;gt;load.php&amp;lt;/code&amp;gt; entrypoint for CSS and JS content) may also add into this file, which makes analysis more difficult.&lt;br /&gt;
&lt;br /&gt;
==== Log channels ====&lt;br /&gt;
&lt;br /&gt;
== Client side debugging ==&lt;br /&gt;
Many errors occur only on the client and server side debugging will not help. In such cases the webbrowser can be used to retrieve more information.&lt;br /&gt;
&lt;br /&gt;
=== Browser development tools ===&lt;br /&gt;
Most modern browsers have sophisticated development tools. Usually they can be accessed by pressing the &amp;lt;code&amp;gt;F12&amp;lt;/code&amp;gt; key on the keyboard. &lt;br /&gt;
&lt;br /&gt;
==== JavaScript console ====&lt;br /&gt;
When some interface element (button, dialog, ...) does not behave like it should, it is usually worth checking the browsers JavaScript console.&lt;br /&gt;
&lt;br /&gt;
{{Textbox|boxtype=tip|header=Nothing listed?|text=Sometimes it may be required to re-do the action that lead to the error with &#039;&#039;open console&#039;&#039; rather than opening it later.}}&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
[[File:How_to_debug_JS_console_01.png|center|frame]]&lt;br /&gt;
One can click the link on the right side of the line to see the location of where the error has emerged from.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
[[File:How_to_debug_JS_console_02.png|center|frame]]&lt;br /&gt;
&lt;br /&gt;
====Network panel====&lt;br /&gt;
Sometimes network communication in the background of the application fails. In such cases, the &amp;quot;Network&amp;quot; panel of the browsers developer tools may reveal more information.&lt;br /&gt;
&lt;br /&gt;
The error is also shown in the &amp;quot;Console&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;[[File:How_to_debug_Network_panel_01.png|center|frame]]When in the &amp;quot;Network&amp;quot; panel, one can select the faulty request from the list to get more information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;[[File:How_to_debug_Network_panel_02.png|center|frame]]The various tabs &amp;quot;Header&amp;quot;, &amp;quot;Payload&amp;quot;, &amp;quot;Response&amp;quot;, etc. can provide useful information.  When reporting such an issue, you can just &amp;quot;copy&amp;quot; the information using the context menu.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;[[File:How_to_debug_Network_panel_03.png|center|frame]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=8039</id>
		<title>How to debug</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=8039"/>
		<updated>2023-12-15T15:43:32Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Help others to help you==&lt;br /&gt;
Sometimes things go wrong. In many cases the user is then confronted with cryptic or no error messages at all. This page provides help about getting more information about what exactly went wrong, so it can be fixed quickly. This is especially important when asking for help on locations like [https://community.bluespice.com community.bluespice.com].&lt;br /&gt;
&lt;br /&gt;
Additional information can also be found at [[mediawikiwiki:Manual:How_to_debug|&amp;quot;Manual:How to debug&amp;quot; on MediaWiki.org]].&lt;br /&gt;
&lt;br /&gt;
{{Textbox|boxtype=warning|header=Check for sensitive information|text=Most of the techniques described here will output very detailed information about the error, but also about the system and the context. The output may contain sensitive information like usernames, passwords, pathes, access-keys and many more. Before posting any information retrieved by this kind of debugging on a public location (like [https://community.bluespice.com community.bluespice.com]), make sure to redact all potential sensitive information!|icon=yes}}&lt;br /&gt;
&lt;br /&gt;
== Generic information ==&lt;br /&gt;
In general it is a good idea to provide additional context information about the error. Usually this information is easily to access/gather by the one who reports an error and very valueable to anyone trying to help.&lt;br /&gt;
&lt;br /&gt;
Such information can be&lt;br /&gt;
* Browser used (Firefox, Chrome, Edge, ...), ideally with the version&lt;br /&gt;
* URLs (which page the error occurs on, additional parameters that may play into the error)&lt;br /&gt;
* User permission level or role (admin, reader, editor, reviewer, ...)&lt;br /&gt;
&lt;br /&gt;
Again: Be careful if the shared information contains sensible data and redact it if required.&lt;br /&gt;
&lt;br /&gt;
== Server side debugging ==&lt;br /&gt;
There are various ways to get more information about errors by changing some configuration on the server side.&lt;br /&gt;
&lt;br /&gt;
=== Wiki application ===&lt;br /&gt;
&lt;br /&gt;
==== Enable detailed error reporting ====&lt;br /&gt;
Within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file, please add the following lines:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$GLOBALS[&#039;wgShowSQLErrors&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgDebugDumpSql&#039;]  = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowExceptionDetails&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowDBErrorBacktrace&#039;] = true;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will turn error messages like &amp;lt;code&amp;gt;internal_api_error_DBQueryError&amp;lt;/code&amp;gt; into a more detailed stack of program calls, including database queries and responses.&lt;br /&gt;
&lt;br /&gt;
==== General debug log ====&lt;br /&gt;
Sometimes it can be useful to see all debugging information the application produces. To enable this general debug log please add the following lines within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
if ( isset( $_GET[&#039;dodebuglog&#039;] ) ) {&lt;br /&gt;
    $GLOBALS[&#039;wgDebugLogFile&#039;] = &amp;quot;$IP/cache/debug.log&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Be aware that this configuration is set conditionally. It will only be used if the URL accessed in the browser contains some query string like  &amp;lt;code&amp;gt;dodebuglog=1&amp;lt;/code&amp;gt;. This is to allow a more isolated debug log file. Otherwise other requests (like calls to the &amp;lt;code&amp;gt;load.php&amp;lt;/code&amp;gt; entrypoint for CSS and JS content) may also add into this file, which makes analysis more difficult.&lt;br /&gt;
&lt;br /&gt;
==== Log channels ====&lt;br /&gt;
&lt;br /&gt;
== Client side debugging ==&lt;br /&gt;
Many errors occur only on the client and server side debugging will not help. In such cases the webbrowser can be used to retrieve more information.&lt;br /&gt;
&lt;br /&gt;
=== Browser development tools ===&lt;br /&gt;
Most modern browsers have sophisticated development tools. Usually they can be accessed by pressing the &amp;lt;code&amp;gt;F12&amp;lt;/code&amp;gt; key on the keyboard. &lt;br /&gt;
&lt;br /&gt;
==== JavaScript console ====&lt;br /&gt;
When some interface element (button, dialog, ...) does not behave like it should, it is usually worth checking the browsers JavaScript console.&lt;br /&gt;
&lt;br /&gt;
{{Textbox|boxtype=tip|header=Nothing listed?|text=Sometimes it may be required to re-do the action that lead to the error with &#039;&#039;open console&#039;&#039; rather than opening it later.}}&lt;br /&gt;
[[File:How_to_debug_JS_console_01.png|center|frame]]&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
[[File:How_to_debug_JS_console_02.png|center|frame]]&lt;br /&gt;
&lt;br /&gt;
==== Network panel ====&lt;br /&gt;
[[File:How_to_debug_Network_panel_01.png|center|frame]]&lt;br /&gt;
[[File:How_to_debug_Network_panel_02.png|center|frame]]&lt;br /&gt;
[[File:How_to_debug_Network_panel_03.png|center|frame]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=7994</id>
		<title>How to debug</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=7994"/>
		<updated>2023-12-13T10:09:30Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Help others to help you==&lt;br /&gt;
Sometimes things go wrong. In many cases the user is then confronted with cryptic or no error messages at all. This page provides help about getting more information about what exactly went wrong, so it can be fixed quickly. This is especially important when asking for help on locations like [https://community.bluespice.com community.bluespice.com].&lt;br /&gt;
&lt;br /&gt;
Additional information can also be found at [[mediawikiwiki:Manual:How_to_debug|&amp;quot;Manual:How to debug&amp;quot; on MediaWiki.org]].&lt;br /&gt;
&lt;br /&gt;
{{Textbox|boxtype=warning|header=Check for sensitive information|text=Most of the techniques described here will output very detailed information about the error, but also about the system and the context. The output may contain sensitive information like usernames, passwords, pathes, access-keys and many more. Before posting any information retrieved by this kind of debugging on a public location (like [https://community.bluespice.com community.bluespice.com]), make sure to redact all potential sensitive information!|icon=yes}}&lt;br /&gt;
&lt;br /&gt;
== Generic information ==&lt;br /&gt;
In general it is a good idea to provide additional context information about the error. Usually this information is easily to access/gather by the one who reports an error and very valueable to anyone trying to help.&lt;br /&gt;
&lt;br /&gt;
Such information can be&lt;br /&gt;
* Browser used (Firefox, Chrome, Edge, ...), ideally with the version&lt;br /&gt;
* URLs (which page the error occurs on, additional parameters that may play into the error)&lt;br /&gt;
* User permission level or role (admin, reader, editor, reviewer, ...)&lt;br /&gt;
&lt;br /&gt;
Again: Be careful if the shared information contains sensible data and redact it if required.&lt;br /&gt;
&lt;br /&gt;
== Server side debugging ==&lt;br /&gt;
There are various ways to get more information about errors by changing some configuration on the server side.&lt;br /&gt;
&lt;br /&gt;
=== Wiki application ===&lt;br /&gt;
&lt;br /&gt;
==== Enable detailed error reporting ====&lt;br /&gt;
Within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file, please add the following lines:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$GLOBALS[&#039;wgShowSQLErrors&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgDebugDumpSql&#039;]  = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowExceptionDetails&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowDBErrorBacktrace&#039;] = true;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will turn error messages like &amp;lt;code&amp;gt;internal_api_error_DBQueryError&amp;lt;/code&amp;gt; into a more detailed stack of program calls, including database queries and responses.&lt;br /&gt;
&lt;br /&gt;
==== General debug log ====&lt;br /&gt;
Sometimes it can be useful to see all debugging information the application produces. To enable this general debug log please add the following lines within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
if ( isset( $_GET[&#039;dodebuglog&#039;] ) ) {&lt;br /&gt;
    $GLOBALS[&#039;wgDebugLogFile&#039;] = &amp;quot;$IP/cache/debug.log&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Be aware that this configuration is set conditionally. It will only be used if the URL accessed in the browser contains some query string like  &amp;lt;code&amp;gt;dodebuglog=1&amp;lt;/code&amp;gt;. This is to allow a more isolated debug log file. Otherwise other requests (like calls to the &amp;lt;code&amp;gt;load.php&amp;lt;/code&amp;gt; entrypoint for CSS and JS content) may also add into this file, which makes analysis more difficult.&lt;br /&gt;
&lt;br /&gt;
==== Log channels ====&lt;br /&gt;
&lt;br /&gt;
== Client side debugging ==&lt;br /&gt;
Many errors occur only on the client and server side debugging will not help. In such cases the webbrowser can be used to retrieve more information.&lt;br /&gt;
&lt;br /&gt;
=== Browser development tools ===&lt;br /&gt;
Most modern browsers have sophisticated development tools. Usually they can be accessed by pressing the &amp;lt;code&amp;gt;F12&amp;lt;/code&amp;gt; key on the keyboard. &lt;br /&gt;
&lt;br /&gt;
==== JavaScript console ====&lt;br /&gt;
When some interface element (button, dialog, ...) does not behave like it should, it is usually worth checking the browsers JavaScript console.&lt;br /&gt;
&lt;br /&gt;
{{Textbox|boxtype=tip|header=Nothing listed?|text=Sometimes it may be required to re-do the action that lead to the error with &#039;&#039;open console&#039;&#039; rather than opening it later.}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
[[File:How_to_debug_JS_console_01.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_JS_console_02.png]]&lt;br /&gt;
&lt;br /&gt;
==== Network panel ====&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_Network_panel_01.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_Network_panel_02.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_Network_panel_03.png]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=7993</id>
		<title>How to debug</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=7993"/>
		<updated>2023-12-13T10:07:23Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Help others to help you==&lt;br /&gt;
Sometimes things go wrong. In many cases the user is then confronted with cryptic or no error messages at all. This page provides help about getting more information about what exactly went wrong, so it can be fixed quickly. This is especially important when asking for help on locations like [https://community.bluespice.com community.bluespice.com].&lt;br /&gt;
&lt;br /&gt;
Additional information can also be found at [[mediawikiwiki:Manual:How_to_debug|&amp;quot;Manual:How to debug&amp;quot; on MediaWiki.org]].&lt;br /&gt;
&lt;br /&gt;
{{Textbox|boxtype=warning|header=Check for sensitive information|text=Most of the techniques described here will output very detailed information about the error, but also about the system and the context. The output may contain sensitive information like usernames, passwords, pathes, access-keys and many more. Before posting any information retrieved by this kind of debugging on a public location (like [https://community.bluespice.com community.bluespice.com]), make sure to redact all potential sensitive information!|icon=yes}}&lt;br /&gt;
&lt;br /&gt;
== Generic information ==&lt;br /&gt;
In general it is a good idea to provide additional context information about the error. Usually this information is easily to access/gather by the one who reports an error and very valueable to anyone trying to help.&lt;br /&gt;
&lt;br /&gt;
Such information can be&lt;br /&gt;
* Browser used (Firefox, Chrome, Edge, ...), ideally with the version&lt;br /&gt;
* URLs (which page the error occurs on, additional parameters that may play into the error)&lt;br /&gt;
* User permission level or role (admin, reader, editor, reviewer, ...)&lt;br /&gt;
&lt;br /&gt;
Again: Be careful if the shared information contains sensible data and redact it if required.&lt;br /&gt;
&lt;br /&gt;
== Server side debugging ==&lt;br /&gt;
There are various ways to get more information about errors by changing some configuration on the server side.&lt;br /&gt;
&lt;br /&gt;
=== Wiki application ===&lt;br /&gt;
&lt;br /&gt;
==== Enable detailed error reporting ====&lt;br /&gt;
Within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file, please add the following lines:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$GLOBALS[&#039;wgShowSQLErrors&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgDebugDumpSql&#039;]  = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowExceptionDetails&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowDBErrorBacktrace&#039;] = true;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will turn error messages like &amp;lt;code&amp;gt;internal_api_error_DBQueryError&amp;lt;/code&amp;gt; into a more detailed stack of program calls, including database queries and responses.&lt;br /&gt;
&lt;br /&gt;
==== General debug log ====&lt;br /&gt;
Sometimes it can be useful to see all debugging information the application produces. To enable this general debug log please add the following lines within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
if ( isset( $_GET[&#039;dodebuglog&#039;] ) ) {&lt;br /&gt;
    $GLOBALS[&#039;wgDebugLogFile&#039;] = &amp;quot;$IP/cache/debug.log&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Be aware that this configuration is set conditionally. It will only be used if the URL accessed in the browser contains some query string like  &amp;lt;code&amp;gt;dodebuglog=1&amp;lt;/code&amp;gt;. This is to allow a more isolated debug log file. Otherwise other requests (like calls to the &amp;lt;code&amp;gt;load.php&amp;lt;/code&amp;gt; entrypoint for CSS and JS content) may also add into this file, which makes analysis more difficult.&lt;br /&gt;
&lt;br /&gt;
==== Log channels ====&lt;br /&gt;
&lt;br /&gt;
== Client side debugging ==&lt;br /&gt;
Many errors occur only on the client and server side debugging will not help. In such cases the webbrowser can be used to retrieve more information.&lt;br /&gt;
&lt;br /&gt;
=== Browser development tools ===&lt;br /&gt;
Most modern browsers have sophisticated development tools. Usually they can be accessed by pressing the &amp;lt;code&amp;gt;F12&amp;lt;/code&amp;gt; key on the keyboard. &lt;br /&gt;
&lt;br /&gt;
==== JavaScript console ====&lt;br /&gt;
When some interface element (button, dialog, ...) does not behave like it should, it is usually worth checking the browsers JavaScript console.&lt;br /&gt;
&lt;br /&gt;
{{Textbox|boxtype=info|text=Sometimes it may be required to re-do the action that lead to the error with &#039;&#039;open console&#039;&#039; rather than opening it later.}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Example:&#039;&#039;&#039;&lt;br /&gt;
[[File:How_to_debug_JS_console_01.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_JS_console_02.png]]&lt;br /&gt;
&lt;br /&gt;
==== Network panel ====&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_Network_panel_01.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_Network_panel_02.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_Network_panel_03.png]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=File:How_to_debug_Network_panel_03.png&amp;diff=7992</id>
		<title>File:How to debug Network panel 03.png</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=File:How_to_debug_Network_panel_03.png&amp;diff=7992"/>
		<updated>2023-12-13T09:55:38Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=File:How_to_debug_Network_panel_02.png&amp;diff=7991</id>
		<title>File:How to debug Network panel 02.png</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=File:How_to_debug_Network_panel_02.png&amp;diff=7991"/>
		<updated>2023-12-13T09:55:11Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=File:How_to_debug_Network_panel_01.png&amp;diff=7990</id>
		<title>File:How to debug Network panel 01.png</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=File:How_to_debug_Network_panel_01.png&amp;diff=7990"/>
		<updated>2023-12-13T09:54:50Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=File:How_to_debug_JS_console_02.png&amp;diff=7989</id>
		<title>File:How to debug JS console 02.png</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=File:How_to_debug_JS_console_02.png&amp;diff=7989"/>
		<updated>2023-12-13T09:54:10Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=File:How_to_debug_JS_console_01.png&amp;diff=7988</id>
		<title>File:How to debug JS console 01.png</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=File:How_to_debug_JS_console_01.png&amp;diff=7988"/>
		<updated>2023-12-13T09:53:43Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=7987</id>
		<title>How to debug</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=7987"/>
		<updated>2023-12-13T09:53:17Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sometimes things go wrong. In many cases the user is then confronted with cryptic or no error messages at all. This page provides help about getting more information about what exactly went wrong, so it can be fixed quickly. This is especially important when asking for help on locations like [https://community.bluespice.com community.bluespice.com].&lt;br /&gt;
&lt;br /&gt;
Additional information can also be found at [[mediawikiwiki:Manual:How_to_debug|&amp;quot;Manual:How to debug&amp;quot; on MediaWiki.org]].{{Textbox|boxtype=warning|header=Check for sensitive information|text=Most of the techniques described here will output very detailed information about the error, but also about the system and the context. The output may contain sensitive information like usernames, passwords, pathes, access-keys and many more. Before posting any information retrieved by this kind of debugging on a public location (like [https://community.bluespice.com community.bluespice.com]), make sure to redact all potential sensitive information!|icon=yes}}&lt;br /&gt;
&lt;br /&gt;
== Server side debugging ==&lt;br /&gt;
There are various ways to get more information about errors by changing some configuration on the server side.&lt;br /&gt;
&lt;br /&gt;
=== Wiki application ===&lt;br /&gt;
&lt;br /&gt;
==== Enable detailed error reporting ====&lt;br /&gt;
Within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file, please add the following lines:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$GLOBALS[&#039;wgShowSQLErrors&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgDebugDumpSql&#039;]  = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowExceptionDetails&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowDBErrorBacktrace&#039;] = true;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will turn error messages like &amp;lt;code&amp;gt;internal_api_error_DBQueryError&amp;lt;/code&amp;gt; into a more detailed stack of program calls, including database queries and responses.&lt;br /&gt;
&lt;br /&gt;
==== General debug log ====&lt;br /&gt;
Sometimes it can be useful to see all debugging information the application produces. To enable this general debug log please add the following lines within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
if ( isset( $_GET[&#039;dodebuglog&#039;] ) ) {&lt;br /&gt;
    $GLOBALS[&#039;wgDebugLogFile&#039;] = &amp;quot;$IP/cache/debug.log&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Be aware that this configuration is set conditionally. It will only be used if the URL accessed in the browser contains some query string like  &amp;lt;code&amp;gt;dodebuglog=1&amp;lt;/code&amp;gt;. This is to allow a more isolated debug log file. Otherwise other requests (like calls to the &amp;lt;code&amp;gt;load.php&amp;lt;/code&amp;gt; entrypoint for CSS and JS content) may also add into this file, which makes analysis more difficult.&lt;br /&gt;
&lt;br /&gt;
==== Log channels ====&lt;br /&gt;
&lt;br /&gt;
== Client side debugging ==&lt;br /&gt;
Many errors occur only on the client and server side debugging will not help. In such cases the webbrowser can be used to retrieve more information.&lt;br /&gt;
&lt;br /&gt;
=== Browser development tools ===&lt;br /&gt;
Most modern browsers have sophisticated development tools. Usually they can be accessed by pressing the &amp;lt;code&amp;gt;F12&amp;lt;/code&amp;gt; key on the keyboard. &lt;br /&gt;
&lt;br /&gt;
==== JavaScript console ====&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_JS_console_01.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_JS_console_02.png]]&lt;br /&gt;
&lt;br /&gt;
==== Network panel ====&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_Network_panel_01.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_Network_panel_02.png]]&lt;br /&gt;
&lt;br /&gt;
[[File:How_to_debug_Network_panel_03.png]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=7964</id>
		<title>Manual:Extension/Workflows/Tutorial</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=7964"/>
		<updated>2023-12-08T13:09:08Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Creating a custom workflow}}&lt;br /&gt;
&lt;br /&gt;
== Defining the workflow  ==&lt;br /&gt;
Let&#039;s assume, we want to build a workflow, that asks for some classification of a wikipage. Based on the classification of the document, it either sends an e-mail to a member of the legal team or it first appends a wiki page and then sends the e-mail to the legal team.&lt;br /&gt;
&lt;br /&gt;
The described workflow consists of four activities and one gateway. You can create a BPMN-Diagramm in the wiki to visualize the process:&lt;br /&gt;
[[File:Workflows-tutorial-diagram.svg|center|thumb|700x700px|alt=Document classification workflow|Document classification workflow]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
To create the workflow, the following steps are necessary:&lt;br /&gt;
&lt;br /&gt;
#Creating a custom &#039;&#039;&#039;workflow definition:&#039;&#039;&#039; &amp;lt;code&amp;gt;MediaWiki:Classification-workflow.bpmn&amp;lt;/code&amp;gt;&lt;br /&gt;
#Creating and connecting an &#039;&#039;&#039;initiation form&#039;&#039;&#039; that adds some information about the workflow before it sends the task. &amp;lt;code&amp;gt;MediaWiki:ContentClassificationInit.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#Creating and connecting the &#039;&#039;&#039;classification form&#039;&#039;&#039; that allows the assigned user to classify the document. &amp;lt;code&amp;gt;MediaWiki:ContentClassificationRequest.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#Adding a &#039;&#039;&#039;trigger&#039;&#039;&#039; to the wiki that defines where and how to start the workflow.&lt;br /&gt;
&lt;br /&gt;
==Instructions==&lt;br /&gt;
&lt;br /&gt;
===Creating a custom workflow definition===&lt;br /&gt;
First, let&#039;s create a page called &amp;lt;code&amp;gt;MediaWiki:Classification-workflow.bpmn&amp;lt;/code&amp;gt; with the most basic stub XML. Each workflow that you define in the wiki needs the elements that you see here:&lt;br /&gt;
&lt;br /&gt;
*Line 1: The xml prolog&lt;br /&gt;
*Line 2: The definitions element, which denotes the namespaces where the workflow elements are defined.&lt;br /&gt;
*Line3: The process element, which contains all other elements.&lt;br /&gt;
*Line 5: The workflow runs in the context of a specific revision of a wiki page.&lt;br /&gt;
*Line 11: The workflow needs a startEvent and&lt;br /&gt;
*Line 18: The workflow needs an endEvent.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	    &amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The above stub xml only features the &amp;quot;Start&amp;quot; and &amp;quot;End&amp;quot; event including - yet to be defined - &amp;quot;outgoing&amp;quot; and &amp;quot;incoming&amp;quot; flow references.&lt;br /&gt;
&lt;br /&gt;
====Creating and connecting an initiation form====&lt;br /&gt;
The initiation form allows to interact with the user who starts the workflow. It explains what happens when the workflow is started and allows to add a comment to provide some context for the user task.&lt;br /&gt;
&lt;br /&gt;
We are using the MediaWiki namespace here to make sure not every user can edit the form later. But in general, such forms can be created everywhere in the wiki.&lt;br /&gt;
&lt;br /&gt;
[[File:WF-Tutorial initForm.png|alt=Worfklow initiation form|center|thumb|550x550px|Worfklow initiation form]]&lt;br /&gt;
To create the initiation form:&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Create&#039;&#039;&#039; the page &amp;lt;code&amp;gt;MediaWiki:ContentClassificationInit.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Paste&#039;&#039;&#039; the following form definition in source edit mode:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;lang&amp;quot;: &amp;quot;json&amp;quot;,&lt;br /&gt;
    &amp;quot;form_name&amp;quot;: &amp;quot;ContentClassificationInit&amp;quot;,&lt;br /&gt;
    &amp;quot;items&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;intro&amp;quot;,&lt;br /&gt;
            &amp;quot;widget_label&amp;quot;: &amp;quot;Click  \&amp;quot;Start\&amp;quot; to ask an expert for classification. You can leave a comment for the expert below&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;label&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;comment&amp;quot;,&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Comment&amp;quot;,&lt;br /&gt;
            &amp;quot;noLayout&amp;quot;: true,&lt;br /&gt;
            &amp;quot;showOn&amp;quot;: [&lt;br /&gt;
                &amp;quot;create&amp;quot;,&lt;br /&gt;
                &amp;quot;edit&amp;quot;,&lt;br /&gt;
                &amp;quot;view&amp;quot;&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;editableOn&amp;quot;: [&lt;br /&gt;
                &amp;quot;create&amp;quot;,&lt;br /&gt;
                &amp;quot;edit&amp;quot;&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;textarea&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Save&#039;&#039;&#039; the page.&lt;br /&gt;
&lt;br /&gt;
Next, we tell the BPMN with the following userTask to show the form: &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Let&#039;s look at what this does: &lt;br /&gt;
&lt;br /&gt;
*The &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; of this activity are set to &amp;quot;InitializeWorkflow&amp;quot;  and &amp;quot;Start Content Classification Workflow&amp;quot;. Both values do not need to match, but usually they do.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;wf:type&amp;gt; is &#039;&#039;custom_form&#039;&#039; and tells the workflow that a form directly in the wiki (as opposed to a form located in code) is available.&lt;br /&gt;
*&amp;lt;wf:form&amp;gt; points to the actual form page in the wiki&lt;br /&gt;
*&amp;lt;wf:initializer&amp;gt; is set to &#039;&#039;true&#039;&#039; since it is used to show or collect some information before the actual workflow starts.&lt;br /&gt;
&lt;br /&gt;
At the end, we have the incoming and outgoing flows referenced. (Note: the order of elements does not matter usually; only the nesting is important).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
We add this &#039;&#039;&#039;userTask&#039;&#039;&#039; on line 16, after the line  &#039;&#039;&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&#039;&#039;:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	    &amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
        	&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializ&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
        &amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
       &amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating and connecting the classification form====&lt;br /&gt;
The workflow will show a classification form to a user. This user will be defined in the workflow in a later step. &lt;br /&gt;
&lt;br /&gt;
To create the classification form: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Create&#039;&#039;&#039; the page &amp;lt;code&amp;gt;MediaWiki:ContentClassificationRequest.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Paste&#039;&#039;&#039; the following form definition in source edit mode:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;lang&amp;quot;: &amp;quot;json&amp;quot;,&lt;br /&gt;
	&amp;quot;form_name&amp;quot;: &amp;quot;ContentClassificationRequest&amp;quot;,&lt;br /&gt;
	&amp;quot;items&amp;quot;: [&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;name&amp;quot;: &amp;quot;intro&amp;quot;,&lt;br /&gt;
			&amp;quot;widget_label&amp;quot;: &amp;quot;Please review the given document and select an appropriate classification for the content from the list below&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;label&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;name&amp;quot;: &amp;quot;classification&amp;quot;,&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Classification&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true,&lt;br /&gt;
			&amp;quot;options&amp;quot;: [&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;data&amp;quot;: &amp;quot;CLSA&amp;quot;,&lt;br /&gt;
					&amp;quot;label&amp;quot;: &amp;quot;Class A&amp;quot;&lt;br /&gt;
				},&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;data&amp;quot;: &amp;quot;CLSB&amp;quot;,&lt;br /&gt;
					&amp;quot;label&amp;quot;: &amp;quot;Class B&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			],&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;dropdown&amp;quot;,&lt;br /&gt;
			&amp;quot;widget_$overlay&amp;quot;: true&lt;br /&gt;
		}&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, we tell the BPMN to show the form to user that receives the workflow task. For that, we add a &#039;&#039;userTask&#039;&#039; activity:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;AskForClassification&amp;quot; name=&amp;quot;Provide classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationRequest&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
			    &amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;assigned_user&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{ROOTPAGENAME:{{#show:{{FULLPAGENAME}}|?Responsible|link=none|default=TheBoss}}}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;due_date&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{#time:YmdHis|now + 7 days}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;classification&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToAskForClassification&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAskForClassificationToGateway&amp;quot; sourceRef=&amp;quot;AskForClassification&amp;quot; targetRef=&amp;quot;Gateway&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should have a close look. This userTask has some additional properties besides the form reference (which was already explained in the initiation form):&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;assigned user:&#039;&#039;&#039;  The &amp;lt;code&amp;gt;assigned_user&amp;lt;/code&amp;gt; property is mandatory,  as the workflow engine must know which user to query.   In this case, we use some wikitext magic to calculate the assigned user from the context. The value consists of a combination of a wikitext variable and a parserfunction (this particular parserfunction is defined by the Semantic MediaWiki extension, which can be seen as a dependency here). The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#show}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parserfunction tries to get a username from a semantic property, that may or may not be set on the page the workflow is started on. If it does not find a proper information, it will fallback to &amp;lt;code&amp;gt;TheBoss&amp;lt;/code&amp;gt; (assuming that such a user exists on the wiki). The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ROOTPAGENAME}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; variable is just an easy way to strip the &amp;quot;User&amp;quot; namespace, if the looked up value was something like &amp;lt;code&amp;gt;User:JaneDoe&amp;lt;/code&amp;gt; instead of just &amp;lt;code&amp;gt;JaneDoe&amp;lt;/code&amp;gt;.&lt;br /&gt;
*&#039;&#039;&#039;due date:&#039;&#039;&#039; The &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; property is also mandatory. All user facing activities need a due date. If the running activity is overdue, the workflow engine will end the workflow. In this case, we implement a concept of &amp;quot;lay days&amp;quot;, as we do not have an absolute due date, but calculate it from the time the activity gets started using the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#time}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parserfunction.&lt;br /&gt;
*&#039;&#039;&#039;classification:&#039;&#039;&#039; The &amp;lt;code&amp;gt;classification&amp;lt;/code&amp;gt; property is a random one. It must be specified, in order to allow the form to set it and the workflow context to access it. We could have provided a default value, but we want to keep it empty.&lt;br /&gt;
At the end, we have the incoming and outgoing flows referenced. (Note: the order of elements does not matter usually; only the nesting is important).&lt;br /&gt;
&lt;br /&gt;
====The gateway====&lt;br /&gt;
Now we can proceed with adding the gateway.&lt;br /&gt;
&lt;br /&gt;
The gateway will provide the two necessary paths:&lt;br /&gt;
&lt;br /&gt;
#If the assigned user classified the document as Class A (CLSA), an email will be sent to the legal department.&lt;br /&gt;
#If the assigned user classified the document as Class B (CLSB), a wiki page will be appended with the content defined in the task &amp;quot;AppendWikipage&amp;quot;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:exclusiveGateway id=&amp;quot;Gateway&amp;quot; name=&amp;quot;AskForClassification.classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:exclusiveGateway&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToSendMail&amp;quot; name=&amp;quot;CLSA&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToAppendWikipage&amp;quot; name=&amp;quot;CLSB&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;AppendWikipage&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After setting up the gateway, we need to define the tworelated activities.&lt;br /&gt;
&lt;br /&gt;
====Sending an mail to the legal department====&lt;br /&gt;
For case 1, we need the workflow to immediately send an email:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;SendMail&amp;quot; name=&amp;quot;Send mail&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;send_mail&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;recipient&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[legal@company.local]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;subject&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[New &amp;quot;{{{AskForClassification.classification}}}&amp;quot; content: {{FULLPAGENAME}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;body&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[Please check further actions now!]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromEndMailToTheEnd&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromEndMailToTheEnd&amp;quot; sourceRef=&amp;quot;SendMail&amp;quot; targetRef=&amp;quot;TheEnd&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Appending a wikipage====&lt;br /&gt;
For case 2, we want the workflow to append the existing page &#039;&#039;Classification_incidents&#039;&#039; with the text shown in the &#039;&#039;content&#039;&#039; property. &lt;br /&gt;
&lt;br /&gt;
This requirement can be fulfilled with the &#039;&#039;edit_page&#039;&#039;  activity type:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;AppendWikipage&amp;quot; name=&amp;quot;Append wikipage&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;edit_page&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;title&amp;quot; default=&amp;quot;Classification_incidents&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;user&amp;quot; default=&amp;quot;MediaWiki default&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;content&amp;quot; default=&amp;quot;* [[{{FULLPAGENAME}}]] was classified {{{AskForClassification.classification}}}&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;mode&amp;quot; default=&amp;quot;append&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;minor&amp;quot; default=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAppendWikipageToSendMail&amp;quot; sourceRef=&amp;quot;AppendWikipage&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following properties are set for this activity type:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;name:&#039;&#039; title of the wiki page to which the content will be appended.&lt;br /&gt;
*&#039;&#039;user:&#039;&#039; user that is shown in the version history of the wiki page that was appended.&lt;br /&gt;
*&#039;&#039;content:&#039;&#039; text that is added to the wiki page.&lt;br /&gt;
*&#039;&#039;mode:&#039;&#039; shows where the text is added to the wiki page (append or ???)&lt;br /&gt;
*&#039;&#039;minor: s&#039;&#039;ets this page revision as a minor revision (1) or major revision (2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
After this task is completed, the workflow will send an email to the legal department.&lt;br /&gt;
&lt;br /&gt;
====The final BPMN====&lt;br /&gt;
In the end, the bpmn page for the workflow looks like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions&lt;br /&gt;
	xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot;&lt;br /&gt;
	xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;AskForClassification&amp;quot; name=&amp;quot;Provide classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationRequest&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;assigned_user&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{ROOTPAGENAME:{{#show:{{FULLPAGENAME}}|?Responsible|link=none|default=TheBoss}}}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;due_date&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{#time:YmdHis|now + 7 days}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;classification&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAskForClassificationToGateway&amp;quot; sourceRef=&amp;quot;AskForClassification&amp;quot; targetRef=&amp;quot;Gateway&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:exclusiveGateway id=&amp;quot;Gateway&amp;quot; name=&amp;quot;AskForClassification.classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:exclusiveGateway&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToSendMail&amp;quot; name=&amp;quot;CLSA&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToAppendWikipage&amp;quot; name=&amp;quot;CLSB&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;AppendWikipage&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;SendMail&amp;quot; name=&amp;quot;Send mail&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;send_mail&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;recipient&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[legal@company.local]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;subject&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[New &amp;quot;{{{AskForClassification.classification}}}&amp;quot; content: {{FULLPAGENAME}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;body&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[Please check further actions now!]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromEndMailToTheEnd&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromEndMailToTheEnd&amp;quot; sourceRef=&amp;quot;SendMail&amp;quot; targetRef=&amp;quot;TheEnd&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;AppendWikipage&amp;quot; name=&amp;quot;Append wikipage&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;edit_page&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;title&amp;quot; default=&amp;quot;Classification_incidents&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;user&amp;quot; default=&amp;quot;MediaWiki default&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;content&amp;quot; default=&amp;quot;* [[{{FULLPAGENAME}}]] was classified {{{AskForClassification.classification}}}&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;mode&amp;quot; default=&amp;quot;append&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;minor&amp;quot; default=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAppendWikipageToSendMail&amp;quot; sourceRef=&amp;quot;AppendWikipage&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
workflows-activity-editpage-summary&lt;br /&gt;
&lt;br /&gt;
==Creating a workflow trigger==&lt;br /&gt;
For the workflow to appear in the wiki, we need to define a trigger:&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Workflow triggers&#039;&#039; in the Global actions menu.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Add new trigger&#039;&#039;.&lt;br /&gt;
#&#039;&#039;&#039;Select&#039;&#039;&#039; the option &#039;&#039;Manual&#039;&#039; from the dropdown menu.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Continue&#039;&#039;.&lt;br /&gt;
#&#039;&#039;&#039;Define&#039;&#039;&#039; the settings for the workflow trigger:&lt;br /&gt;
#*&#039;&#039;Name:&#039;&#039; Name that is displayed in the workflow selection menu.&lt;br /&gt;
#*&#039;&#039;Description:&#039;&#039; Explanation of the function and special features of this trigger.&lt;br /&gt;
#*&#039;&#039;Workflow to start:&#039;&#039; Workflow triggered by this trigger. In our case Classificiation-workflow.&lt;br /&gt;
#*&#039;&#039;Initial data for the workflow&#039;&#039; (optional):   - Standard comment suggestion.&lt;br /&gt;
#*&#039;&#039;Conditions&#039;&#039; (optional)&#039;&#039;:&#039;&#039; In which namespaces the workflow is displayed for selection.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Save&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
Your workflow is now ready to be tested.&lt;br /&gt;
&lt;br /&gt;
==Testing the workflow==&lt;br /&gt;
The workflow is now available in the wiki.  You should test whether the following functionality is available:&lt;br /&gt;
&lt;br /&gt;
*The workflow is available to be started in the namespaces defined in the workflow trigger (if there are restrictions here).&lt;br /&gt;
*The workflow is triggered.&lt;br /&gt;
*The workflow is listed in the Worklfows Overview page.&lt;br /&gt;
*The assigned user received a task.&lt;br /&gt;
*The workflow completes correctly in case A and B.&lt;br /&gt;
&lt;br /&gt;
==Using bpmn.io to create workflow definitions==&lt;br /&gt;
Such a diagram can be created with the free [https://bpmn.io/ bpmn.io] service. The [[Media:Manual:Workflows-tutorial-raw.bpmn.xml|resulting BPMN file]] needs to be modified, before it can actually be imported and used in the wiki.&lt;br /&gt;
&lt;br /&gt;
[[de:Handbuch:Erweiterung/Workflows/Tutorial]]&lt;br /&gt;
[[en:{{FULLPAGENAME}}]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=7963</id>
		<title>Manual:Extension/Workflows/Tutorial</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=7963"/>
		<updated>2023-12-08T12:53:02Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Creating a custom workflow}}&lt;br /&gt;
&lt;br /&gt;
== Defining the workflow  ==&lt;br /&gt;
Let&#039;s assume, we want to build a workflow, that asks for some classification of a wikipage. Based on the classification of the document, it either sends an e-mail to a member of the legal team or it first appends a wiki page and then sends the e-mail to the legal team.&lt;br /&gt;
&lt;br /&gt;
The described workflow consists of four activities and one gateway. You can create a BPMN-Diagramm in the wiki to visualize the process:&lt;br /&gt;
[[File:Workflows-tutorial-diagram.svg|center|thumb|700x700px|alt=Document classification workflow|Document classification workflow]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
To create the workflow, the following steps are necessary:&lt;br /&gt;
&lt;br /&gt;
#Creating a custom &#039;&#039;&#039;workflow definition:&#039;&#039;&#039; &amp;lt;code&amp;gt;MediaWiki:Classification-workflow.bpmn&amp;lt;/code&amp;gt;&lt;br /&gt;
#Creating and connecting an &#039;&#039;&#039;initiation form&#039;&#039;&#039; that adds some information about the workflow before it sends the task. &amp;lt;code&amp;gt;MediaWiki:ContentClassificationInit.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#Creating and connecting the &#039;&#039;&#039;classification form&#039;&#039;&#039; that allows the assigned user to classify the document. &amp;lt;code&amp;gt;MediaWiki:ContentClassificationRequest.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#Adding a &#039;&#039;&#039;trigger&#039;&#039;&#039; to the wiki that defines where and how to start the workflow.&lt;br /&gt;
&lt;br /&gt;
==Instructions==&lt;br /&gt;
&lt;br /&gt;
===Creating a custom workflow definition===&lt;br /&gt;
First, let&#039;s create a page called &amp;lt;code&amp;gt;MediaWiki:Classification-workflow.bpmn&amp;lt;/code&amp;gt; with the most basic stub XML. Each workflow that you define in the wiki needs the elements that you see here:&lt;br /&gt;
&lt;br /&gt;
*Line 1: The xml prolog&lt;br /&gt;
*Line 2: The definitions element, which denotes the namespaces where the workflow elements are defined.&lt;br /&gt;
*Line3: The process element, which contains all other elements.&lt;br /&gt;
*Line 5: The workflow runs in the context of a specific revision of a wiki page.&lt;br /&gt;
*Line 11: The workflow needs a startEvent and&lt;br /&gt;
*Line 18: The workflow needs an endEvent.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	    &amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The above stub xml only features the &amp;quot;Start&amp;quot; and &amp;quot;End&amp;quot; event including - yet to be defined - &amp;quot;outgoing&amp;quot; and &amp;quot;incoming&amp;quot; flow references.&lt;br /&gt;
&lt;br /&gt;
====Creating and connecting an initiation form====&lt;br /&gt;
The initiation form allows to interact with the user who starts the workflow. It explains what happens when the workflow is started and allows to add a comment to provide some context for the user task.&lt;br /&gt;
&lt;br /&gt;
We are using the MediaWiki namespace here to make sure not every user can edit the form later. But in general, such forms can be created everywhere in the wiki.&lt;br /&gt;
&lt;br /&gt;
[[File:WF-Tutorial initForm.png|alt=Worfklow initiation form|center|thumb|550x550px|Worfklow initiation form]]&lt;br /&gt;
To create the initiation form:&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Create&#039;&#039;&#039; the page &amp;lt;code&amp;gt;MediaWiki:ContentClassificationInit.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Paste&#039;&#039;&#039; the following form definition in source edit mode:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;lang&amp;quot;: &amp;quot;json&amp;quot;,&lt;br /&gt;
    &amp;quot;form_name&amp;quot;: &amp;quot;ContentClassificationInit&amp;quot;,&lt;br /&gt;
    &amp;quot;items&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;intro&amp;quot;,&lt;br /&gt;
            &amp;quot;widget_label&amp;quot;: &amp;quot;Click  \&amp;quot;Start\&amp;quot; to ask an expert for classification. You can leave a comment for the expert below&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;label&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;comment&amp;quot;,&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Comment&amp;quot;,&lt;br /&gt;
            &amp;quot;noLayout&amp;quot;: true,&lt;br /&gt;
            &amp;quot;showOn&amp;quot;: [&lt;br /&gt;
                &amp;quot;create&amp;quot;,&lt;br /&gt;
                &amp;quot;edit&amp;quot;,&lt;br /&gt;
                &amp;quot;view&amp;quot;&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;editableOn&amp;quot;: [&lt;br /&gt;
                &amp;quot;create&amp;quot;,&lt;br /&gt;
                &amp;quot;edit&amp;quot;&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;textarea&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Save&#039;&#039;&#039; the page.&lt;br /&gt;
&lt;br /&gt;
Next, we tell the BPMN with the following userTask to show the form: &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Let&#039;s look at what this does: &lt;br /&gt;
&lt;br /&gt;
*The &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; of this activity are set to &amp;quot;InitializeWorkflow&amp;quot;  and &amp;quot;Start Content Classification Workflow&amp;quot;. Both values do not need to match, but usually they do.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;wf:type&amp;gt; is &#039;&#039;custom_form&#039;&#039; and tells the workflow that a form directly in the wiki (as opposed to a form located in code) is available.&lt;br /&gt;
*&amp;lt;wf:form&amp;gt; points to the actual form page in the wiki&lt;br /&gt;
*&amp;lt;wf:initializer&amp;gt; is set to &#039;&#039;true&#039;&#039; since it is used to show or collect some information before the actual workflow starts.&lt;br /&gt;
&lt;br /&gt;
At the end, we have the incoming and outgoing flows referenced. (Note: the order of elements does not matter usually; only the nesting is important).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
We add this &#039;&#039;&#039;userTask&#039;&#039;&#039; on line 16, after the line  &#039;&#039;&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&#039;&#039;:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	    &amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
        	&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializ&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
        &amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
       &amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating and connecting the classification form====&lt;br /&gt;
The workflow will show a classification form to a user. This user will be defined in the workflow in a later step. &lt;br /&gt;
&lt;br /&gt;
To create the classification form: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Create&#039;&#039;&#039; the page &amp;lt;code&amp;gt;MediaWiki:ContentClassificationRequest.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Paste&#039;&#039;&#039; the following form definition in source edit mode:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;lang&amp;quot;: &amp;quot;json&amp;quot;,&lt;br /&gt;
	&amp;quot;form_name&amp;quot;: &amp;quot;ContentClassificationRequest&amp;quot;,&lt;br /&gt;
	&amp;quot;items&amp;quot;: [&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;name&amp;quot;: &amp;quot;intro&amp;quot;,&lt;br /&gt;
			&amp;quot;widget_label&amp;quot;: &amp;quot;Please review the given document and select an appropriate classification for the content from the list below&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;label&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;name&amp;quot;: &amp;quot;classification&amp;quot;,&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Classification&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true,&lt;br /&gt;
			&amp;quot;options&amp;quot;: [&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;data&amp;quot;: &amp;quot;CLSA&amp;quot;,&lt;br /&gt;
					&amp;quot;label&amp;quot;: &amp;quot;Class A&amp;quot;&lt;br /&gt;
				},&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;data&amp;quot;: &amp;quot;CLSB&amp;quot;,&lt;br /&gt;
					&amp;quot;label&amp;quot;: &amp;quot;Class B&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			],&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;dropdown&amp;quot;,&lt;br /&gt;
			&amp;quot;widget_$overlay&amp;quot;: true&lt;br /&gt;
		}&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, we tell the BPMN to show the form to user that receives the workflow task. For that, we add a &#039;&#039;userTask&#039;&#039; activity:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;AskForClassification&amp;quot; name=&amp;quot;Provide classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationRequest&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
			    &amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;assigned_user&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{ROOTPAGENAME:{{#show:{{FULLPAGENAME}}|?Responsible|link=none|default=TheBoss}}}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;due_date&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{#time:YmdHis|now + 7 days}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;classification&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToAskForClassification&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAskForClassificationToGateway&amp;quot; sourceRef=&amp;quot;AskForClassification&amp;quot; targetRef=&amp;quot;Gateway&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should have a close look. This userTask has some additional properties besides the form reference (which was already explained in the initiation form):&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;assigned user:&#039;&#039;&#039;  The &amp;lt;code&amp;gt;assigned_user&amp;lt;/code&amp;gt; property is mandatory,  as the workflow engine must know which user to query.   In this case, we use some wikitext magic to calculate the assigned user from the context. The value consists of a combination of a wikitext variable and a parserfunction (this particular parserfunction is defined by the Semantic MediaWiki extension, which can be seen as a dependency here). The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#show}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parserfunction tries to get a username from a semantic property, that may or may not be set on the page the workflow is started on. If it does not find a proper information, it will fallback to &amp;lt;code&amp;gt;TheBoss&amp;lt;/code&amp;gt; (assuming that such a user exists on the wiki). The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ROOTPAGENAME}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; variable is just an easy way to strip the &amp;quot;User&amp;quot; namespace, if the looked up value was something like &amp;lt;code&amp;gt;User:JaneDoe&amp;lt;/code&amp;gt; instead of just &amp;lt;code&amp;gt;JaneDoe&amp;lt;/code&amp;gt;.&lt;br /&gt;
*&#039;&#039;&#039;due date:&#039;&#039;&#039; The &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; property is also mandatory. All user facing activities need a due date. If the running activity is overdue, the workflow engine will end the workflow. In this case, we implement a concept of &amp;quot;lay days&amp;quot;, as we do not have an absolute due date, but calculate it from the time the activity gets started using the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#time}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parserfunction.&lt;br /&gt;
*&#039;&#039;&#039;classification:&#039;&#039;&#039; The &amp;lt;code&amp;gt;classification&amp;lt;/code&amp;gt; property is a random one. It must be specified, in order to allow the form to set it and the workflow context to access it. We could have provided a default value, but we want to keep it empty.&lt;br /&gt;
At the end, we have the incoming and outgoing flows referenced. (Note: the order of elements does not matter usually; only the nesting is important).&lt;br /&gt;
&lt;br /&gt;
====The gateway====&lt;br /&gt;
Now we can proceed with adding the gateway.&lt;br /&gt;
&lt;br /&gt;
The gateway will provide the two necessary paths:&lt;br /&gt;
&lt;br /&gt;
#If the assigned user classified the document as Class A (CLSA), an email will be sent to the legal department.&lt;br /&gt;
#If the assigned user classified the document as Class B (CLSB), a wiki page will be appended with the content defined in the task &amp;quot;AppendWikipage&amp;quot;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:exclusiveGateway id=&amp;quot;Gateway&amp;quot; name=&amp;quot;AskForClassification.classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:exclusiveGateway&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToSendMail&amp;quot; name=&amp;quot;CLSA&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToAppendWikipage&amp;quot; name=&amp;quot;CLSB&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;AppendWikipage&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After setting up the gateway, we need to define the tworelated activities.&lt;br /&gt;
&lt;br /&gt;
====Sending an mail to the legal department====&lt;br /&gt;
For case 1, we need the workflow to immediately send an email:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;SendMail&amp;quot; name=&amp;quot;Send mail&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;send_mail&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;recipient&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[legal@company.local]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;subject&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[New &amp;quot;Class A&amp;quot; content: {{FULLPAGENAME}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;body&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[Please check further actions now!]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromEndMailToTheEnd&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromEndMailToTheEnd&amp;quot; sourceRef=&amp;quot;SendMail&amp;quot; targetRef=&amp;quot;TheEnd&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Appending a wikipage====&lt;br /&gt;
For case 2, we want the workflow to append the existing page &#039;&#039;Classification_incidents&#039;&#039; with the text shown in the &#039;&#039;content&#039;&#039; property. &lt;br /&gt;
&lt;br /&gt;
This requirement can be fulfilled with the &#039;&#039;edit_page&#039;&#039;  activity type:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;AppendWikipage&amp;quot; name=&amp;quot;Append wikipage&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;edit_page&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;title&amp;quot; default=&amp;quot;Classification_incidents&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;user&amp;quot; default=&amp;quot;MediaWiki default&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;content&amp;quot; default=&amp;quot;* [[{{FULLPAGENAME}}]] was classified {{{AskForClassification.classification}}}&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;mode&amp;quot; default=&amp;quot;append&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;minor&amp;quot; default=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAppendWikipageToSendMail&amp;quot; sourceRef=&amp;quot;AppendWikipage&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following properties are set for this activity type:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;name:&#039;&#039; title of the wiki page to which the content will be appended.&lt;br /&gt;
*&#039;&#039;user:&#039;&#039; user that is shown in the version history of the wiki page that was appended.&lt;br /&gt;
*&#039;&#039;content:&#039;&#039; text that is added to the wiki page.&lt;br /&gt;
*&#039;&#039;mode:&#039;&#039; shows where the text is added to the wiki page (append or ???)&lt;br /&gt;
*&#039;&#039;minor: s&#039;&#039;ets this page revision as a minor revision (1) or major revision (2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
After this task is completed, the workflow will send an email to the legal department.&lt;br /&gt;
&lt;br /&gt;
====The final BPMN====&lt;br /&gt;
In the end, the bpmn page for the workflow looks like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions&lt;br /&gt;
	xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot;&lt;br /&gt;
	xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;AskForClassification&amp;quot; name=&amp;quot;Provide classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationRequest&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;assigned_user&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{ROOTPAGENAME:{{#show:{{FULLPAGENAME}}|?Responsible|link=none|default=TheBoss}}}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;due_date&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{#time:YmdHis|now + 7 days}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;classification&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAskForClassificationToGateway&amp;quot; sourceRef=&amp;quot;AskForClassification&amp;quot; targetRef=&amp;quot;Gateway&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:exclusiveGateway id=&amp;quot;Gateway&amp;quot; name=&amp;quot;AskForClassification.classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:exclusiveGateway&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToSendMail&amp;quot; name=&amp;quot;CLSA&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToAppendWikipage&amp;quot; name=&amp;quot;CLSB&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;AppendWikipage&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;SendMail&amp;quot; name=&amp;quot;Send mail&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;send_mail&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;recipient&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[legal@company.local]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;subject&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[New &amp;quot;Class A&amp;quot; content: {{FULLPAGENAME}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;body&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[Please check further actions now!]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromEndMailToTheEnd&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromEndMailToTheEnd&amp;quot; sourceRef=&amp;quot;SendMail&amp;quot; targetRef=&amp;quot;TheEnd&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;AppendWikipage&amp;quot; name=&amp;quot;Append wikipage&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;edit_page&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;title&amp;quot; default=&amp;quot;Classification_incidents&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;user&amp;quot; default=&amp;quot;MediaWiki default&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;content&amp;quot; default=&amp;quot;* [[{{FULLPAGENAME}}]] was classified {{{AskForClassification.classification}}}&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;mode&amp;quot; default=&amp;quot;append&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;minor&amp;quot; default=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAppendWikipageToSendMail&amp;quot; sourceRef=&amp;quot;AppendWikipage&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
workflows-activity-editpage-summary&lt;br /&gt;
&lt;br /&gt;
==Creating a workflow trigger==&lt;br /&gt;
For the workflow to appear in the wiki, we need to define a trigger:&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Workflow triggers&#039;&#039; in the Global actions menu.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Add new trigger&#039;&#039;.&lt;br /&gt;
#&#039;&#039;&#039;Select&#039;&#039;&#039; the option &#039;&#039;Manual&#039;&#039; from the dropdown menu.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Continue&#039;&#039;.&lt;br /&gt;
#&#039;&#039;&#039;Define&#039;&#039;&#039; the settings for the workflow trigger:&lt;br /&gt;
#*&#039;&#039;Name:&#039;&#039; Name that is displayed in the workflow selection menu.&lt;br /&gt;
#*&#039;&#039;Description:&#039;&#039; Explanation of the function and special features of this trigger.&lt;br /&gt;
#*&#039;&#039;Workflow to start:&#039;&#039; Workflow triggered by this trigger. In our case Classificiation-workflow.&lt;br /&gt;
#*&#039;&#039;Initial data for the workflow&#039;&#039; (optional):   - Standard comment suggestion.&lt;br /&gt;
#*&#039;&#039;Conditions&#039;&#039; (optional)&#039;&#039;:&#039;&#039; In which namespaces the workflow is displayed for selection.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Save&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
Your workflow is now ready to be tested.&lt;br /&gt;
&lt;br /&gt;
==Testing the workflow==&lt;br /&gt;
The workflow is now available in the wiki.  You should test whether the following functionality is available:&lt;br /&gt;
&lt;br /&gt;
*The workflow is available to be started in the namespaces defined in the workflow trigger (if there are restrictions here).&lt;br /&gt;
*The workflow is triggered.&lt;br /&gt;
*The workflow is listed in the Worklfows Overview page.&lt;br /&gt;
*The assigned user received a task.&lt;br /&gt;
*The workflow completes correctly in case A and B.&lt;br /&gt;
&lt;br /&gt;
==Using bpmn.io to create workflow definitions==&lt;br /&gt;
Such a diagram can be created with the free [https://bpmn.io/ bpmn.io] service. The [[Media:Manual:Workflows-tutorial-raw.bpmn.xml|resulting BPMN file]] needs to be modified, before it can actually be imported and used in the wiki.&lt;br /&gt;
&lt;br /&gt;
[[de:Handbuch:Erweiterung/Workflows/Tutorial]]&lt;br /&gt;
[[en:{{FULLPAGENAME}}]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=7962</id>
		<title>Manual:Extension/Workflows/Tutorial</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=7962"/>
		<updated>2023-12-08T12:51:33Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Creating a custom workflow}}&lt;br /&gt;
&lt;br /&gt;
== Defining the workflow  ==&lt;br /&gt;
Let&#039;s assume, we want to build a workflow, that asks for some classification of a wikipage. Based on the classification of the document, it either sends an e-mail to a member of the legal team or it first appends a wiki page and then sends the e-mail to the legal team.&lt;br /&gt;
&lt;br /&gt;
The described workflow consists of four activities and one gateway. You can create a BPMN-Diagramm in the wiki to visualize the process:&lt;br /&gt;
[[File:Workflows-tutorial-diagram.svg|center|thumb|700x700px|alt=Document classification workflow|Document classification workflow]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
To create the workflow, the following steps are necessary:&lt;br /&gt;
&lt;br /&gt;
#Creating a custom &#039;&#039;&#039;workflow definition:&#039;&#039;&#039; &amp;lt;code&amp;gt;MediaWiki:Classification-workflow.bpmn&amp;lt;/code&amp;gt;&lt;br /&gt;
#Creating and connecting an &#039;&#039;&#039;initiation form&#039;&#039;&#039; that adds some information about the workflow before it sends the task. &amp;lt;code&amp;gt;MediaWiki:ContentClassificationInit.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#Creating and connecting the &#039;&#039;&#039;classification form&#039;&#039;&#039; that allows the assigned user to classify the document. &amp;lt;code&amp;gt;MediaWiki:ContentClassificationRequest.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#Adding a &#039;&#039;&#039;trigger&#039;&#039;&#039; to the wiki that defines where and how to start the workflow.&lt;br /&gt;
&lt;br /&gt;
==Instructions==&lt;br /&gt;
&lt;br /&gt;
===Creating a custom workflow definition===&lt;br /&gt;
First, let&#039;s create a page called &amp;lt;code&amp;gt;MediaWiki:Classification-workflow.bpmn&amp;lt;/code&amp;gt; with the most basic stub XML. Each workflow that you define in the wiki needs the elements that you see here:&lt;br /&gt;
&lt;br /&gt;
*Line 1: The xml prolog&lt;br /&gt;
*Line 2: The definitions element, which denotes the namespaces where the workflow elements are defined.&lt;br /&gt;
*Line3: The process element, which contains all other elements.&lt;br /&gt;
*Line 5: The workflow runs in the context of a specific revision of a wiki page.&lt;br /&gt;
*Line 11: The workflow needs a startEvent and&lt;br /&gt;
*Line 18: The workflow needs an endEvent.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	    &amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The above stub xml only features the &amp;quot;Start&amp;quot; and &amp;quot;End&amp;quot; event including - yet to be defined - &amp;quot;outgoing&amp;quot; and &amp;quot;incoming&amp;quot; flow references.&lt;br /&gt;
&lt;br /&gt;
====Creating and connecting an initiation form====&lt;br /&gt;
The initiation form allows to interact with the user who starts the workflow. It explains what happens when the workflow is started and allows to add a comment to provide some context for the user task.&lt;br /&gt;
&lt;br /&gt;
We are using the MediaWiki namespace here to make sure not every user can edit the form later. But in general, such forms can be created everywhere in the wiki.&lt;br /&gt;
&lt;br /&gt;
[[File:WF-Tutorial initForm.png|alt=Worfklow initiation form|center|thumb|550x550px|Worfklow initiation form]]&lt;br /&gt;
To create the initiation form:&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Create&#039;&#039;&#039; the page &amp;lt;code&amp;gt;MediaWiki:ContentClassificationInit.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Paste&#039;&#039;&#039; the following form definition in source edit mode:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;lang&amp;quot;: &amp;quot;json&amp;quot;,&lt;br /&gt;
    &amp;quot;form_name&amp;quot;: &amp;quot;ContentClassificationInit&amp;quot;,&lt;br /&gt;
    &amp;quot;items&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;intro&amp;quot;,&lt;br /&gt;
            &amp;quot;widget_label&amp;quot;: &amp;quot;Click  \&amp;quot;Start\&amp;quot; to ask an expert for classification. You can leave a comment for the expert below&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;label&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;comment&amp;quot;,&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Comment&amp;quot;,&lt;br /&gt;
            &amp;quot;noLayout&amp;quot;: true,&lt;br /&gt;
            &amp;quot;showOn&amp;quot;: [&lt;br /&gt;
                &amp;quot;create&amp;quot;,&lt;br /&gt;
                &amp;quot;edit&amp;quot;,&lt;br /&gt;
                &amp;quot;view&amp;quot;&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;editableOn&amp;quot;: [&lt;br /&gt;
                &amp;quot;create&amp;quot;,&lt;br /&gt;
                &amp;quot;edit&amp;quot;&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;textarea&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Save&#039;&#039;&#039; the page.&lt;br /&gt;
&lt;br /&gt;
Next, we tell the BPMN with the following userTask to show the form: &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Let&#039;s look at what this does: &lt;br /&gt;
&lt;br /&gt;
*The &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; of this activity are set to &amp;quot;InitializeWorkflow&amp;quot;  and &amp;quot;Start Content Classification Workflow&amp;quot;. Both values do not need to match, but usually they do.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;wf:type&amp;gt; is &#039;&#039;custom_form&#039;&#039; and tells the workflow that a form directly in the wiki (as opposed to a form located in code) is available.&lt;br /&gt;
*&amp;lt;wf:form&amp;gt; points to the actual form page in the wiki&lt;br /&gt;
*&amp;lt;wf:initializer&amp;gt; is set to &#039;&#039;true&#039;&#039; since it is used to show or collect some information before the actual workflow starts.&lt;br /&gt;
&lt;br /&gt;
At the end, we have the incoming and outgoing flows referenced. (Note: the order of elements does not matter usually; only the nesting is important).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
We add this &#039;&#039;&#039;userTask&#039;&#039;&#039; on line 16, after the line  &#039;&#039;&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&#039;&#039;:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	    &amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
        	&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializ&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
        &amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
       &amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating and connecting the classification form====&lt;br /&gt;
The workflow will show a classification form to a user. This user will be defined in the workflow in a later step. &lt;br /&gt;
&lt;br /&gt;
To create the classification form: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Create&#039;&#039;&#039; the page &amp;lt;code&amp;gt;MediaWiki:ContentClassificationRequest.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Paste&#039;&#039;&#039; the following form definition in source edit mode:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;lang&amp;quot;: &amp;quot;json&amp;quot;,&lt;br /&gt;
	&amp;quot;form_name&amp;quot;: &amp;quot;ContentClassificationRequest&amp;quot;,&lt;br /&gt;
	&amp;quot;items&amp;quot;: [&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;name&amp;quot;: &amp;quot;intro&amp;quot;,&lt;br /&gt;
			&amp;quot;widget_label&amp;quot;: &amp;quot;Please review the given document and select an appropriate classification for the content from the list below&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;label&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;name&amp;quot;: &amp;quot;classification&amp;quot;,&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Classification&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true,&lt;br /&gt;
			&amp;quot;options&amp;quot;: [&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;data&amp;quot;: &amp;quot;CLSA&amp;quot;,&lt;br /&gt;
					&amp;quot;label&amp;quot;: &amp;quot;Class A&amp;quot;&lt;br /&gt;
				},&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;data&amp;quot;: &amp;quot;CLSB&amp;quot;,&lt;br /&gt;
					&amp;quot;label&amp;quot;: &amp;quot;Class B&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			],&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;dropdown&amp;quot;,&lt;br /&gt;
			&amp;quot;widget_$overlay&amp;quot;: true&lt;br /&gt;
		}&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, we tell the BPMN to show the form to user that receives the workflow task. For that, we add a &#039;&#039;userTask&#039;&#039; activity:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;AskForClassification&amp;quot; name=&amp;quot;Provide classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationRequest&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
			    &amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;assigned_user&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{ROOTPAGENAME:{{#show:{{FULLPAGENAME}}|?Responsible|link=none|default=TheBoss}}}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;due_date&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{#time:YmdHis|now + 7 days}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;classification&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToAskForClassification&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAskForClassificationToGateway&amp;quot; sourceRef=&amp;quot;AskForClassification&amp;quot; targetRef=&amp;quot;Gateway&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should have a close look. This userTask has some additional properties besides the form reference (which was already explained in the initiation form):&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;assigned user:&#039;&#039;&#039;  The &amp;lt;code&amp;gt;assigned_user&amp;lt;/code&amp;gt; property is mandatory,  as the workflow engine must know which user to query.   In this case, we use some wikitext magic to calculate the assigned user from the context. The value consists of a combination of a wikitext variable and a parserfunction (this particular parserfunction is defined by the Semantic MediaWiki extension, which can be seen as a dependency here). The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#show}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parserfunction tries to get a username from a semantic property, that may or may not be set on the page the workflow is started on. If it does not find a proper information, it will fallback to &amp;lt;code&amp;gt;TheBoss&amp;lt;/code&amp;gt; (assuming that such a user exists on the wiki). The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ROOTPAGENAME}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; variable is just an easy way to strip the &amp;quot;User&amp;quot; namespace, if the looked up value was something like &amp;lt;code&amp;gt;User:JaneDoe&amp;lt;/code&amp;gt; instead of just &amp;lt;code&amp;gt;JaneDoe&amp;lt;/code&amp;gt;.&lt;br /&gt;
*&#039;&#039;&#039;due date:&#039;&#039;&#039; The &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; property is also mandatory. All user facing activities need a due date. If the running activity is overdue, the workflow engine will end the workflow. In this case, we implement a concept of &amp;quot;lay days&amp;quot;, as we do not have an absolute due date, but calculate it from the time the activity gets started using the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#time}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parserfunction.&lt;br /&gt;
*&#039;&#039;&#039;classification:&#039;&#039;&#039; The &amp;lt;code&amp;gt;classification&amp;lt;/code&amp;gt; property is a random one. It must be specified, in order to allow the form to set it and the workflow context to access it. We could have provided a default value, but we want to keep it empty.&lt;br /&gt;
At the end, we have the incoming and outgoing flows referenced. (Note: the order of elements does not matter usually; only the nesting is important).&lt;br /&gt;
&lt;br /&gt;
====The gateway====&lt;br /&gt;
Now we can proceed with adding the gateway.&lt;br /&gt;
&lt;br /&gt;
The gateway will provide the two necessary paths:&lt;br /&gt;
&lt;br /&gt;
#If the assigned user classified the document as Class A (CLSA), an email will be sent to the legal department.&lt;br /&gt;
#If the assigned user classified the document as Class B (CLSB), a wiki page will be appended with the content defined in the task &amp;quot;AppendWikipage&amp;quot;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:exclusiveGateway id=&amp;quot;Gateway&amp;quot; name=&amp;quot;AskForClassification.classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:exclusiveGateway&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToSendMail&amp;quot; name=&amp;quot;CLSA&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToAppendWikipage&amp;quot; name=&amp;quot;CLSB&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;AppendWikipage&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After setting up the gateway, we need to define the tworelated activities.&lt;br /&gt;
&lt;br /&gt;
====Sending an mail to the legal department====&lt;br /&gt;
For case 1, we need the workflow to immediately send an email:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;SendMail&amp;quot; name=&amp;quot;Send mail&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;send_mail&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;recipient&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[legal@company.local]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;subject&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[New &amp;quot;Class A&amp;quot; content: {{FULLPAGENAME}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;body&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[Please check further actions now!]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromEndMailToTheEnd&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromEndMailToTheEnd&amp;quot; sourceRef=&amp;quot;SendMail&amp;quot; targetRef=&amp;quot;TheEnd&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Appending a wikipage====&lt;br /&gt;
For case 2, we want the workflow to append the existing page &#039;&#039;Classification_incidents&#039;&#039; with the text shown in the &#039;&#039;content&#039;&#039; property. &lt;br /&gt;
&lt;br /&gt;
This requirement can be fulfilled with the &#039;&#039;edit_page&#039;&#039;  activity type:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;AppendWikipage&amp;quot; name=&amp;quot;Append wikipage&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;edit_page&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;title&amp;quot; default=&amp;quot;Classification_incidents&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;user&amp;quot; default=&amp;quot;Mediawiki default&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;content&amp;quot; default=&amp;quot;* [[{{FULLPAGENAME}}]] was classified {{{AskForClassification.classification}}}&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;mode&amp;quot; default=&amp;quot;append&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;minor&amp;quot; default=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAppendWikipageToSendMail&amp;quot; sourceRef=&amp;quot;AppendWikipage&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following properties are set for this activity type:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;name:&#039;&#039; title of the wiki page to which the content will be appended.&lt;br /&gt;
*&#039;&#039;user:&#039;&#039; user that is shown in the version history of the wiki page that was appended.&lt;br /&gt;
*&#039;&#039;content:&#039;&#039; text that is added to the wiki page.&lt;br /&gt;
*&#039;&#039;mode:&#039;&#039; shows where the text is added to the wiki page (append or ???)&lt;br /&gt;
*&#039;&#039;minor: s&#039;&#039;ets this page revision as a minor revision (1) or major revision (2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
After this task is completed, the workflow will send an email to the legal department.&lt;br /&gt;
&lt;br /&gt;
====The final BPMN====&lt;br /&gt;
In the end, the bpmn page for the workflow looks like this:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions&lt;br /&gt;
	xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot;&lt;br /&gt;
	xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;AskForClassification&amp;quot; name=&amp;quot;Provide classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationRequest&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;assigned_user&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{ROOTPAGENAME:{{#show:{{FULLPAGENAME}}|?Responsible|link=none|default=TheBoss}}}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;due_date&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{#time:YmdHis|now + 7 days}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;classification&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAskForClassificationToGateway&amp;quot; sourceRef=&amp;quot;AskForClassification&amp;quot; targetRef=&amp;quot;Gateway&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:exclusiveGateway id=&amp;quot;Gateway&amp;quot; name=&amp;quot;AskForClassification.classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:exclusiveGateway&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToSendMail&amp;quot; name=&amp;quot;CLSA&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToAppendWikipage&amp;quot; name=&amp;quot;CLSB&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;AppendWikipage&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;SendMail&amp;quot; name=&amp;quot;Send mail&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;send_mail&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;recipient&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[legal@company.local]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;subject&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[New &amp;quot;Class A&amp;quot; content: {{FULLPAGENAME}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;body&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[Please check further actions now!]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromEndMailToTheEnd&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromEndMailToTheEnd&amp;quot; sourceRef=&amp;quot;SendMail&amp;quot; targetRef=&amp;quot;TheEnd&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;AppendWikipage&amp;quot; name=&amp;quot;Append wikipage&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;edit_page&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;title&amp;quot; default=&amp;quot;Classification_incidents&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;user&amp;quot; default=&amp;quot;MediaWiki default&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;content&amp;quot; default=&amp;quot;* [[{{FULLPAGENAME}}]] was classified {{{AskForClassification.classification}}}&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;mode&amp;quot; default=&amp;quot;append&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;minor&amp;quot; default=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAppendWikipageToSendMail&amp;quot; sourceRef=&amp;quot;AppendWikipage&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
workflows-activity-editpage-summary&lt;br /&gt;
&lt;br /&gt;
==Creating a workflow trigger==&lt;br /&gt;
For the workflow to appear in the wiki, we need to define a trigger:&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Workflow triggers&#039;&#039; in the Global actions menu.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Add new trigger&#039;&#039;.&lt;br /&gt;
#&#039;&#039;&#039;Select&#039;&#039;&#039; the option &#039;&#039;Manual&#039;&#039; from the dropdown menu.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Continue&#039;&#039;.&lt;br /&gt;
#&#039;&#039;&#039;Define&#039;&#039;&#039; the settings for the workflow trigger:&lt;br /&gt;
#*&#039;&#039;Name:&#039;&#039; Name that is displayed in the workflow selection menu.&lt;br /&gt;
#*&#039;&#039;Description:&#039;&#039; Explanation of the function and special features of this trigger.&lt;br /&gt;
#*&#039;&#039;Workflow to start:&#039;&#039; Workflow triggered by this trigger. In our case Classificiation-workflow.&lt;br /&gt;
#*&#039;&#039;Initial data for the workflow&#039;&#039; (optional):   - Standard comment suggestion.&lt;br /&gt;
#*&#039;&#039;Conditions&#039;&#039; (optional)&#039;&#039;:&#039;&#039; In which namespaces the workflow is displayed for selection.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Save&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
Your workflow is now ready to be tested.&lt;br /&gt;
&lt;br /&gt;
==Testing the workflow==&lt;br /&gt;
The workflow is now available in the wiki.  You should test whether the following functionality is available:&lt;br /&gt;
&lt;br /&gt;
*The workflow is available to be started in the namespaces defined in the workflow trigger (if there are restrictions here).&lt;br /&gt;
*The workflow is triggered.&lt;br /&gt;
*The workflow is listed in the Worklfows Overview page.&lt;br /&gt;
*The assigned user received a task.&lt;br /&gt;
*The workflow completes correctly in case A and B.&lt;br /&gt;
&lt;br /&gt;
==Using bpmn.io to create workflow definitions==&lt;br /&gt;
Such a diagram can be created with the free [https://bpmn.io/ bpmn.io] service. The [[Media:Manual:Workflows-tutorial-raw.bpmn.xml|resulting BPMN file]] needs to be modified, before it can actually be imported and used in the wiki.&lt;br /&gt;
&lt;br /&gt;
[[de:Handbuch:Erweiterung/Workflows/Tutorial]]&lt;br /&gt;
[[en:{{FULLPAGENAME}}]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=7961</id>
		<title>Manual:Extension/Workflows/Tutorial</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=7961"/>
		<updated>2023-12-08T12:50:11Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Creating a custom workflow}}&lt;br /&gt;
&lt;br /&gt;
== Defining the workflow  ==&lt;br /&gt;
Let&#039;s assume, we want to build a workflow, that asks for some classification of a wikipage. Based on the classification of the document, it either sends an e-mail to a member of the legal team or it first appends a wiki page and then sends the e-mail to the legal team.&lt;br /&gt;
&lt;br /&gt;
The described workflow consists of four activities and one gateway. You can create a BPMN-Diagramm in the wiki to visualize the process:&lt;br /&gt;
[[File:Workflows-tutorial-diagram.svg|center|thumb|700x700px|alt=Document classification workflow|Document classification workflow]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
To create the workflow, the following steps are necessary:&lt;br /&gt;
&lt;br /&gt;
#Creating a custom &#039;&#039;&#039;workflow definition:&#039;&#039;&#039; &amp;lt;code&amp;gt;MediaWiki:Classification-workflow.bpmn&amp;lt;/code&amp;gt;&lt;br /&gt;
#Creating and connecting an &#039;&#039;&#039;initiation form&#039;&#039;&#039; that adds some information about the workflow before it sends the task. &amp;lt;code&amp;gt;MediaWiki:ContentClassificationInit.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#Creating and connecting the &#039;&#039;&#039;classification form&#039;&#039;&#039; that allows the assigned user to classify the document. &amp;lt;code&amp;gt;MediaWiki:ContentClassificationRequest.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#Adding a &#039;&#039;&#039;trigger&#039;&#039;&#039; to the wiki that defines where and how to start the workflow.&lt;br /&gt;
&lt;br /&gt;
==Instructions==&lt;br /&gt;
&lt;br /&gt;
===Creating a custom workflow definition===&lt;br /&gt;
First, let&#039;s create a page called &amp;lt;code&amp;gt;MediaWiki:Classification-workflow.bpmn&amp;lt;/code&amp;gt; with the most basic stub XML. Each workflow that you define in the wiki needs the elements that you see here:&lt;br /&gt;
&lt;br /&gt;
*Line 1: The xml prolog&lt;br /&gt;
*Line 2: The definitions element, which denotes the namespaces where the workflow elements are defined.&lt;br /&gt;
*Line3: The process element, which contains all other elements.&lt;br /&gt;
*Line 5: The workflow runs in the context of a specific revision of a wiki page.&lt;br /&gt;
*Line 11: The workflow needs a startEvent and&lt;br /&gt;
*Line 18: The workflow needs an endEvent.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	    &amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The above stub xml only features the &amp;quot;Start&amp;quot; and &amp;quot;End&amp;quot; event including - yet to be defined - &amp;quot;outgoing&amp;quot; and &amp;quot;incoming&amp;quot; flow references.&lt;br /&gt;
&lt;br /&gt;
====Creating and connecting an initiation form====&lt;br /&gt;
The initiation form allows to interact with the user who starts the workflow. It explains what happens when the workflow is started and allows to add a comment to provide some context for the user task.&lt;br /&gt;
&lt;br /&gt;
We are using the MediaWiki namespace here to make sure not every user can edit the form later. But in general, such forms can be created everywhere in the wiki.&lt;br /&gt;
&lt;br /&gt;
[[File:WF-Tutorial initForm.png|alt=Worfklow initiation form|center|thumb|550x550px|Worfklow initiation form]]&lt;br /&gt;
To create the initiation form:&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Create&#039;&#039;&#039; the page &amp;lt;code&amp;gt;MediaWiki:ContentClassificationInit.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Paste&#039;&#039;&#039; the following form definition in source edit mode:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;lang&amp;quot;: &amp;quot;json&amp;quot;,&lt;br /&gt;
    &amp;quot;form_name&amp;quot;: &amp;quot;ContentClassificationInit&amp;quot;,&lt;br /&gt;
    &amp;quot;items&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;intro&amp;quot;,&lt;br /&gt;
            &amp;quot;widget_label&amp;quot;: &amp;quot;Click  \&amp;quot;Start\&amp;quot; to ask an expert for classification. You can leave a comment for the expert below&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;label&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;comment&amp;quot;,&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Comment&amp;quot;,&lt;br /&gt;
            &amp;quot;noLayout&amp;quot;: true,&lt;br /&gt;
            &amp;quot;showOn&amp;quot;: [&lt;br /&gt;
                &amp;quot;create&amp;quot;,&lt;br /&gt;
                &amp;quot;edit&amp;quot;,&lt;br /&gt;
                &amp;quot;view&amp;quot;&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;editableOn&amp;quot;: [&lt;br /&gt;
                &amp;quot;create&amp;quot;,&lt;br /&gt;
                &amp;quot;edit&amp;quot;&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;textarea&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Save&#039;&#039;&#039; the page.&lt;br /&gt;
&lt;br /&gt;
Next, we tell the BPMN with the following userTask to show the form: &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Let&#039;s look at what this does: &lt;br /&gt;
&lt;br /&gt;
*The &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; of this activity are set to &amp;quot;InitializeWorkflow&amp;quot;  and &amp;quot;Start Content Classification Workflow&amp;quot;. Both values do not need to match, but usually they do.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;wf:type&amp;gt; is &#039;&#039;custom_form&#039;&#039; and tells the workflow that a form directly in the wiki (as opposed to a form located in code) is available.&lt;br /&gt;
*&amp;lt;wf:form&amp;gt; points to the actual form page in the wiki&lt;br /&gt;
*&amp;lt;wf:initializer&amp;gt; is set to &#039;&#039;true&#039;&#039; since it is used to show or collect some information before the actual workflow starts.&lt;br /&gt;
&lt;br /&gt;
At the end, we have the incoming and outgoing flows referenced. (Note: the order of elements does not matter usually; only the nesting is important).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
We add this &#039;&#039;&#039;userTask&#039;&#039;&#039; on line 16, after the line  &#039;&#039;&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&#039;&#039;:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	    &amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
        	&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializ&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
        &amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
       &amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating and connecting the classification form====&lt;br /&gt;
The workflow will show a classification form to a user. This user will be defined in the workflow in a later step. &lt;br /&gt;
&lt;br /&gt;
To create the classification form: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Create&#039;&#039;&#039; the page &amp;lt;code&amp;gt;MediaWiki:ContentClassificationRequest.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Paste&#039;&#039;&#039; the following form definition in source edit mode:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;lang&amp;quot;: &amp;quot;json&amp;quot;,&lt;br /&gt;
	&amp;quot;form_name&amp;quot;: &amp;quot;ContentClassificationRequest&amp;quot;,&lt;br /&gt;
	&amp;quot;items&amp;quot;: [&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;name&amp;quot;: &amp;quot;intro&amp;quot;,&lt;br /&gt;
			&amp;quot;widget_label&amp;quot;: &amp;quot;Please review the given document and select an appropriate classification for the content from the list below&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;label&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;name&amp;quot;: &amp;quot;classification&amp;quot;,&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Classification&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true,&lt;br /&gt;
			&amp;quot;options&amp;quot;: [&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;data&amp;quot;: &amp;quot;CLSA&amp;quot;,&lt;br /&gt;
					&amp;quot;label&amp;quot;: &amp;quot;Class A&amp;quot;&lt;br /&gt;
				},&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;data&amp;quot;: &amp;quot;CLSB&amp;quot;,&lt;br /&gt;
					&amp;quot;label&amp;quot;: &amp;quot;Class B&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			],&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;dropdown&amp;quot;,&lt;br /&gt;
			&amp;quot;widget_$overlay&amp;quot;: true&lt;br /&gt;
		}&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, we tell the BPMN to show the form to user that receives the workflow task. For that, we add a &#039;&#039;userTask&#039;&#039; activity:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;AskForClassification&amp;quot; name=&amp;quot;Provide classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationRequest&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
			    &amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;assigned_user&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{ROOTPAGENAME:{{#show:{{FULLPAGENAME}}|?Responsible|link=none|default=TheBoss}}}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;due_date&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{#time:YmdHis|now + 7 days}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;classification&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToAskForClassification&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAskForClassificationToGateway&amp;quot; sourceRef=&amp;quot;AskForClassification&amp;quot; targetRef=&amp;quot;Gateway&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should have a close look. This userTask has some additional properties besides the form reference (which was already explained in the initiation form):&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;assigned user:&#039;&#039;&#039;  The &amp;lt;code&amp;gt;assigned_user&amp;lt;/code&amp;gt; property is mandatory,  as the workflow engine must know which user to query.   In this case, we use some wikitext magic to calculate the assigned user from the context. The value consists of a combination of a wikitext variable and a parserfunction (this particular parserfunction is defined by the Semantic MediaWiki extension, which can be seen as a dependency here). The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#show}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parserfunction tries to get a username from a semantic property, that may or may not be set on the page the workflow is started on. If it does not find a proper information, it will fallback to &amp;lt;code&amp;gt;TheBoss&amp;lt;/code&amp;gt; (assuming that such a user exists on the wiki). The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ROOTPAGENAME}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; variable is just an easy way to strip the &amp;quot;User&amp;quot; namespace, if the looked up value was something like &amp;lt;code&amp;gt;User:JaneDoe&amp;lt;/code&amp;gt; instead of just &amp;lt;code&amp;gt;JaneDoe&amp;lt;/code&amp;gt;.&lt;br /&gt;
*&#039;&#039;&#039;due date:&#039;&#039;&#039; The &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; property is also mandatory. All user facing activities need a due date. If the running activity is overdue, the workflow engine will end the workflow. In this case, we implement a concept of &amp;quot;lay days&amp;quot;, as we do not have an absolute due date, but calculate it from the time the activity gets started using the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#time}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parserfunction.&lt;br /&gt;
*&#039;&#039;&#039;classification:&#039;&#039;&#039; The &amp;lt;code&amp;gt;classification&amp;lt;/code&amp;gt; property is a random one. It must be specified, in order to allow the form to set it and the workflow context to access it. We could have provided a default value, but we want to keep it empty.&lt;br /&gt;
At the end, we have the incoming and outgoing flows referenced. (Note: the order of elements does not matter usually; only the nesting is important).&lt;br /&gt;
&lt;br /&gt;
====The gateway====&lt;br /&gt;
Now we can proceed with adding the gateway.&lt;br /&gt;
&lt;br /&gt;
The gateway will provide the two necessary paths:&lt;br /&gt;
&lt;br /&gt;
#If the assigned user classified the document as Class A (CLSA), an email will be sent to the legal department.&lt;br /&gt;
#If the assigned user classified the document as Class B (CLSB), a wiki page will be appended with the content defined in the task &amp;quot;AppendWikipage&amp;quot;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:exclusiveGateway id=&amp;quot;Gateway&amp;quot; name=&amp;quot;AskForClassification.classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:exclusiveGateway&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToSendMail&amp;quot; name=&amp;quot;CLSA&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToAppendWikipage&amp;quot; name=&amp;quot;CLSB&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;AppendWikipage&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After setting up the gateway, we need to define the tworelated activities.&lt;br /&gt;
&lt;br /&gt;
====Sending an mail to the legal department====&lt;br /&gt;
For case 1, we need the workflow to immediately send an email:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;SendMail&amp;quot; name=&amp;quot;Send mail&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;send_mail&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;recipient&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[legal@company.local]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;subject&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[New &amp;quot;Class A&amp;quot; content: {{FULLPAGENAME}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;body&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[Please check further actions now!]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromEndMailToTheEnd&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromEndMailToTheEnd&amp;quot; sourceRef=&amp;quot;SendMail&amp;quot; targetRef=&amp;quot;TheEnd&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Appending a wikipage====&lt;br /&gt;
For case 2, we want the workflow to append the existing page &#039;&#039;Classification_incidents&#039;&#039; with the text shown in the &#039;&#039;content&#039;&#039; property. &lt;br /&gt;
&lt;br /&gt;
This requirement can be fulfilled with the &#039;&#039;edit_page&#039;&#039;  activity type:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;AppendWikipage&amp;quot; name=&amp;quot;Append wikipage&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;edit_page&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;title&amp;quot; default=&amp;quot;Classification_incidents&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;user&amp;quot; default=&amp;quot;Mediawiki default&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;content&amp;quot; default=&amp;quot;* [[{{FULLPAGENAME}}]] was classified {{{AskForClassification.classification}}}&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;mode&amp;quot; default=&amp;quot;append&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;minor&amp;quot; default=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAppendWikipageToSendMail&amp;quot; sourceRef=&amp;quot;AppendWikipage&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following properties are set for this activity type:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;name:&#039;&#039; title of the wiki page to which the content will be appended.&lt;br /&gt;
*&#039;&#039;user:&#039;&#039; user that is shown in the version history of the wiki page that was appended.&lt;br /&gt;
*&#039;&#039;content:&#039;&#039; text that is added to the wiki page.&lt;br /&gt;
*&#039;&#039;mode:&#039;&#039; shows where the text is added to the wiki page (append or ???)&lt;br /&gt;
*&#039;&#039;minor: s&#039;&#039;ets this page revision as a minor revision (1) or major revision (2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
After this task is completed, the workflow will send an email to the legal department.&lt;br /&gt;
&lt;br /&gt;
====The final BPMN====&lt;br /&gt;
In the end, the bpmn page for the workflow looks like this:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions&lt;br /&gt;
	xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot;&lt;br /&gt;
	xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;AskForClassification&amp;quot; name=&amp;quot;Provide classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationRequest&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;assigned_user&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{ROOTPAGENAME:{{#show:{{FULLPAGENAME}}|?Responsible|link=none|default=TheBoss}}}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;due_date&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{#time:YmdHis|now + 7 days}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;classification&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAskForClassificationToGateway&amp;quot; sourceRef=&amp;quot;AskForClassification&amp;quot; targetRef=&amp;quot;Gateway&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:exclusiveGateway id=&amp;quot;Gateway&amp;quot; name=&amp;quot;AskForClassification.classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:exclusiveGateway&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToSendMail&amp;quot; name=&amp;quot;CLSA&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToAppendWikipage&amp;quot; name=&amp;quot;CLSB&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;AppendWikipage&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;SendMail&amp;quot; name=&amp;quot;Send mail&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;send_mail&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;recipient&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[legal@company.local]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;subject&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[New &amp;quot;Class A&amp;quot; content: {{FULLPAGENAME}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;body&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[Please check further actions now!]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromEndMailToTheEnd&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromEndMailToTheEnd&amp;quot; sourceRef=&amp;quot;SendMail&amp;quot; targetRef=&amp;quot;TheEnd&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;AppendWikipage&amp;quot; name=&amp;quot;Append wikipage&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;edit_page&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;title&amp;quot; default=&amp;quot;Classification_incidents&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;user&amp;quot; default=&amp;quot;MediaWiki default&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;content&amp;quot; default=&amp;quot;* [[{{FULLPAGENAME}}]] was classified {{{AskForClassification.classification}}}&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;mode&amp;quot; default=&amp;quot;append&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;minor&amp;quot; default=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAppendWikipageToSendMail&amp;quot; sourceRef=&amp;quot;AppendWikipage&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
workflows-activity-editpage-summary&lt;br /&gt;
&lt;br /&gt;
==Creating a workflow trigger==&lt;br /&gt;
For the workflow to appear in the wiki, we need to define a trigger:&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Workflow triggers&#039;&#039; in the Global actions menu.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Add new trigger&#039;&#039;.&lt;br /&gt;
#&#039;&#039;&#039;Select&#039;&#039;&#039; the option &#039;&#039;Manual&#039;&#039; from the dropdown menu.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Continue&#039;&#039;.&lt;br /&gt;
#&#039;&#039;&#039;Define&#039;&#039;&#039; the settings for the workflow trigger:&lt;br /&gt;
#*&#039;&#039;Name:&#039;&#039; Name that is displayed in the workflow selection menu.&lt;br /&gt;
#*&#039;&#039;Description:&#039;&#039; Explanation of the function and special features of this trigger.&lt;br /&gt;
#*&#039;&#039;Workflow to start:&#039;&#039; Workflow triggered by this trigger. In our case Classificiation-workflow.&lt;br /&gt;
#*&#039;&#039;Initial data for the workflow&#039;&#039; (optional):   - Standard comment suggestion.&lt;br /&gt;
#*&#039;&#039;Conditions&#039;&#039; (optional)&#039;&#039;:&#039;&#039; In which namespaces the workflow is displayed for selection.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Save&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
Your workflow is now ready to be tested.&lt;br /&gt;
&lt;br /&gt;
==Testing the workflow==&lt;br /&gt;
The workflow is now available in the wiki.  You should test whether the following functionality is available:&lt;br /&gt;
&lt;br /&gt;
*The workflow is available to be started in the namespaces defined in the workflow trigger (if there are restrictions here).&lt;br /&gt;
*The workflow is triggered.&lt;br /&gt;
*The workflow is listed in the Worklfows Overview page.&lt;br /&gt;
*The assigned user received a task.&lt;br /&gt;
*The workflow completes correctly in case A and B.&lt;br /&gt;
&lt;br /&gt;
==Using bpmn.io to create workflow definitions==&lt;br /&gt;
Such a diagram can be created with the free [https://bpmn.io/ bpmn.io] service. The [[Media:Manual:Workflows-tutorial-raw.bpmn.xml|resulting BPMN file]] needs to be modified, before it can actually be imported and used in the wiki.&lt;br /&gt;
&lt;br /&gt;
[[de:Handbuch:Erweiterung/Workflows/Tutorial]]&lt;br /&gt;
[[en:{{FULLPAGENAME}}]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=7960</id>
		<title>Manual:Extension/Workflows/Tutorial</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=7960"/>
		<updated>2023-12-08T12:48:30Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Creating a custom workflow}}&lt;br /&gt;
&lt;br /&gt;
== Defining the workflow  ==&lt;br /&gt;
Let&#039;s assume, we want to build a workflow, that asks for some classification of a wikipage. Based on the classification of the document, it either sends an e-mail to a member of the legal team or it first appends a wiki page and then sends the e-mail to the legal team.&lt;br /&gt;
&lt;br /&gt;
The described workflow consists of four activities and one gateway. You can create a BPMN-Diagramm in the wiki to visualize the process:&lt;br /&gt;
[[File:Workflows-tutorial-diagram.svg|center|thumb|700x700px|alt=Document classification workflow|Document classification workflow]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
To create the workflow, the following steps are necessary:&lt;br /&gt;
&lt;br /&gt;
#Creating a custom &#039;&#039;&#039;workflow definition:&#039;&#039;&#039; &amp;lt;code&amp;gt;MediaWiki:Classification-workflow.bpmn&amp;lt;/code&amp;gt;&lt;br /&gt;
#Creating and connecting an &#039;&#039;&#039;initiation form&#039;&#039;&#039; that adds some information about the workflow before it sends the task. &amp;lt;code&amp;gt;MediaWiki:ContentClassificationInit.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#Creating and connecting the &#039;&#039;&#039;classification form&#039;&#039;&#039; that allows the assigned user to classify the document. &amp;lt;code&amp;gt;MediaWiki:ContentClassificiationRequest.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#Adding a &#039;&#039;&#039;trigger&#039;&#039;&#039; to the wiki that defines where and how to start the workflow.&lt;br /&gt;
&lt;br /&gt;
==Instructions==&lt;br /&gt;
&lt;br /&gt;
===Creating a custom workflow definition===&lt;br /&gt;
First, let&#039;s create a page called &amp;lt;code&amp;gt;MediaWiki:Classification-workflow.bpmn&amp;lt;/code&amp;gt; with the most basic stub XML. Each workflow that you define in the wiki needs the elements that you see here:&lt;br /&gt;
&lt;br /&gt;
*Line 1: The xml prolog&lt;br /&gt;
*Line 2: The definitions element, which denotes the namespaces where the workflow elements are defined.&lt;br /&gt;
*Line3: The process element, which contains all other elements.&lt;br /&gt;
*Line 5: The workflow runs in the context of a specific revision of a wiki page.&lt;br /&gt;
*Line 11: The workflow needs a startEvent and&lt;br /&gt;
*Line 18: The workflow needs an endEvent.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	    &amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The above stub xml only features the &amp;quot;Start&amp;quot; and &amp;quot;End&amp;quot; event including - yet to be defined - &amp;quot;outgoing&amp;quot; and &amp;quot;incoming&amp;quot; flow references.&lt;br /&gt;
&lt;br /&gt;
====Creating and connecting an initiation form====&lt;br /&gt;
The initiation form allows to interact with the user who starts the workflow. It explains what happens when the workflow is started and allows to add a comment to provide some context for the user task.&lt;br /&gt;
&lt;br /&gt;
We are using the MediaWiki namespace here to make sure not every user can edit the form later. But in general, such forms can be created everywhere in the wiki.&lt;br /&gt;
&lt;br /&gt;
[[File:WF-Tutorial initForm.png|alt=Worfklow initiation form|center|thumb|550x550px|Worfklow initiation form]]&lt;br /&gt;
To create the initiation form:&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Create&#039;&#039;&#039; the page &amp;lt;code&amp;gt;MediaWiki:ContentClassificationInit.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Paste&#039;&#039;&#039; the following form definition in source edit mode:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;lang&amp;quot;: &amp;quot;json&amp;quot;,&lt;br /&gt;
    &amp;quot;form_name&amp;quot;: &amp;quot;ContentClassificationInit&amp;quot;,&lt;br /&gt;
    &amp;quot;items&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;intro&amp;quot;,&lt;br /&gt;
            &amp;quot;widget_label&amp;quot;: &amp;quot;Click  \&amp;quot;Start\&amp;quot; to ask an expert for classification. You can leave a comment for the expert below&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;label&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;comment&amp;quot;,&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Comment&amp;quot;,&lt;br /&gt;
            &amp;quot;noLayout&amp;quot;: true,&lt;br /&gt;
            &amp;quot;showOn&amp;quot;: [&lt;br /&gt;
                &amp;quot;create&amp;quot;,&lt;br /&gt;
                &amp;quot;edit&amp;quot;,&lt;br /&gt;
                &amp;quot;view&amp;quot;&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;editableOn&amp;quot;: [&lt;br /&gt;
                &amp;quot;create&amp;quot;,&lt;br /&gt;
                &amp;quot;edit&amp;quot;&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;textarea&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Save&#039;&#039;&#039; the page.&lt;br /&gt;
&lt;br /&gt;
Next, we tell the BPMN with the following userTask to show the form: &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Let&#039;s look at what this does: &lt;br /&gt;
&lt;br /&gt;
*The &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; of this activity are set to &amp;quot;InitializeWorkflow&amp;quot;  and &amp;quot;Start Content Classification Workflow&amp;quot;. Both values do not need to match, but usually they do.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;wf:type&amp;gt; is &#039;&#039;custom_form&#039;&#039; and tells the workflow that a form directly in the wiki (as opposed to a form located in code) is available.&lt;br /&gt;
*&amp;lt;wf:form&amp;gt; points to the actual form page in the wiki&lt;br /&gt;
*&amp;lt;wf:initializer&amp;gt; is set to &#039;&#039;true&#039;&#039; since it is used to show or collect some information before the actual workflow starts.&lt;br /&gt;
&lt;br /&gt;
At the end, we have the incoming and outgoing flows referenced. (Note: the order of elements does not matter usually; only the nesting is important).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
We add this &#039;&#039;&#039;userTask&#039;&#039;&#039; on line 16, after the line  &#039;&#039;&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&#039;&#039;:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	    &amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
        	&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializ&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
        &amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
       &amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating and connecting the classification form====&lt;br /&gt;
The workflow will show a classification form to a user. This user will be defined in the workflow in a later step. &lt;br /&gt;
&lt;br /&gt;
To create the classification form: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Create&#039;&#039;&#039; the page &amp;lt;code&amp;gt;MediaWiki:ContentClassificiationRequest.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Paste&#039;&#039;&#039; the following form definition in source edit mode:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;lang&amp;quot;: &amp;quot;json&amp;quot;,&lt;br /&gt;
	&amp;quot;form_name&amp;quot;: &amp;quot;ContentClassificationRequest&amp;quot;,&lt;br /&gt;
	&amp;quot;items&amp;quot;: [&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;name&amp;quot;: &amp;quot;intro&amp;quot;,&lt;br /&gt;
			&amp;quot;widget_label&amp;quot;: &amp;quot;Please review the given document and select an appropriate classification for the content from the list below&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;label&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;name&amp;quot;: &amp;quot;classification&amp;quot;,&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Classification&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true,&lt;br /&gt;
			&amp;quot;options&amp;quot;: [&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;data&amp;quot;: &amp;quot;CLSA&amp;quot;,&lt;br /&gt;
					&amp;quot;label&amp;quot;: &amp;quot;Class A&amp;quot;&lt;br /&gt;
				},&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;data&amp;quot;: &amp;quot;CLSB&amp;quot;,&lt;br /&gt;
					&amp;quot;label&amp;quot;: &amp;quot;Class B&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			],&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;dropdown&amp;quot;,&lt;br /&gt;
			&amp;quot;widget_$overlay&amp;quot;: true&lt;br /&gt;
		}&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, we tell the BPMN to show the form to user that receives the workflow task. For that, we add a &#039;&#039;userTask&#039;&#039; activity:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;AskForClassification&amp;quot; name=&amp;quot;Provide classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationRequest&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
			    &amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;assigned_user&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{ROOTPAGENAME:{{#show:{{FULLPAGENAME}}|?Responsible|link=none|default=TheBoss}}}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;due_date&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{#time:YmdHis|now + 7 days}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;classification&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToAskForClassification&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAskForClassificationToGateway&amp;quot; sourceRef=&amp;quot;AskForClassification&amp;quot; targetRef=&amp;quot;Gateway&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should have a close look. This userTask has some additional properties besides the form reference (which was already explained in the initiation form):&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;assigned user:&#039;&#039;&#039;  The &amp;lt;code&amp;gt;assigned_user&amp;lt;/code&amp;gt; property is mandatory,  as the workflow engine must know which user to query.   In this case, we use some wikitext magic to calculate the assigned user from the context. The value consists of a combination of a wikitext variable and a parserfunction (this particular parserfunction is defined by the Semantic MediaWiki extension, which can be seen as a dependency here). The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#show}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parserfunction tries to get a username from a semantic property, that may or may not be set on the page the workflow is started on. If it does not find a proper information, it will fallback to &amp;lt;code&amp;gt;TheBoss&amp;lt;/code&amp;gt; (assuming that such a user exists on the wiki). The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ROOTPAGENAME}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; variable is just an easy way to strip the &amp;quot;User&amp;quot; namespace, if the looked up value was something like &amp;lt;code&amp;gt;User:JaneDoe&amp;lt;/code&amp;gt; instead of just &amp;lt;code&amp;gt;JaneDoe&amp;lt;/code&amp;gt;.&lt;br /&gt;
*&#039;&#039;&#039;due date:&#039;&#039;&#039; The &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; property is also mandatory. All user facing activities need a due date. If the running activity is overdue, the workflow engine will end the workflow. In this case, we implement a concept of &amp;quot;lay days&amp;quot;, as we do not have an absolute due date, but calculate it from the time the activity gets started using the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#time}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parserfunction.&lt;br /&gt;
*&#039;&#039;&#039;classification:&#039;&#039;&#039; The &amp;lt;code&amp;gt;classification&amp;lt;/code&amp;gt; property is a random one. It must be specified, in order to allow the form to set it and the workflow context to access it. We could have provided a default value, but we want to keep it empty.&lt;br /&gt;
At the end, we have the incoming and outgoing flows referenced. (Note: the order of elements does not matter usually; only the nesting is important).&lt;br /&gt;
&lt;br /&gt;
====The gateway====&lt;br /&gt;
Now we can proceed with adding the gateway.&lt;br /&gt;
&lt;br /&gt;
The gateway will provide the two necessary paths:&lt;br /&gt;
&lt;br /&gt;
#If the assigned user classified the document as Class A (CLSA), an email will be sent to the legal department.&lt;br /&gt;
#If the assigned user classified the document as Class B (CLSB), a wiki page will be appended with the content defined in the task &amp;quot;AppendWikipage&amp;quot;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:exclusiveGateway id=&amp;quot;Gateway&amp;quot; name=&amp;quot;AskForClassification.classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:exclusiveGateway&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToSendMail&amp;quot; name=&amp;quot;CLSA&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToAppendWikipage&amp;quot; name=&amp;quot;CLSB&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;AppendWikipage&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After setting up the gateway, we need to define the tworelated activities.&lt;br /&gt;
&lt;br /&gt;
====Sending an mail to the legal department====&lt;br /&gt;
For case 1, we need the workflow to immediately send an email:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;SendMail&amp;quot; name=&amp;quot;Send mail&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;send_mail&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;recipient&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[legal@company.local]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;subject&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[New &amp;quot;Class A&amp;quot; content: {{FULLPAGENAME}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;body&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[Please check further actions now!]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromEndMailToTheEnd&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromEndMailToTheEnd&amp;quot; sourceRef=&amp;quot;SendMail&amp;quot; targetRef=&amp;quot;TheEnd&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Appending a wikipage====&lt;br /&gt;
For case 2, we want the workflow to append the existing page &#039;&#039;Classification_incidents&#039;&#039; with the text shown in the &#039;&#039;content&#039;&#039; property. &lt;br /&gt;
&lt;br /&gt;
This requirement can be fulfilled with the &#039;&#039;edit_page&#039;&#039;  activity type:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;AppendWikipage&amp;quot; name=&amp;quot;Append wikipage&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;edit_page&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;title&amp;quot; default=&amp;quot;Classification_incidents&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;user&amp;quot; default=&amp;quot;Mediawiki default&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;content&amp;quot; default=&amp;quot;* [[{{FULLPAGENAME}}]] was classified {{{AskForClassification.classification}}}&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;mode&amp;quot; default=&amp;quot;append&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;minor&amp;quot; default=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAppendWikipageToSendMail&amp;quot; sourceRef=&amp;quot;AppendWikipage&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following properties are set for this activity type:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;name:&#039;&#039; title of the wiki page to which the content will be appended.&lt;br /&gt;
*&#039;&#039;user:&#039;&#039; user that is shown in the version history of the wiki page that was appended.&lt;br /&gt;
*&#039;&#039;content:&#039;&#039; text that is added to the wiki page.&lt;br /&gt;
*&#039;&#039;mode:&#039;&#039; shows where the text is added to the wiki page (append or ???)&lt;br /&gt;
*&#039;&#039;minor: s&#039;&#039;ets this page revision as a minor revision (1) or major revision (2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
After this task is completed, the workflow will send an email to the legal department.&lt;br /&gt;
&lt;br /&gt;
====The final BPMN====&lt;br /&gt;
In the end, the bpmn page for the workflow looks like this:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions&lt;br /&gt;
	xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot;&lt;br /&gt;
	xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;AskForClassification&amp;quot; name=&amp;quot;Provide classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificiationRequest&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;assigned_user&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{ROOTPAGENAME:{{#show:{{FULLPAGENAME}}|?Responsible|link=none|default=TheBoss}}}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;due_date&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{#time:YmdHis|now + 7 days}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;classification&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAskForClassificationToGateway&amp;quot; sourceRef=&amp;quot;AskForClassification&amp;quot; targetRef=&amp;quot;Gateway&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:exclusiveGateway id=&amp;quot;Gateway&amp;quot; name=&amp;quot;AskForClassification.classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:exclusiveGateway&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToSendMail&amp;quot; name=&amp;quot;CLSA&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToAppendWikipage&amp;quot; name=&amp;quot;CLSB&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;AppendWikipage&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;SendMail&amp;quot; name=&amp;quot;Send mail&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;send_mail&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;recipient&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[legal@company.local]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;subject&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[New &amp;quot;Class A&amp;quot; content: {{FULLPAGENAME}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;body&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[Please check further actions now!]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromEndMailToTheEnd&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromEndMailToTheEnd&amp;quot; sourceRef=&amp;quot;SendMail&amp;quot; targetRef=&amp;quot;TheEnd&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;AppendWikipage&amp;quot; name=&amp;quot;Append wikipage&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;edit_page&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;title&amp;quot; default=&amp;quot;Classification_incidents&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;user&amp;quot; default=&amp;quot;MediaWiki default&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;content&amp;quot; default=&amp;quot;* [[{{FULLPAGENAME}}]] was classified {{{AskForClassification.classification}}}&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;mode&amp;quot; default=&amp;quot;append&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;minor&amp;quot; default=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAppendWikipageToSendMail&amp;quot; sourceRef=&amp;quot;AppendWikipage&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
workflows-activity-editpage-summary&lt;br /&gt;
&lt;br /&gt;
==Creating a workflow trigger==&lt;br /&gt;
For the workflow to appear in the wiki, we need to define a trigger:&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Workflow triggers&#039;&#039; in the Global actions menu.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Add new trigger&#039;&#039;.&lt;br /&gt;
#&#039;&#039;&#039;Select&#039;&#039;&#039; the option &#039;&#039;Manual&#039;&#039; from the dropdown menu.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Continue&#039;&#039;.&lt;br /&gt;
#&#039;&#039;&#039;Define&#039;&#039;&#039; the settings for the workflow trigger:&lt;br /&gt;
#*&#039;&#039;Name:&#039;&#039; Name that is displayed in the workflow selection menu.&lt;br /&gt;
#*&#039;&#039;Description:&#039;&#039; Explanation of the function and special features of this trigger.&lt;br /&gt;
#*&#039;&#039;Workflow to start:&#039;&#039; Workflow triggered by this trigger. In our case Classificiation-workflow.&lt;br /&gt;
#*&#039;&#039;Initial data for the workflow&#039;&#039; (optional):   - Standard comment suggestion.&lt;br /&gt;
#*&#039;&#039;Conditions&#039;&#039; (optional)&#039;&#039;:&#039;&#039; In which namespaces the workflow is displayed for selection.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Save&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
Your workflow is now ready to be tested.&lt;br /&gt;
&lt;br /&gt;
==Testing the workflow==&lt;br /&gt;
The workflow is now available in the wiki.  You should test whether the following functionality is available:&lt;br /&gt;
&lt;br /&gt;
*The workflow is available to be started in the namespaces defined in the workflow trigger (if there are restrictions here).&lt;br /&gt;
*The workflow is triggered.&lt;br /&gt;
*The workflow is listed in the Worklfows Overview page.&lt;br /&gt;
*The assigned user received a task.&lt;br /&gt;
*The workflow completes correctly in case A and B.&lt;br /&gt;
&lt;br /&gt;
==Using bpmn.io to create workflow definitions==&lt;br /&gt;
Such a diagram can be created with the free [https://bpmn.io/ bpmn.io] service. The [[Media:Manual:Workflows-tutorial-raw.bpmn.xml|resulting BPMN file]] needs to be modified, before it can actually be imported and used in the wiki.&lt;br /&gt;
&lt;br /&gt;
[[de:Handbuch:Erweiterung/Workflows/Tutorial]]&lt;br /&gt;
[[en:{{FULLPAGENAME}}]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=7959</id>
		<title>Manual:Extension/Workflows/Tutorial</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=7959"/>
		<updated>2023-12-08T12:46:40Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Creating a custom workflow}}&lt;br /&gt;
&lt;br /&gt;
== Defining the workflow  ==&lt;br /&gt;
Let&#039;s assume, we want to build a workflow, that asks for some classification of a wikipage. Based on the classification of the document, it either sends an e-mail to a member of the legal team or it first appends a wiki page and then sends the e-mail to the legal team.&lt;br /&gt;
&lt;br /&gt;
The described workflow consists of four activities and one gateway. You can create a BPMN-Diagramm in the wiki to visualize the process:&lt;br /&gt;
[[File:Workflows-tutorial-diagram.svg|center|thumb|700x700px|alt=Document classification workflow|Document classification workflow]]&lt;br /&gt;
&lt;br /&gt;
==Steps==&lt;br /&gt;
To create the workflow, the following steps are necessary:&lt;br /&gt;
&lt;br /&gt;
#Creating a custom &#039;&#039;&#039;workflow definition:&#039;&#039;&#039; &amp;lt;code&amp;gt;MediaWiki:Classification-workflow.bpmn&amp;lt;/code&amp;gt;&lt;br /&gt;
#Creating and connecting an &#039;&#039;&#039;initiation form&#039;&#039;&#039; that adds some information about the workflow before it sends the task. &amp;lt;code&amp;gt;MediaWiki:ContentClassificationInit.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#Creating and connecting the &#039;&#039;&#039;classification form&#039;&#039;&#039; that allows the assigned user to classify the document. &amp;lt;code&amp;gt;MediaWiki:ContentClassificiationRequest.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#Adding a &#039;&#039;&#039;trigger&#039;&#039;&#039; to the wiki that defines where and how to start the workflow.&lt;br /&gt;
&lt;br /&gt;
==Instructions==&lt;br /&gt;
&lt;br /&gt;
===Creating a custom workflow definition===&lt;br /&gt;
First, let&#039;s create a page called &amp;lt;code&amp;gt;MediaWiki:Classification-workflow.bpmn&amp;lt;/code&amp;gt; with the most basic stub XML. Each workflow that you define in the wiki needs the elements that you see here:&lt;br /&gt;
&lt;br /&gt;
*Line 1: The xml prolog&lt;br /&gt;
*Line 2: The definitions element, which denotes the namespaces where the workflow elements are defined.&lt;br /&gt;
*Line3: The process element, which contains all other elements.&lt;br /&gt;
*Line 5: The workflow runs in the context of a specific revision of a wiki page.&lt;br /&gt;
*Line 11: The workflow needs a startEvent and&lt;br /&gt;
*Line 18: The workflow needs an endEvent.&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	    &amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
        &amp;lt;!-- ... --&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
The above stub xml only features the &amp;quot;Start&amp;quot; and &amp;quot;End&amp;quot; event including - yet to be defined - &amp;quot;outgoing&amp;quot; and &amp;quot;incoming&amp;quot; flow references.&lt;br /&gt;
&lt;br /&gt;
====Creating and connecting an initiation form====&lt;br /&gt;
The initiation form allows to interact with the user who starts the workflow. It explains what happens when the workflow is started and allows to add a comment to provide some context for the user task.&lt;br /&gt;
&lt;br /&gt;
We are using the MediaWiki namespace here to make sure not every user can edit the form later. But in general, such forms can be created everywhere in the wiki.&lt;br /&gt;
&lt;br /&gt;
[[File:WF-Tutorial initForm.png|alt=Worfklow initiation form|center|thumb|550x550px|Worfklow initiation form]]&lt;br /&gt;
To create the initiation form:&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Create&#039;&#039;&#039; the page &amp;lt;code&amp;gt;MediaWiki:ContentClassificationInit.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Paste&#039;&#039;&#039; the following form definition in source edit mode:&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
    &amp;quot;lang&amp;quot;: &amp;quot;json&amp;quot;,&lt;br /&gt;
    &amp;quot;form_name&amp;quot;: &amp;quot;ContentClassificationInit&amp;quot;,&lt;br /&gt;
    &amp;quot;items&amp;quot;: [&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;intro&amp;quot;,&lt;br /&gt;
            &amp;quot;widget_label&amp;quot;: &amp;quot;Click  \&amp;quot;Start\&amp;quot; to ask an expert for classification. You can leave a comment for the expert below&amp;quot;,&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;label&amp;quot;&lt;br /&gt;
        },&lt;br /&gt;
        {&lt;br /&gt;
            &amp;quot;name&amp;quot;: &amp;quot;comment&amp;quot;,&lt;br /&gt;
            &amp;quot;label&amp;quot;: &amp;quot;Comment&amp;quot;,&lt;br /&gt;
            &amp;quot;noLayout&amp;quot;: true,&lt;br /&gt;
            &amp;quot;showOn&amp;quot;: [&lt;br /&gt;
                &amp;quot;create&amp;quot;,&lt;br /&gt;
                &amp;quot;edit&amp;quot;,&lt;br /&gt;
                &amp;quot;view&amp;quot;&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;editableOn&amp;quot;: [&lt;br /&gt;
                &amp;quot;create&amp;quot;,&lt;br /&gt;
                &amp;quot;edit&amp;quot;&lt;br /&gt;
            ],&lt;br /&gt;
            &amp;quot;type&amp;quot;: &amp;quot;textarea&amp;quot;&lt;br /&gt;
        }&lt;br /&gt;
    ]&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Save&#039;&#039;&#039; the page.&lt;br /&gt;
&lt;br /&gt;
Next, we tell the BPMN with the following userTask to show the form: &amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Let&#039;s look at what this does: &lt;br /&gt;
&lt;br /&gt;
*The &amp;lt;code&amp;gt;id&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt; of this activity are set to &amp;quot;InitializeWorkflow&amp;quot;  and &amp;quot;Start Content Classification Workflow&amp;quot;. Both values do not need to match, but usually they do.&lt;br /&gt;
&lt;br /&gt;
*&amp;lt;wf:type&amp;gt; is &#039;&#039;custom_form&#039;&#039; and tells the workflow that a form directly in the wiki (as opposed to a form located in code) is available.&lt;br /&gt;
*&amp;lt;wf:form&amp;gt; points to the actual form page in the wiki&lt;br /&gt;
*&amp;lt;wf:initializer&amp;gt; is set to &#039;&#039;true&#039;&#039; since it is used to show or collect some information before the actual workflow starts.&lt;br /&gt;
&lt;br /&gt;
At the end, we have the incoming and outgoing flows referenced. (Note: the order of elements does not matter usually; only the nesting is important).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
We add this &#039;&#039;&#039;userTask&#039;&#039;&#039; on line 16, after the line  &#039;&#039;&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&#039;&#039;:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
	    &amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	    &amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
        	&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializ&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
        &amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
       &amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Creating and connecting the classification form====&lt;br /&gt;
The workflow will show a classification form to a user. This user will be defined in the workflow in a later step. &lt;br /&gt;
&lt;br /&gt;
To create the classification form: &lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Create&#039;&#039;&#039; the page &amp;lt;code&amp;gt;MediaWiki:ContentClassificiationRequest.form&amp;lt;/code&amp;gt;&lt;br /&gt;
#&#039;&#039;&#039;Paste&#039;&#039;&#039; the following form definition in source edit mode:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;json&amp;quot;&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
	&amp;quot;lang&amp;quot;: &amp;quot;json&amp;quot;,&lt;br /&gt;
	&amp;quot;form_name&amp;quot;: &amp;quot;ContentClassificationRequest&amp;quot;,&lt;br /&gt;
	&amp;quot;items&amp;quot;: [&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;name&amp;quot;: &amp;quot;intro&amp;quot;,&lt;br /&gt;
			&amp;quot;widget_label&amp;quot;: &amp;quot;Please review the given document and select an appropriate classification for the content from the list below&amp;quot;,&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;label&amp;quot;&lt;br /&gt;
		},&lt;br /&gt;
		{&lt;br /&gt;
			&amp;quot;name&amp;quot;: &amp;quot;classification&amp;quot;,&lt;br /&gt;
			&amp;quot;label&amp;quot;: &amp;quot;Classification&amp;quot;,&lt;br /&gt;
			&amp;quot;required&amp;quot;: true,&lt;br /&gt;
			&amp;quot;options&amp;quot;: [&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;data&amp;quot;: &amp;quot;CLSA&amp;quot;,&lt;br /&gt;
					&amp;quot;label&amp;quot;: &amp;quot;Class A&amp;quot;&lt;br /&gt;
				},&lt;br /&gt;
				{&lt;br /&gt;
					&amp;quot;data&amp;quot;: &amp;quot;CLSB&amp;quot;,&lt;br /&gt;
					&amp;quot;label&amp;quot;: &amp;quot;Class B&amp;quot;&lt;br /&gt;
				}&lt;br /&gt;
			],&lt;br /&gt;
			&amp;quot;type&amp;quot;: &amp;quot;dropdown&amp;quot;,&lt;br /&gt;
			&amp;quot;widget_$overlay&amp;quot;: true&lt;br /&gt;
		}&lt;br /&gt;
	]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, we tell the BPMN to show the form to user that receives the workflow task. For that, we add a &#039;&#039;userTask&#039;&#039; activity:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;AskForClassification&amp;quot; name=&amp;quot;Provide classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationRequest&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
			    &amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;assigned_user&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{ROOTPAGENAME:{{#show:{{FULLPAGENAME}}|?Responsible|link=none|default=TheBoss}}}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;due_date&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[{{#time:YmdHis|now + 7 days}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;classification&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToAskForClassification&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAskForClassificationToGateway&amp;quot; sourceRef=&amp;quot;AskForClassification&amp;quot; targetRef=&amp;quot;Gateway&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We should have a close look. This userTask has some additional properties besides the form reference (which was already explained in the initiation form):&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;&#039;assigned user:&#039;&#039;&#039;  The &amp;lt;code&amp;gt;assigned_user&amp;lt;/code&amp;gt; property is mandatory,  as the workflow engine must know which user to query.   In this case, we use some wikitext magic to calculate the assigned user from the context. The value consists of a combination of a wikitext variable and a parserfunction (this particular parserfunction is defined by the Semantic MediaWiki extension, which can be seen as a dependency here). The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#show}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parserfunction tries to get a username from a semantic property, that may or may not be set on the page the workflow is started on. If it does not find a proper information, it will fallback to &amp;lt;code&amp;gt;TheBoss&amp;lt;/code&amp;gt; (assuming that such a user exists on the wiki). The &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{ROOTPAGENAME}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; variable is just an easy way to strip the &amp;quot;User&amp;quot; namespace, if the looked up value was something like &amp;lt;code&amp;gt;User:JaneDoe&amp;lt;/code&amp;gt; instead of just &amp;lt;code&amp;gt;JaneDoe&amp;lt;/code&amp;gt;.&lt;br /&gt;
*&#039;&#039;&#039;due date:&#039;&#039;&#039; The &amp;lt;code&amp;gt;due_date&amp;lt;/code&amp;gt; property is also mandatory. All user facing activities need a due date. If the running activity is overdue, the workflow engine will end the workflow. In this case, we implement a concept of &amp;quot;lay days&amp;quot;, as we do not have an absolute due date, but calculate it from the time the activity gets started using the &amp;lt;code&amp;gt;&amp;lt;nowiki&amp;gt;{{#time}}&amp;lt;/nowiki&amp;gt;&amp;lt;/code&amp;gt; parserfunction.&lt;br /&gt;
*&#039;&#039;&#039;classification:&#039;&#039;&#039; The &amp;lt;code&amp;gt;classification&amp;lt;/code&amp;gt; property is a random one. It must be specified, in order to allow the form to set it and the workflow context to access it. We could have provided a default value, but we want to keep it empty.&lt;br /&gt;
At the end, we have the incoming and outgoing flows referenced. (Note: the order of elements does not matter usually; only the nesting is important).&lt;br /&gt;
&lt;br /&gt;
====The gateway====&lt;br /&gt;
Now we can proceed with adding the gateway.&lt;br /&gt;
&lt;br /&gt;
The gateway will provide the two necessary paths:&lt;br /&gt;
&lt;br /&gt;
#If the assigned user classified the document as Class A (CLSA), an email will be sent to the legal department.&lt;br /&gt;
#If the assigned user classified the document as Class B (CLSB), a wiki page will be appended with the content defined in the task &amp;quot;AppendWikipage&amp;quot;&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:exclusiveGateway id=&amp;quot;Gateway&amp;quot; name=&amp;quot;AskForClassification.classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:exclusiveGateway&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToSendMail&amp;quot; name=&amp;quot;CLSA&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToAppendWikipage&amp;quot; name=&amp;quot;CLSB&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;AppendWikipage&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
After setting up the gateway, we need to define the tworelated activities.&lt;br /&gt;
&lt;br /&gt;
====Sending an mail to the legal department====&lt;br /&gt;
For case 1, we need the workflow to immediately send an email:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;SendMail&amp;quot; name=&amp;quot;Send mail&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;send_mail&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;recipient&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[legal@company.local]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;subject&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[New &amp;quot;Class A&amp;quot; content: {{FULLPAGENAME}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;body&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[Please check further actions now!]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromEndMailToTheEnd&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromEndMailToTheEnd&amp;quot; sourceRef=&amp;quot;SendMail&amp;quot; targetRef=&amp;quot;TheEnd&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Appending a wikipage====&lt;br /&gt;
For case 2, we want the workflow to append the existing page &#039;&#039;Classification_incidents&#039;&#039; with the text shown in the &#039;&#039;content&#039;&#039; property. &lt;br /&gt;
&lt;br /&gt;
This requirement can be fulfilled with the &#039;&#039;edit_page&#039;&#039;  activity type:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
        ...&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;AppendWikipage&amp;quot; name=&amp;quot;Append wikipage&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;edit_page&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;title&amp;quot; default=&amp;quot;Classification_incidents&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;user&amp;quot; default=&amp;quot;Mediawiki default&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;content&amp;quot; default=&amp;quot;* [[{{FULLPAGENAME}}]] was classified {{{AskForClassification.classification}}}&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;mode&amp;quot; default=&amp;quot;append&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;minor&amp;quot; default=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAppendWikipageToSendMail&amp;quot; sourceRef=&amp;quot;AppendWikipage&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		...&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The following properties are set for this activity type:&lt;br /&gt;
&lt;br /&gt;
*&#039;&#039;name:&#039;&#039; title of the wiki page to which the content will be appended.&lt;br /&gt;
*&#039;&#039;user:&#039;&#039; user that is shown in the version history of the wiki page that was appended.&lt;br /&gt;
*&#039;&#039;content:&#039;&#039; text that is added to the wiki page.&lt;br /&gt;
*&#039;&#039;mode:&#039;&#039; shows where the text is added to the wiki page (append or ???)&lt;br /&gt;
*&#039;&#039;minor: s&#039;&#039;ets this page revision as a minor revision (1) or major revision (2).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
After this task is completed, the workflow will send an email to the legal department.&lt;br /&gt;
&lt;br /&gt;
====The final BPMN====&lt;br /&gt;
In the end, the bpmn page for the workflow looks like this:&amp;lt;syntaxhighlight lang=&amp;quot;xml&amp;quot; line=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;UTF-8&amp;quot;?&amp;gt;&lt;br /&gt;
&amp;lt;bpmn:definitions&lt;br /&gt;
	xmlns:bpmn=&amp;quot;http://www.omg.org/spec/BPMN/20100524/MODEL&amp;quot;&lt;br /&gt;
	xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;bpmn:process id=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;wf:context&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;pageId&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;wf:contextItem name=&amp;quot;revision&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/wf:context&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:startEvent id=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:startEvent&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromTheStartToInitializeWorkflow&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;InitializeWorkflow&amp;quot; /&amp;gt;&lt;br /&gt;
		&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;InitializeWorkflow&amp;quot; name=&amp;quot;Start Content Classification Workflow&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificationInit&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
				&amp;lt;wf:initializer&amp;gt;true&amp;lt;/wf:initializer&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;comment&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromTheStartToInitializeWorkflow&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromInitializeWorkflowToAskForClassification&amp;quot; sourceRef=&amp;quot;InitializeWorkflow&amp;quot; targetRef=&amp;quot;AskForClassification&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:userTask id=&amp;quot;AskForClassification&amp;quot; name=&amp;quot;Provide classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;custom_form&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
				&amp;lt;wf:form&amp;gt;MediaWiki:ContentClassificiationRequest&amp;lt;/wf:form&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;assigned_user&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;![CDATA[{{ROOTPAGENAME:{{#show:{{FULLPAGENAME}}|?Responsible|link=none|default=TheBoss}}}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;due_date&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;![CDATA[{{#time:YmdHis|now + 7 days}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;classification&amp;quot;&amp;gt;&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromInitializeWorkflowToAskForClassification&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:userTask&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAskForClassificationToGateway&amp;quot; sourceRef=&amp;quot;AskForClassification&amp;quot; targetRef=&amp;quot;Gateway&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:exclusiveGateway id=&amp;quot;Gateway&amp;quot; name=&amp;quot;AskForClassification.classification&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAskForClassificationToGateway&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:exclusiveGateway&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToSendMail&amp;quot; name=&amp;quot;CLSA&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromGatewayToAppendWikipage&amp;quot; name=&amp;quot;CLSB&amp;quot; sourceRef=&amp;quot;Gateway&amp;quot; targetRef=&amp;quot;AppendWikipage&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;SendMail&amp;quot; name=&amp;quot;Send mail&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;send_mail&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;recipient&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[legal@company.local]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;subject&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[New &amp;quot;Class A&amp;quot; content: {{FULLPAGENAME}}]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;body&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;![CDATA[Please check further actions now!]]&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:property&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromEndMailToTheEnd&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromEndMailToTheEnd&amp;quot; sourceRef=&amp;quot;SendMail&amp;quot; targetRef=&amp;quot;TheEnd&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:task id=&amp;quot;AppendWikipage&amp;quot; name=&amp;quot;Append wikipage&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:extensionElements&amp;gt;&lt;br /&gt;
				&amp;lt;wf:type&amp;gt;edit_page&amp;lt;/wf:type&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmn:extensionElements&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;title&amp;quot; default=&amp;quot;Classification_incidents&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;user&amp;quot; default=&amp;quot;MediaWiki default&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;content&amp;quot; default=&amp;quot;* [[{{FULLPAGENAME}}]] was classified {{{AskForClassification.classification}}}&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;mode&amp;quot; default=&amp;quot;append&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:property name=&amp;quot;minor&amp;quot; default=&amp;quot;1&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromGatewayToAppendWikipage&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:outgoing&amp;gt;FromAppendWikipageToSendMail&amp;lt;/bpmn:outgoing&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:task&amp;gt;&lt;br /&gt;
		&amp;lt;bpmn:sequenceFlow id=&amp;quot;FromAppendWikipageToSendMail&amp;quot; sourceRef=&amp;quot;AppendWikipage&amp;quot; targetRef=&amp;quot;SendMail&amp;quot; /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
		&amp;lt;bpmn:endEvent id=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmn:incoming&amp;gt;FromSendMailToTheEnd&amp;lt;/bpmn:incoming&amp;gt;&lt;br /&gt;
		&amp;lt;/bpmn:endEvent&amp;gt;&lt;br /&gt;
&lt;br /&gt;
	&amp;lt;/bpmn:process&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/bpmn:definitions&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
workflows-activity-editpage-summary&lt;br /&gt;
&lt;br /&gt;
==Creating a workflow trigger==&lt;br /&gt;
For the workflow to appear in the wiki, we need to define a trigger:&lt;br /&gt;
&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Workflow triggers&#039;&#039; in the Global actions menu.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Add new trigger&#039;&#039;.&lt;br /&gt;
#&#039;&#039;&#039;Select&#039;&#039;&#039; the option &#039;&#039;Manual&#039;&#039; from the dropdown menu.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Continue&#039;&#039;.&lt;br /&gt;
#&#039;&#039;&#039;Define&#039;&#039;&#039; the settings for the workflow trigger:&lt;br /&gt;
#*&#039;&#039;Name:&#039;&#039; Name that is displayed in the workflow selection menu.&lt;br /&gt;
#*&#039;&#039;Description:&#039;&#039; Explanation of the function and special features of this trigger.&lt;br /&gt;
#*&#039;&#039;Workflow to start:&#039;&#039; Workflow triggered by this trigger. In our case Classificiation-workflow.&lt;br /&gt;
#*&#039;&#039;Initial data for the workflow&#039;&#039; (optional):   - Standard comment suggestion.&lt;br /&gt;
#*&#039;&#039;Conditions&#039;&#039; (optional)&#039;&#039;:&#039;&#039; In which namespaces the workflow is displayed for selection.&lt;br /&gt;
#&#039;&#039;&#039;Click&#039;&#039;&#039; &#039;&#039;Save&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;span /&amp;gt;&amp;lt;br /&amp;gt;&amp;lt;/span&amp;gt;&lt;br /&gt;
Your workflow is now ready to be tested.&lt;br /&gt;
&lt;br /&gt;
==Testing the workflow==&lt;br /&gt;
The workflow is now available in the wiki.  You should test whether the following functionality is available:&lt;br /&gt;
&lt;br /&gt;
*The workflow is available to be started in the namespaces defined in the workflow trigger (if there are restrictions here).&lt;br /&gt;
*The workflow is triggered.&lt;br /&gt;
*The workflow is listed in the Worklfows Overview page.&lt;br /&gt;
*The assigned user received a task.&lt;br /&gt;
*The workflow completes correctly in case A and B.&lt;br /&gt;
&lt;br /&gt;
==Using bpmn.io to create workflow definitions==&lt;br /&gt;
Such a diagram can be created with the free [https://bpmn.io/ bpmn.io] service. The [[Media:Manual:Workflows-tutorial-raw.bpmn.xml|resulting BPMN file]] needs to be modified, before it can actually be imported and used in the wiki.&lt;br /&gt;
&lt;br /&gt;
[[de:Handbuch:Erweiterung/Workflows/Tutorial]]&lt;br /&gt;
[[en:{{FULLPAGENAME}}]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=7840</id>
		<title>How to debug</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=7840"/>
		<updated>2023-12-04T09:52:28Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sometimes things go wrong. In many cases the user is then confronted with cryptic or no error messages at all. This page provides help about getting more information about what exactly went wrong, so it can be fixed quickly. This is especially important when asking for help on locations like [https://community.bluespice.com community.bluespice.com].&lt;br /&gt;
&lt;br /&gt;
Additional information can also be found at [[mediawikiwiki:Manual:How_to_debug|&amp;quot;Manual:How to debug&amp;quot; on MediaWiki.org]].{{Textbox|boxtype=warning|header=Check for sensitive information|text=Most of the techniques described here will output very detailed information about the error, but also about the system and the context. The output may contain sensitive information like usernames, passwords, pathes, access-keys and many more. Before posting any information retrieved by this kind of debugging on a public location (like [https://community.bluespice.com community.bluespice.com]), make sure to redact all potential sensitive information!|icon=yes}}&lt;br /&gt;
&lt;br /&gt;
== Server side debugging ==&lt;br /&gt;
There are various ways to get more information about errors by changing some configuration on the server side.&lt;br /&gt;
&lt;br /&gt;
=== Wiki application ===&lt;br /&gt;
&lt;br /&gt;
==== Enable detailed error reporting ====&lt;br /&gt;
Within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file, please add the following lines:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$GLOBALS[&#039;wgShowSQLErrors&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgDebugDumpSql&#039;]  = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowExceptionDetails&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowDBErrorBacktrace&#039;] = true;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will turn error messages like &amp;lt;code&amp;gt;internal_api_error_DBQueryError&amp;lt;/code&amp;gt; into a more detailed stack of program calls, including database queries and responses.&lt;br /&gt;
&lt;br /&gt;
==== General debug log ====&lt;br /&gt;
Sometimes it can be useful to see all debugging information the application produces. To enable this general debug log please add the following lines within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
if ( isset( $_GET[&#039;dodebuglog&#039;] ) ) {&lt;br /&gt;
    $GLOBALS[&#039;wgDebugLogFile&#039;] = &amp;quot;$IP/cache/debug.log&amp;quot;;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;Be aware that this configuration is set conditionally. It will only be used if the URL accessed in the browser contains some query string like  &amp;lt;code&amp;gt;dodebuglog=1&amp;lt;/code&amp;gt;. This is to allow a more isolated debug log file. Otherwise other requests (like calls to the &amp;lt;code&amp;gt;load.php&amp;lt;/code&amp;gt; entrypoint for CSS and JS content) may also add into this file, which makes analysis more difficult.&lt;br /&gt;
&lt;br /&gt;
==== Log channels ====&lt;br /&gt;
&lt;br /&gt;
== Client side debugging ==&lt;br /&gt;
Many errors occur only on the client and server side debugging will not help. In such cases the webbrowser can be used to retrieve more information.&lt;br /&gt;
&lt;br /&gt;
=== Browser development tools ===&lt;br /&gt;
Most modern browsers have sophisticated development tools. Usually they can be accessed by pressing the &amp;lt;code&amp;gt;F12&amp;lt;/code&amp;gt; key on the keyboard. &lt;br /&gt;
&lt;br /&gt;
==== JavaScript console ====&lt;br /&gt;
&lt;br /&gt;
==== Network panel ====&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=7839</id>
		<title>How to debug</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=7839"/>
		<updated>2023-12-04T09:33:57Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Sometimes things go wrong. In many cases the user is then confronted with cryptic or no error messages at all. This page provides help about getting more information about what exactly went wrong, so it can be fixed quickly. This is especially important when asking for help on locations like [https://community.bluespice.com community.bluespice.com].&lt;br /&gt;
&lt;br /&gt;
Additional information can also be found at [[mediawikiwiki:Manual:How_to_debug|&amp;quot;Manual:How to debug&amp;quot; on MediaWiki.org]].{{Textbox|boxtype=warning|header=Check for sensitive information|text=Most of the techniques described here will output very detailed information about the error, but also about the system and the context. The output may contain sensitive information like usernames, passwords, pathes, access-keys and many more. Before posting any information retrieved by this kind of debugging on a public location (like [https://community.bluespice.com community.bluespice.com]), make sure to redact all potential sensitive information!|icon=yes}}&lt;br /&gt;
&lt;br /&gt;
== Server side debugging ==&lt;br /&gt;
There are various ways to get more information about errors by changing some configuration on the server side.&lt;br /&gt;
&lt;br /&gt;
=== Wiki application ===&lt;br /&gt;
&lt;br /&gt;
==== Enable detailed error reporting ====&lt;br /&gt;
Within you &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt; file, please add the following lines:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
$GLOBALS[&#039;wgShowSQLErrors&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgDebugDumpSql&#039;]  = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowExceptionDetails&#039;] = true;&lt;br /&gt;
$GLOBALS[&#039;wgShowDBErrorBacktrace&#039;] = true;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;This will turn error messages like &amp;lt;code&amp;gt;internal_api_error_DBQueryError&amp;lt;/code&amp;gt; into a more detailed stack of program calls, including database queries and responses.&lt;br /&gt;
&lt;br /&gt;
==== General debug log ====&lt;br /&gt;
&lt;br /&gt;
==== Log channels ====&lt;br /&gt;
&lt;br /&gt;
== Client side debugging ==&lt;br /&gt;
&lt;br /&gt;
=== Browser development tools ===&lt;br /&gt;
&lt;br /&gt;
==== JavaScript console ====&lt;br /&gt;
&lt;br /&gt;
==== Network panel ====&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=7838</id>
		<title>How to debug</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=How_to_debug&amp;diff=7838"/>
		<updated>2023-12-04T09:17:17Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: Created page with &amp;quot;== Server side debugging ==  === Wiki application ===  ==== General debug log ====  ==== Log channels ====  == Client side debugging ==  === Browser development tools ===  ==== JavaScript console ====  ==== Network panel ====&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Server side debugging ==&lt;br /&gt;
&lt;br /&gt;
=== Wiki application ===&lt;br /&gt;
&lt;br /&gt;
==== General debug log ====&lt;br /&gt;
&lt;br /&gt;
==== Log channels ====&lt;br /&gt;
&lt;br /&gt;
== Client side debugging ==&lt;br /&gt;
&lt;br /&gt;
=== Browser development tools ===&lt;br /&gt;
&lt;br /&gt;
==== JavaScript console ====&lt;br /&gt;
&lt;br /&gt;
==== Network panel ====&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Debugging&amp;diff=7837</id>
		<title>Debugging</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Debugging&amp;diff=7837"/>
		<updated>2023-12-04T09:15:00Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: Redirected page to How to debug&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[How to debug]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Security:Security_Advisories/BSSA-2023-02&amp;diff=7455</id>
		<title>Security:Security Advisories/BSSA-2023-02</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Security:Security_Advisories/BSSA-2023-02&amp;diff=7455"/>
		<updated>2023-10-30T10:56:55Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Featurepage|featured=true|featuredesc=Current Security Advisory: BSSA-2023-01|featurestart=07/26/2023}}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
!&lt;br /&gt;
|-&lt;br /&gt;
|Date&lt;br /&gt;
|2023-10-30&lt;br /&gt;
|-&lt;br /&gt;
|Severity&lt;br /&gt;
|Low&lt;br /&gt;
|-&lt;br /&gt;
|Affected&lt;br /&gt;
|&lt;br /&gt;
* BlueSpiceAvatars&lt;br /&gt;
|-&lt;br /&gt;
|Fixed in&lt;br /&gt;
|&lt;br /&gt;
* BlueSpiceAvatars 4.3.3&lt;br /&gt;
* BlueSpiceAvatars 3.2.10.1&lt;br /&gt;
|-&lt;br /&gt;
|CVE&lt;br /&gt;
|[https://www.cve.org/cverecord?id=CVE-2023-42431 CVE-2023-42431]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Problem ==&lt;br /&gt;
&lt;br /&gt;
When setting the avatar profile image, one can cause an XSS attack by inserting a modified URL in the dialog. The issue only occurs in the dialog itself and only in the context of the user that applied the change.&lt;br /&gt;
== Solution ==&lt;br /&gt;
* BlueSpice 4: Update to version 4.3.3&lt;br /&gt;
* BlueSpice 3: Update Extension:BlueSpiceAvatars version [https://github.com/wikimedia/mediawiki-extensions-BlueSpiceAvatars/tree/3.2.10.1 3.2.10.1]&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
Special thanks to the security team of an undisclosed customer.&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Security:Security_Advisories/BSSA-2023-02&amp;diff=7454</id>
		<title>Security:Security Advisories/BSSA-2023-02</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Security:Security_Advisories/BSSA-2023-02&amp;diff=7454"/>
		<updated>2023-10-30T10:53:49Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Featurepage|featured=true|featuredesc=Current Security Advisory: BSSA-2023-01|featurestart=07/26/2023}}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
!&lt;br /&gt;
|-&lt;br /&gt;
|Date&lt;br /&gt;
|2023-10-30&lt;br /&gt;
|-&lt;br /&gt;
|Severity&lt;br /&gt;
|Low&lt;br /&gt;
|-&lt;br /&gt;
|Affected&lt;br /&gt;
|&lt;br /&gt;
* BlueSpiceAvatars&lt;br /&gt;
|-&lt;br /&gt;
|Fixed in&lt;br /&gt;
|&lt;br /&gt;
* BlueSpiceAvatars 4.3.3&lt;br /&gt;
* BlueSpiceAvatars 3.2.10.1&lt;br /&gt;
|-&lt;br /&gt;
|CVE&lt;br /&gt;
|[https://www.cve.org/cverecord?id=CVE-2023-42431 CVE-2023-42431]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Problem ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solution ==&lt;br /&gt;
* BlueSpice 4: Update to version 4.3.3&lt;br /&gt;
* BlueSpice 3: Update Extension:BlueSpiceAvatars version [https://github.com/wikimedia/mediawiki-extensions-BlueSpiceAvatars/tree/3.2.10.1 3.2.10.1]&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
Special thanks to the security team of an undisclosed customer.&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Security:Security_Advisories/BSSA-2023-02&amp;diff=7453</id>
		<title>Security:Security Advisories/BSSA-2023-02</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Security:Security_Advisories/BSSA-2023-02&amp;diff=7453"/>
		<updated>2023-10-30T10:53:17Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Featurepage|featured=true|featuredesc=Current Security Advisory: BSSA-2023-01|featurestart=07/26/2023}}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
!&lt;br /&gt;
|-&lt;br /&gt;
|Date&lt;br /&gt;
|2023-10-30&lt;br /&gt;
|-&lt;br /&gt;
|Severity&lt;br /&gt;
|Low&lt;br /&gt;
|-&lt;br /&gt;
|Affected&lt;br /&gt;
|&lt;br /&gt;
* BlueSpiceAvatars&lt;br /&gt;
|-&lt;br /&gt;
|Fixed in&lt;br /&gt;
|&lt;br /&gt;
* BlueSpiceAvatars 4.3.3&lt;br /&gt;
* BlueSpiceAvatars 3.2.10.1&lt;br /&gt;
|-&lt;br /&gt;
|CVE&lt;br /&gt;
|[https://www.cve.org/cverecord?id=CVE-2023-42431 CVE-2023-42431]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Problem ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Solution ==&lt;br /&gt;
* BlueSpice 4: Update to version 4.3.3&lt;br /&gt;
* BlueSpice 3: Update Extension:BlueSpiceAvatars version [https://github.com/wikimedia/mediawiki-extensions-BlueSpiceAvatars/tree/3.2.10.1 3.2.10.1]&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
None&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
Found during an internal security audit.&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Security:Security_Advisories/BSSA-2023-02&amp;diff=7452</id>
		<title>Security:Security Advisories/BSSA-2023-02</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Security:Security_Advisories/BSSA-2023-02&amp;diff=7452"/>
		<updated>2023-10-30T10:49:31Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: Created page with &amp;quot;{{Featurepage|featured=true|featuredesc=Current Security Advisory: BSSA-2023-01|featurestart=07/26/2023}} {| class=&amp;quot;wikitable&amp;quot; |+ ! ! |- |Date |2023-07-25 |- |Severity |Medium |- |Affected | * BlueSpice Infrastructure: Ghostscript |- |Fixed in | * Ghostscript 9.53.3 and 10.01.2 |- |CVE |[https://www.cve.org/CVERecord?id=CVE-2023-36664 CVE-2023-36664] |}  == Problem == A bug in ghostscript can be exploited to run arbitrary code on the host machine using prepared PDF docum...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Featurepage|featured=true|featuredesc=Current Security Advisory: BSSA-2023-01|featurestart=07/26/2023}}&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
!&lt;br /&gt;
|-&lt;br /&gt;
|Date&lt;br /&gt;
|2023-07-25&lt;br /&gt;
|-&lt;br /&gt;
|Severity&lt;br /&gt;
|Medium&lt;br /&gt;
|-&lt;br /&gt;
|Affected&lt;br /&gt;
|&lt;br /&gt;
* BlueSpice Infrastructure: Ghostscript&lt;br /&gt;
|-&lt;br /&gt;
|Fixed in&lt;br /&gt;
|&lt;br /&gt;
* Ghostscript 9.53.3 and 10.01.2&lt;br /&gt;
|-&lt;br /&gt;
|CVE&lt;br /&gt;
|[https://www.cve.org/CVERecord?id=CVE-2023-36664 CVE-2023-36664]&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== Problem ==&lt;br /&gt;
A bug in ghostscript can be exploited to run arbitrary code on the host machine using prepared PDF document. In BlueSpice, when a) PDFHandler is enabled and b) a PDF document is uploaded, a preview image is being generated using ghostscript. If an attacker uploads a prepared PDF, they can execute code on the server.&lt;br /&gt;
&lt;br /&gt;
PDFHandler is not enabled by default, but many installations have set it active.&lt;br /&gt;
&lt;br /&gt;
== Solution ==&lt;br /&gt;
Upgrade Ghostscript to a fixed version and ensure the updated version is used by adding &amp;lt;code&amp;gt;$wgPdfProcessor = &#039;/usr/bin/gs&#039;;&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;LocalSettings.php&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
If upgrade of Ghostscript is not possible, disable the extension PDFHandler. This, however, removes the ability for BlueSpice to render PDF preview images.&lt;br /&gt;
&lt;br /&gt;
== Resources ==&lt;br /&gt;
* For Debian: https://www.debian.org/security/2023/dsa-5446&lt;br /&gt;
* For Debian10: [https://security-tracker.debian.org/tracker/source-package/ghostscript Information on source package ghostscript (debian.org)]&lt;br /&gt;
* For Ubuntu: https://launchpad.net/ubuntu/+source/ghostscript/9.50~dfsg-5ubuntu4.8&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Acknowledgements ==&lt;br /&gt;
Found during an internal security audit.&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Setup:Installation_Guide/Optimization/Cronjobs&amp;diff=6257</id>
		<title>Setup:Installation Guide/Optimization/Cronjobs</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Setup:Installation_Guide/Optimization/Cronjobs&amp;diff=6257"/>
		<updated>2023-06-14T12:37:47Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: Add&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:Cronjobs}}&lt;br /&gt;
__TOC__&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This document describes cronjobs an related configurations, which should be set for your BlueSpice (depending on the used version).&lt;br /&gt;
&lt;br /&gt;
==Tips for this Document==&lt;br /&gt;
{{Setup-document-note}}&lt;br /&gt;
&lt;br /&gt;
{{Messagebox|boxtype=Hinweis|Note text=It is recommended to specify the complete path to php.exe under Windows. For more information, see the [[Setup:Installation_Guide/Services_and_system_configuration/Environment_Variables|environment variables]] document.}}&lt;br /&gt;
&lt;br /&gt;
==runJobs.php==&lt;br /&gt;
Time-consuming processes will be moved to a processing queue in the background of BlueSpice. With every page impression, a part of these will be processed. For the case that there are lots of processes in the queue and there are relatively litte page impressions, the tasks will not be processed promptly. &lt;br /&gt;
&lt;br /&gt;
For this reason, the queue should be processed regularly by cronjob. &lt;br /&gt;
&lt;br /&gt;
Create a cronjob (Windows: &amp;quot;Scheduled task&amp;quot;) depending on your operating system. The command to execute is:&lt;br /&gt;
&lt;br /&gt;
 php &amp;lt;code&amp;gt;&amp;amp;lt;installpath-bluespice&amp;amp;gt;&amp;lt;/code&amp;gt;/maintenance/runJobs.php &#039;&#039;(Linux)&#039;&#039;&lt;br /&gt;
 php.exe &amp;lt;code&amp;gt;&amp;amp;lt;installpath-bluespice&amp;amp;gt;&amp;lt;/code&amp;gt;\maintenance\runJobs.php &#039;&#039;(Windows)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Execute the cronjob every &#039;&#039;&#039;10 minutes&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==processRunner.php==&lt;br /&gt;
Certain tasks require server resources that can not be provided in the regular context of a webrequest. They will be moved to a special processing queue in the background of BlueSpice.&lt;br /&gt;
&lt;br /&gt;
Create a cronjob (Windows: &amp;quot;Scheduled task&amp;quot;) depending on your operating system. The command to execute is:&lt;br /&gt;
&lt;br /&gt;
 php &amp;lt;code&amp;gt;&amp;amp;lt;installpath-bluespice&amp;amp;gt;&amp;lt;/code&amp;gt;/vendor/mwstake/mediawiki-component-processmanager/maintenance/processRunner.php &amp;lt;code&amp;gt;&amp;amp;lt;installpath-bluespice&amp;amp;gt;&amp;lt;/code&amp;gt;/maintenance/Maintenance.php --max-processes=100 --wait &#039;&#039;(Linux)&#039;&#039;&lt;br /&gt;
 php.exe &amp;lt;code&amp;gt;&amp;amp;lt;installpath-bluespice&amp;amp;gt;&amp;lt;/code&amp;gt;\vendor\mwstake\mediawiki-component-processmanager\maintenance\processRunner.php &amp;lt;code&amp;gt;&amp;amp;lt;installpath-bluespice&amp;amp;gt;&amp;lt;/code&amp;gt;\maintenance\Maintenance.php --max-processes=100 --wait &#039;&#039;(Windows)&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Execute the cronjob every &#039;&#039;&#039;minute&#039;&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
[[en:{{FULLPAGENAME}}]]&lt;br /&gt;
[[de:Setup:Installationsanleitung/Optimierungen/Cronjobs]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Setup:Release_Notes/erm/latest&amp;diff=5458</id>
		<title>Setup:Release Notes/erm/latest</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Setup:Release_Notes/erm/latest&amp;diff=5458"/>
		<updated>2023-01-23T15:22:51Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== BlueSpice ERM 4.2 ==&lt;br /&gt;
&lt;br /&gt;
=== BlueSpice ERM 4.2.4-23.01.23.1 ===&lt;br /&gt;
This is an unscheduled release of the BlueSpice ERM 4.2 branch.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;bluespice/bluespice&amp;lt;/code&amp;gt; container does now support &amp;quot;HTTP/2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Changes since BlueSpice ERM 4.2.4 ====&lt;br /&gt;
&lt;br /&gt;
* CHANGE: PermissionManager - Configure public access for some namespace (#31083)&lt;br /&gt;
* FIX: BSP overload issues (#3098; easysoftware#569052)&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Setup:Release_Notes/erm/latest&amp;diff=5457</id>
		<title>Setup:Release Notes/erm/latest</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Setup:Release_Notes/erm/latest&amp;diff=5457"/>
		<updated>2023-01-23T15:22:34Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: Created page with &amp;quot;== BlueSpice ERM 4.2 ==  === BlueSpice ERM 4.2.4-23.01.23.1 === This is an unscheduled release of the BlueSpice ERM 4.2 branch.  The &amp;lt;code&amp;gt;bluespice/bluespice&amp;lt;/code&amp;gt; container...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== BlueSpice ERM 4.2 ==&lt;br /&gt;
&lt;br /&gt;
=== BlueSpice ERM 4.2.4-23.01.23.1 ===&lt;br /&gt;
This is an unscheduled release of the BlueSpice ERM 4.2 branch.&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;bluespice/bluespice&amp;lt;/code&amp;gt; container does now support &amp;quot;HTTP/2&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
==== Changes since BlueSpice ERM 4.2.4 ====&lt;br /&gt;
&lt;br /&gt;
* CHANGE: PermissionManager - Configure public access for some namespace (#31083)&lt;br /&gt;
* FIX: BSP overload issues (#3098; easysoftware:569052)&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Setup:Installation_Guide&amp;diff=5392</id>
		<title>Setup:Installation Guide</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Setup:Installation_Guide&amp;diff=5392"/>
		<updated>2022-12-28T09:40:51Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Messagebox|boxtype=note|icon=|Note text=For general questions regarding the installation, maintenance, and usage of BlueSpice free, go to our [https://sourceforge.net/p/bluespice/discussion/1249668/ SourceForge help forum] .|bgcolor=}}&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
We are happy that you decided to install the latest version of BlueSpice 4.  &lt;br /&gt;
&lt;br /&gt;
Please follow these steps: &lt;br /&gt;
&lt;br /&gt;
# [[Setup:Installation Guide#Check the system requirements|Check the system requirements]] &lt;br /&gt;
# [[Setup:Installation Guide#Prepare the server environment|Prepare the server environment]] &lt;br /&gt;
# [[Setup:Installation Guide#Install the BlueSpice application|Install the BlueSpice application]] &lt;br /&gt;
# [[Setup:Installation Guide#Optimizing the configuration|Optimize the configuration]] &lt;br /&gt;
&lt;br /&gt;
==Check the system requirements==&lt;br /&gt;
&lt;br /&gt;
*[[Setup:System requirements|System requirements]]&lt;br /&gt;
&lt;br /&gt;
== Prepare the server environment ==&lt;br /&gt;
&lt;br /&gt;
* [[Setup:Installation Guide/System Preparation/Linux|Linux server environment]]&lt;br /&gt;
* [[Setup:Installation Guide/System Preparation/Windows|Windows server environment]] &lt;br /&gt;
&lt;br /&gt;
==Install the BlueSpice application==&lt;br /&gt;
Please select which installation type you need:&lt;br /&gt;
&lt;br /&gt;
*[[Setup:Installation Guide/With Installer|Full BlueSpice installation]]&lt;br /&gt;
**Extended Functions: [[Setup:Installation Guide/Advanced/VisualEditor Configuration|VisualEditor]], [[Setup:Installation Guide/Advanced/ExtendedSearch Configuration|ExtendedSearch]]&lt;br /&gt;
*[[Setup:Installation Guide/Installation BlueSpice WikiFarm|BlueSpice WikiFarm installation]]&lt;br /&gt;
*[[Setup:Installation Guide/Docker/Docker Hub|Docker image]]&lt;br /&gt;
&lt;br /&gt;
==Upgrade and patch updates==&lt;br /&gt;
&lt;br /&gt;
*[[Setup:Installation Guide/Patch Update|Patch update from BlueSpice 4.2.x to a higher version 4.2.x+n]]&lt;br /&gt;
*[[Setup:Installation Guide/Upgrade free to pro|Upgrade from BlueSpice free 3.2.x to BlueSpice pro 4.2.x]]&lt;br /&gt;
*Upgrade from Bluespice free 4.2.x to pro 4.2.x&lt;br /&gt;
&lt;br /&gt;
==Migration from MediaWiki to BlueSpice==&lt;br /&gt;
&lt;br /&gt;
*[[Setup:Installation Guide/Migration from MediaWiki to BlueSpice|Migration from MediaWiki to BlueSpice]]&lt;br /&gt;
&lt;br /&gt;
==Optimize the configuration==&lt;br /&gt;
If you don&#039;t need to set up a server environment &amp;quot;from scratch&amp;quot;, you can directly refer to the setup instructions for individual system components. Just make sure that you really have everything configured as needed:&lt;br /&gt;
&lt;br /&gt;
===Webservices for Apache Tomcat===&lt;br /&gt;
&lt;br /&gt;
{{Special:PrefixIndex/Setup:Installation Guide/Webservices/ |hideredirects=1 |stripprefix=1}}&lt;br /&gt;
&lt;br /&gt;
===Additional settings and optimizations===&lt;br /&gt;
&lt;br /&gt;
*[[Setup:Installation Guide/Optimization/Caching|Caching]]&lt;br /&gt;
*[[Setup:Installation Guide/Optimization/Cronjobs|Cronjobs]]&lt;br /&gt;
*[[Setup:Installation Guide/Optimization/Time Zone|Time Zone]]&lt;br /&gt;
&lt;br /&gt;
===Security settings===&lt;br /&gt;
&lt;br /&gt;
*[[Setup:Installation Guide/Security Settings/File System Permissions|File System Permissions]]&lt;br /&gt;
*[[Setup:Installation Guide/Security Settings/Deactivating installcheck file|Deactivating installcheck file]]&lt;br /&gt;
*[[Setup:Installation Guide/Security Settings/Save Directories|Save Directories]]&amp;lt;br /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Compendium===&lt;br /&gt;
&lt;br /&gt;
{{Special:PrefixIndex/Setup:Installation Guide/Advanced/ |hideredirects=1 |stripprefix=1}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[en:{{FULLPAGENAME}}]]&lt;br /&gt;
[[de:Setup:Installationsanleitung]]&lt;br /&gt;
[[Category:Setup]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Setup:System_requirements&amp;diff=3817</id>
		<title>Setup:System requirements</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Setup:System_requirements&amp;diff=3817"/>
		<updated>2022-06-23T06:44:01Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:System Requirements}}&lt;br /&gt;
__NOTOC__&lt;br /&gt;
&lt;br /&gt;
For a trouble-free installation of the current version BlueSpice 3.4, we recommend the following system requirements. The application BlueSpice is tested by Hallo Welt! for Windows and Linux.&lt;br /&gt;
&lt;br /&gt;
==Browser==&lt;br /&gt;
&lt;br /&gt;
*Microsoft Edge&lt;br /&gt;
*Google Chrome&lt;br /&gt;
*Firefox&lt;br /&gt;
&lt;br /&gt;
==Server Environment==&lt;br /&gt;
{{Messagebox|boxtype=warning|icon=yes|Note text=PHP version 8 is currently not supported!|bgcolor=}}&lt;br /&gt;
*Operating system: Microsoft Windows Server &amp;gt;= 2016 or Linux (common distributions)&lt;br /&gt;
*Webserver: &amp;lt;span style=&amp;quot;color: rgb(68, 68, 68)&amp;quot;&amp;gt;Apache 2.4.x, IIS &amp;gt;= 10 &#039;&#039;or&#039;&#039; nginx 1.x&amp;lt;/span&amp;gt; (&#039;&#039;nginx&#039;&#039; &#039;&#039;not possible in WikiFarm&#039;&#039;)&lt;br /&gt;
*PHP 7.4.x starting at 7.4.3&lt;br /&gt;
*MySQL: &amp;gt;= 5.6 oder MariaDB &amp;gt;= 10.3&lt;br /&gt;
*Main memory: 16 GB (minimal 8 GB)&lt;br /&gt;
*Available hard drive space: &amp;gt; 20GB (depends on the planned storage of data)&lt;br /&gt;
*CPU: 8 (minimal 4) cores&lt;br /&gt;
*Apache Tomcat &amp;gt;= 9 oder Jetty &amp;gt;= 9  (for PDF export and LaTexRenderer)&lt;br /&gt;
*ElasticSearch 6.8 with plugin “ingest-attachment”&lt;br /&gt;
*OpenJDK &amp;gt;= 10&lt;br /&gt;
*NodeJS 16&lt;br /&gt;
[[en:{{FULLPAGENAME}}]]&lt;br /&gt;
[[de:Setup:Systemanforderungen]]&lt;br /&gt;
[[Category:Setup]]&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/FlaggedRevs/Server_script&amp;diff=3301</id>
		<title>Manual:Extension/FlaggedRevs/Server script</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/FlaggedRevs/Server_script&amp;diff=3301"/>
		<updated>2022-04-22T07:51:47Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Mass approval using a script ==&lt;br /&gt;
The script &amp;lt;code&amp;gt;extensions/BlueSpiceFlaggedRevsConnector/maintenance/BSBatchReview.php&amp;lt;/code&amp;gt; can be used to approve all drafts in the wiki. This affects both first drafts, drafts of pages with already approved versions and drafts for embedded resources.&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Option&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--username&amp;lt;/code&amp;gt;&lt;br /&gt;
|Required. The user name of the existing user to use as the &amp;quot;reviewer&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--pageids&amp;lt;/code&amp;gt;&lt;br /&gt;
|Flat file containing page ids seperated by line break&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--pages&amp;lt;/code&amp;gt;&lt;br /&gt;
|Flat file containing page names seperated by line break&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--namespace&amp;lt;/code&amp;gt;&lt;br /&gt;
|Id of namespace to flag entirely&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--flag&amp;lt;/code&amp;gt;&lt;br /&gt;
|Which flags to apply? Possible values: &amp;quot;quality&amp;quot;, &amp;quot;pristine&amp;quot;, &amp;quot;checked&amp;quot;. Default is &amp;quot;quality&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
{{Messagebox|boxtype=note|icon=|Note text=The options &amp;lt;code&amp;gt;--pageids&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--pages&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--namespace&amp;lt;/code&amp;gt; are mutual exclusive required. One - and only one - of them &#039;&#039;must&#039;&#039; be provided.}}&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
==== Whole namespace ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --namespace 3000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== List of page ids ====&lt;br /&gt;
Such a list can be created from a database query.&lt;br /&gt;
&lt;br /&gt;
File &amp;lt;code&amp;gt;/tmp/page-ids-to-review.txt&amp;lt;/code&amp;gt;:&lt;br /&gt;
 23&lt;br /&gt;
 42&lt;br /&gt;
 1337&lt;br /&gt;
&lt;br /&gt;
Command line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --pageids /tmp/page-ids-to-review.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== List of page names ====&lt;br /&gt;
Such a list can be created using a [[SMW queries|SMW query]].&lt;br /&gt;
File &amp;lt;code&amp;gt;/tmp/page-titles-to-review.txt&amp;lt;/code&amp;gt;:&lt;br /&gt;
 Some/Page&lt;br /&gt;
 Other_page&lt;br /&gt;
 Help:Some_help_page&lt;br /&gt;
&lt;br /&gt;
Command line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --pages /tmp/page-titles-to-review.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/FlaggedRevs/Server_script&amp;diff=3300</id>
		<title>Manual:Extension/FlaggedRevs/Server script</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/FlaggedRevs/Server_script&amp;diff=3300"/>
		<updated>2022-04-22T07:51:10Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Mass approval using a script ==&lt;br /&gt;
The script &amp;lt;code&amp;gt;extensions/BlueSpiceFlaggedRevsConnector/maintenance/BSBatchReview.php&amp;lt;/code&amp;gt; can be used to approve all drafts in the wiki. This affects both first drafts, drafts of pages with already approved versions and drafts for embedded resources.&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Option&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--username&amp;lt;/code&amp;gt;&lt;br /&gt;
|Required. The user name of the existing user to use as the &amp;quot;reviewer&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--pageids&amp;lt;/code&amp;gt;&lt;br /&gt;
|Flat file containing page ids seperated by line break&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--pages&amp;lt;/code&amp;gt;&lt;br /&gt;
|Flat file containing page names seperated by line break&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--namespace&amp;lt;/code&amp;gt;&lt;br /&gt;
|Id of namespace to flag entirely&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--flag&amp;lt;/code&amp;gt;&lt;br /&gt;
|Which flags to apply? Possible values: &amp;quot;quality&amp;quot;, &amp;quot;pristine&amp;quot;, &amp;quot;checked&amp;quot;. Default is &amp;quot;quality&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
{{Messagebox|boxtype=note|icon=|Note text=The options &amp;lt;code&amp;gt;--pageids&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--pages&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--namespace&amp;lt;/code&amp;gt; are mutual exclusive required. One - and only one - of them &#039;&#039;must&#039;&#039; be provided.}}&lt;br /&gt;
&lt;br /&gt;
=== Examples ===&lt;br /&gt;
&lt;br /&gt;
==== Whole namespace ====&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --namespace 3000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== List of page ids ====&lt;br /&gt;
Such a list can be created from a database query.&lt;br /&gt;
&lt;br /&gt;
File &amp;lt;code&amp;gt;/tmp/page-ids-to-review.txt&amp;lt;/code&amp;gt;;&lt;br /&gt;
 23&lt;br /&gt;
 42&lt;br /&gt;
 1337&lt;br /&gt;
&lt;br /&gt;
Command line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --pageids /tmp/page-ids-to-review.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== List of page names ====&lt;br /&gt;
Such a list can be created using a [[SMW queries|SMW query]].&lt;br /&gt;
File &amp;lt;code&amp;gt;/tmp/page-titles-to-review.txt&amp;lt;/code&amp;gt;;&lt;br /&gt;
 Some/Page&lt;br /&gt;
 Other_page&lt;br /&gt;
 Help:Some_help_page&lt;br /&gt;
&lt;br /&gt;
Command line:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --pages /tmp/page-titles-to-review.txt&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/FlaggedRevs/Server_script&amp;diff=3299</id>
		<title>Manual:Extension/FlaggedRevs/Server script</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/FlaggedRevs/Server_script&amp;diff=3299"/>
		<updated>2022-04-22T07:45:51Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Mass approval using a script ==&lt;br /&gt;
The script &amp;lt;code&amp;gt;extensions/BlueSpiceFlaggedRevsConnector/maintenance/BSBatchReview.php&amp;lt;/code&amp;gt; can be used to approve all drafts in the wiki. This affects both first drafts, drafts of pages with already approved versions and drafts for embedded resources.&lt;br /&gt;
&lt;br /&gt;
===Options===&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; style=&amp;quot;width:100%;&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!Option&lt;br /&gt;
!Description&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--username&amp;lt;/code&amp;gt;&lt;br /&gt;
|Required. The user name of the existing user to use as the &amp;quot;reviewer&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--pageids&amp;lt;/code&amp;gt;&lt;br /&gt;
|Flat file containing page ids seperated by line break&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--pages&amp;lt;/code&amp;gt;&lt;br /&gt;
|Flat file containing page names seperated by line break&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--namespace&amp;lt;/code&amp;gt;&lt;br /&gt;
|Id of namespace to flag entirely&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;code&amp;gt;--flag&amp;lt;/code&amp;gt;&lt;br /&gt;
|Which flags to apply? Possible values: &amp;quot;quality&amp;quot;, &amp;quot;pristine&amp;quot;, &amp;quot;checked&amp;quot;. Default is &amp;quot;quality&amp;quot;.&lt;br /&gt;
|}&lt;br /&gt;
{{Messagebox|boxtype=note|icon=|Note text=The options &amp;lt;code&amp;gt;--pageids&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;--pages&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;--namespace&amp;lt;/code&amp;gt; are mutual exclusive required. One - and only one - of them &#039;&#039;must&#039;&#039; be provided.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The pages are released per namespace and by a user with admin rights:&lt;br /&gt;
&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
php extensions/BlueSpiceflaggedRevsConnector/maintenance/BSBatchReview.php --username WikiSysop --namespace 3000&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
If there is a large number of affected namespaces, a list of page titles or page IDs can be specified as a txt file. If necessary, this list can be created using a [[SMW queries|SMW query]].&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=User:Rvogel&amp;diff=3295</id>
		<title>User:Rvogel</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=User:Rvogel&amp;diff=3295"/>
		<updated>2022-04-21T07:08:42Z</updated>

		<summary type="html">&lt;p&gt;Rvogel: create user page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Userpage standard content}}&lt;/div&gt;</summary>
		<author><name>Rvogel</name></author>
	</entry>
</feed>