<?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=Akulbii</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=Akulbii"/>
	<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/wiki/Special:Contributions/Akulbii"/>
	<updated>2026-04-08T23:04:26Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.17</generator>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=8737</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=8737"/>
		<updated>2024-05-29T08:21:52Z</updated>

		<summary type="html">&lt;p&gt;Akulbii: &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;
{{Textbox|boxtype=important|header=Note|text=XML which is provided below is incompatible with &amp;quot;BPMN Editor&amp;quot; added in BlueSpice 4.5. There is no way to edit it in visual way.|icon=yes}}&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;
*Line 3: 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:bpmndi=&amp;quot;http://www.omg.org/spec/BPMN/20100524/DI&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot; xmlns:di=&amp;quot;http://www.omg.org/spec/DD/20100524/DI&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;FromTheStartToTheEnd&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;FromTheStartToTheEnd&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;TheEnd&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;FromTheStartToTheEnd&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>Akulbii</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Manual:Extension/Workflows/Tutorial&amp;diff=8736</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=8736"/>
		<updated>2024-05-28T13:19:56Z</updated>

		<summary type="html">&lt;p&gt;Akulbii: Fix sample workflow XML&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;
*Line 3: 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:bpmndi=&amp;quot;http://www.omg.org/spec/BPMN/20100524/DI&amp;quot; xmlns:wf=&amp;quot;http://hallowelt.com/schema/bpmn/wf&amp;quot; xmlns:di=&amp;quot;http://www.omg.org/spec/DD/20100524/DI&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;FromTheStartToTheEnd&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;FromTheStartToTheEnd&amp;quot; sourceRef=&amp;quot;TheStart&amp;quot; targetRef=&amp;quot;TheEnd&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;FromTheStartToTheEnd&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;!-- Visual part --&amp;gt;&lt;br /&gt;
	&amp;lt;bpmndi:BPMNDiagram id=&amp;quot;BPMNDiagram_1&amp;quot;&amp;gt;&lt;br /&gt;
		&amp;lt;bpmndi:BPMNPlane id=&amp;quot;BPMNPlane_1&amp;quot; bpmnElement=&amp;quot;Classification_workflow_process&amp;quot;&amp;gt;&lt;br /&gt;
			&amp;lt;bpmndi:BPMNEdge id=&amp;quot;FromTheStartToTheEnd_di&amp;quot; bpmnElement=&amp;quot;FromTheStartToTheEnd&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;di:waypoint x=&amp;quot;192&amp;quot; y=&amp;quot;120&amp;quot;/&amp;gt;&lt;br /&gt;
				&amp;lt;di:waypoint x=&amp;quot;342&amp;quot; y=&amp;quot;120&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmndi:BPMNEdge&amp;gt;&lt;br /&gt;
			&amp;lt;bpmndi:BPMNShape id=&amp;quot;StartEvent_di&amp;quot; bpmnElement=&amp;quot;TheStart&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;dc:Bounds x=&amp;quot;156&amp;quot; y=&amp;quot;102&amp;quot; width=&amp;quot;36&amp;quot; height=&amp;quot;36&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmndi:BPMNShape&amp;gt;&lt;br /&gt;
			&amp;lt;bpmndi:BPMNShape id=&amp;quot;TheEnd_di&amp;quot; bpmnElement=&amp;quot;TheEnd&amp;quot;&amp;gt;&lt;br /&gt;
				&amp;lt;dc:Bounds x=&amp;quot;342&amp;quot; y=&amp;quot;102&amp;quot; width=&amp;quot;36&amp;quot; height=&amp;quot;36&amp;quot;/&amp;gt;&lt;br /&gt;
			&amp;lt;/bpmndi:BPMNShape&amp;gt;&lt;br /&gt;
			&lt;br /&gt;
		&amp;lt;/bpmndi:BPMNPlane&amp;gt;&lt;br /&gt;
	&amp;lt;/bpmndi:BPMNDiagram&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>Akulbii</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=Setup:Installation_Guide/Advanced/Maintenance_scripts/executeTransfer&amp;diff=6230</id>
		<title>Setup:Installation Guide/Advanced/Maintenance scripts/executeTransfer</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=Setup:Installation_Guide/Advanced/Maintenance_scripts/executeTransfer&amp;diff=6230"/>
		<updated>2023-06-06T18:17:47Z</updated>

		<summary type="html">&lt;p&gt;Akulbii: Fix &amp;quot;--namespace&amp;quot; option description. Namespace&amp;#039;s ID is used, not name&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{DISPLAYTITLE:extensions/ContentTransfer/maintenance/executeTransfer.php}}&lt;br /&gt;
[[Setup:Installation_Guide/Advanced/Maintenance_scripts|{{Icon|bi bi-arrow-right-circle|||}} all maintenance scripts]]&lt;br /&gt;
== Reference ==&lt;br /&gt;
BlueSpice Extension: [[Reference:ContentTransfer|ContentTransfer]]&lt;br /&gt;
&lt;br /&gt;
== Usage ==&lt;br /&gt;
 &lt;br /&gt;
