Manual:Extension/Workflows/Activity/SetTemplateParams: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
==<span class="mw-headline">Description</span>==
==Description==
<span style="color: rgb(4, 30, 73)">The ''SetTemplateParams'' activity allows template parameters to be set automatically on a page.</span>
[[File:Manual:wf-EditRequest-dialog-EN.png|alt=EditRequest dialog|thumb|EditRequest dialog]]
 
The ''EditRequest'' activity asks a specified user to edit a page where a workflow is currently running. This activity consists of a form that simply provides information about editing the corresponding page and then submitting the change.
* Templates are accessed by the order of appearance on the page.
{| class="wikitable"
* Non-existing templates are counted as links, so they do not count in this list.
! colspan="2" |'''Short profile'''
* Params inside the template can be specified by their name, or the index in case of non-named params. Index for non-named params starts at 1 (not 0!), as to be consistent with how template params are accessed in the template itself.
* Nested templates are not supported as of now.
 
{| class="wikitable" style=""
! colspan="2" style="background-color:rgb(234, 236, 240);text-align:center;" class="" |'''Short profile'''
|-
|-
| style="" |Name
|Name
| style="" |SetTemplateParams
|EditRequest
|-
|-
| style="" |Async
|Async
| style="" |Yes
|No
|-
|-
| style="" |BPMN type
|BPMN type
| style="" |<code>bpmn:Task</code>
|<code>bpmn:userTask</code>
|-
|-
|BPMN Extension Element "wf:type"
|BPMN Extension Element "wf:type"
|<code>set_template_param</code>
|<code>edit_request</code>
|}<!-- https://github.com/wikimedia/mediawiki-extensions-Workflows/blob/master/doc/Activity/SetTemplateParams.MD -->
|}


==<span class="mw-headline">Properties</span>==
==Properties==
 
{| class="wikitable"
=== Input properties ===
! style="vertical-align:middle;text-align:left;width:70px;" |'''Name of property'''
{| class="wikitable" style="width:100%;"
!'''Source'''
! style="background-color:rgb(234, 236, 240);text-align:center;" class="" |Name of property
!'''Description'''
!Source
!'''Type'''
! style="background-color:rgb(234, 236, 240);text-align:center;" class="" |Description
!Possible values
! style="background-color:rgb(234, 236, 240);text-align:center;" class="" |Type
|-
|-
| style="" |<code>title</code>
|<code>due_date</code>
|<nowiki>-</nowiki>
|UIActivity
| style="" |Name of the wiki page that includes the template(s).
|Due date for task completion
|<code>"Main_page"</code>
|date/timestamp
| style="" |string
|-
|-
|<code>user</code>
| style="width:70px;" |<code>assigned_user</code>
| -
|UIActivity
|Name of user that will be shown as revision user.
|Name of the user that should edit a page. Can be plain username (e.g. "WikiSysop") or user page ("User:WikiSysop"); Support for User-ID is not required
|<code>"WikiSysop"</code>
|string
|string
|-
|-
|<code>template-index</code>
| style="width:70px;" |<code>instructions</code>
|  -
|InstructedActivity
|Index of the template on page (starting from 0).
|Text that is shown to the user, so he knows what to do; visible in the UI / form but is optional
|<code>"2"</code>
|int
|-
|<code>template-param</code>
| -
|Param to modify. Can be a string in case of named params, or a number, in case of non-named params (starting from 1, accessor for the param)
|<code>"comment"</code> OR <code>"1"</code>
| rowspan="2" |int, string
|-
|<code>value</code>
|  -
|New parameter value to set.
|<code>"New value of parameter"</code>
|-
|<code>minor</code>
|  -
|<span style="color: rgb(4, 30, 73)">The edit will be marked as</span> ''major'' <span style="color: rgb(4, 30, 73)">or</span> ''minor'' <span style="color: rgb(4, 30, 73)">revision.</span>
|<code>default="0"</code>
*''1'' (=minor revision)
*''0'' (=major revision)
|int
|}
 
=== Output properties ===
{| class="wikitable" style="width:100%;"
! style="background-color:rgb(234, 236, 240);text-align:center;" class="" |Name of property
!Source
! style="background-color:rgb(234, 236, 240);text-align:center;" class="" |Description
! style="background-color:rgb(234, 236, 240);text-align:center;" class="" |Type
|-
|<code>revisionId</code>
| -
|The revision ID of the edited page.
|string
|string
|-
|<code>timestamp</code>
| -
|The revision time of the edited page.
|timestamp
|}
|}
== Example ==
<syntaxhighlight lang="xml">
<bpmn:task id="EditTemplate" name="Edit template">
<bpmn:extensionElements>
<wf:type>set_template_param</wf:type>
</bpmn:extensionElements>
<bpmn:property name="title" default="DummyPage" validation="required,existing-title"/>
<bpmn:property name="user" default="WikiSysop" validation="existing-user"/>
<!-- Index of the template on page (starting from 0) -->
<bpmn:property name="template-index" default="2"/>
<!-- Param to modify. Can be a string in case of named params, or a number, in case of non-named params (starting from 1, accessor for the param) -->
<bpmn:property name="template-param" default="1"/>
<!-- New value to set -->
<bpmn:property name="value" default="Super edited param"/>
<bpmn:property name="minor" default="0"/>
<!-- Output properties -->
<bpmn:property name="revisionId"/>
<bpmn:property name="timestamp"/>
  <bpmn:incoming>Flow_1qh6vpl</bpmn:incoming>
  <bpmn:outgoing>Flow_0if1kyp</bpmn:outgoing>
</bpmn:task>
</syntaxhighlight>

Revision as of 12:15, 27 September 2023

Description

EditRequest dialog
EditRequest dialog

The EditRequest activity asks a specified user to edit a page where a workflow is currently running. This activity consists of a form that simply provides information about editing the corresponding page and then submitting the change.

Short profile
Name EditRequest
Async No
BPMN type bpmn:userTask
BPMN Extension Element "wf:type" edit_request

Properties

Name of property Source Description Type
due_date UIActivity Due date for task completion date/timestamp
assigned_user UIActivity Name of the user that should edit a page. Can be plain username (e.g. "WikiSysop") or user page ("User:WikiSysop"); Support for User-ID is not required string
instructions InstructedActivity Text that is shown to the user, so he knows what to do; visible in the UI / form but is optional string




To submit feedback about this documentation, visit our community forum.