There are three ways to specify pages which pages to transfer: &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;--category&#039;&#039;&#039;&amp;lt;/code&amp;gt;: This option lets you transfer based on category:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
php extensions/ContentTransfer/maintenance/executeTransfer.php --category=GlobalPage --targets=Target1,Target2,Target3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;--namespace&#039;&#039;&#039;&amp;lt;/code&amp;gt;: This option lets you transfer based on namespace ID:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
php extensions/ContentTransfer/maintenance/executeTransfer.php --namespace=10 --targets=Target1,Target2,Target3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
* &amp;lt;code&amp;gt;&#039;&#039;&#039;--pages&#039;&#039;&#039;&amp;lt;/code&amp;gt; This option lets you explicitly specify which pages  to transfer:&amp;lt;syntaxhighlight lang=&amp;quot;php&amp;quot;&amp;gt;&lt;br /&gt;
php extensions/ContentTransfer/maintenance/executeTransfer.php --pages=Page1,Demo:Page2,Page3 --targets=Target1,Target2,Target3&lt;br /&gt;
&amp;lt;/syntaxhighlight&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuration ==&lt;br /&gt;
The maintenance script can consume a JSON file with the necessary configuration.  A sample JSON file is located at this path: &amp;lt;code&amp;gt;extensions/ContentTransfer/docs/transfer-config.json.example&amp;lt;/code&amp;gt;. This file can be used to create a JSON configuration file somewhere, so that it is not necessary to type all options in the CLI each time.&lt;br /&gt;
&lt;br /&gt;
For that, &amp;lt;code&amp;gt;--json-config&amp;lt;/code&amp;gt;  can be used. There can be a specified path to the file with the JSON configuration.&lt;br /&gt;
&lt;br /&gt;
If you need to create your own JSON configuration file, copy the sample JSON file somewhere and edit it to set the necessary configuration.&lt;br /&gt;
&lt;br /&gt;
For example, you have the file &amp;lt;code&amp;gt;/home/some_user/config/transfer-config.json&amp;lt;/code&amp;gt;. Then it can be used like that:&lt;br /&gt;
 &amp;lt;code&amp;gt;php extensions/ContentTransfer/maintenance/executeTransfer.php --json-config=/home/some_user/config/transfer-config.json&amp;lt;/code&amp;gt;&lt;br /&gt;
You can specify either an absolute file path from the root or a relative path from the present working directory.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is also possible to use a JSON file and additionally pass options from the CLI. In that case, the options from CLI will have greater priority and &#039;&#039;&#039;will override&#039;&#039;&#039; the same options from JSON file.&lt;br /&gt;
&lt;br /&gt;
Example:&lt;br /&gt;
 &amp;lt;code&amp;gt;php extensions/ContentTransfer/maintenance/executeTransfer.php --json-config=/home/some_user/config/transfer-config.json --pages=Page1,Demo:Page2,Page3 --targets=Target1,Target2,Target3&amp;lt;/code&amp;gt;&lt;br /&gt;
Here, the script will read the configuration from the specified JSON file , but the &#039;&#039;&#039;“pages”&#039;&#039;&#039; and &#039;&#039;&#039;“targets”&#039;&#039;&#039; options &#039;&#039;&#039;will be overridden&#039;&#039;&#039; from the CLI (if they are presented in JSON). The same is true for the other options.&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;--user&amp;lt;/code&amp;gt;: The context user of  the &amp;quot;sending&amp;quot; wiki who will be used to transfer wiki pages. This is just about recording the transfer in the DB. Default: &#039;&#039;&#039;“MediaWiki default”&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;--only-modified&amp;lt;/code&amp;gt;: If the page should be transferred only if it was modified since the last transfer. &#039;&#039;&#039;It&#039;s just a flag, it can be passed or not.&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;--modified-since&amp;lt;/code&amp;gt;:Transfer the page only if it was modified since the specified date. The date must be specified in the format &#039;&#039;&#039;&amp;quot;DD.MM.YYYY&amp;quot;&#039;&#039;&#039;. Default: &#039;&#039;&#039;“”&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;--include-related&amp;lt;/code&amp;gt;:If all related wiki pages should also be transferred (templates, files, links, and so on, which are used on the page to be transferred. &#039;&#039;&#039;It&#039;s just a flag, it can be passed or not.&#039;&#039;&#039;&lt;br /&gt;
* &amp;lt;code&amp;gt;--force&amp;lt;/code&amp;gt;:Transfer the page even if it is protected on the receiving wiki. &#039;&#039;&#039;It&#039;s just a flag, it can be passed or not.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Also there is a &amp;lt;code&amp;gt;--dry&amp;lt;/code&amp;gt; option (it&#039;s a flag too), which may be useful if a user just wants to take a look at transferring titles, but without actual changes in “receiving” wikis.&lt;br /&gt;
&lt;br /&gt;
You can see a complete list of possible options with descriptions by the following command:&lt;br /&gt;
  &amp;lt;code&amp;gt;php extensions/ContentTransfer/maintenance/executeTransfer.php --help&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If there is a need to set a specific user for creating pages in the target wiki , it can be done that way:&lt;br /&gt;
 &amp;lt;code&amp;gt;php extensions/ContentTransfer/maintenance/executeTransfer.php ... --targets=Target1=User1,Target2=User2,Target3...&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>Akulbii</name></author>
	</entry>
	<entry>
		<id>https://en.wiki4.bluespice.com/w/index.php?title=User:Akulbii&amp;diff=6229</id>
		<title>User:Akulbii</title>
		<link rel="alternate" type="text/html" href="https://en.wiki4.bluespice.com/w/index.php?title=User:Akulbii&amp;diff=6229"/>
		<updated>2023-06-06T18:08:42Z</updated>

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