No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
==Description== | ==Description== | ||
The ''SetTemplateParams'' activity allows automatic setting of template parameters on a wiki page. | |||
The '' | |||
* Templates are accessed by the order of appearance on the page, starting at 0. Non-existing templates are counted as links, so they do not count in this list. | |||
* Parameters inside the template can be specified by their name or the index in case of non-named parameters. | |||
* 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 currently not supported | |||
== 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> | |||
{| class="wikitable" | {| class="wikitable" | ||
! colspan="2" |'''Short profile''' | ! colspan="2" |'''Short profile''' | ||
|- | |- | ||
|Name | |Name | ||
| | |SetTemplateParams | ||
|- | |- | ||
|Async | |Async | ||
| | |Yes | ||
|- | |- | ||
|BPMN type | |BPMN type | ||
|<code>bpmn: | |<code>bpmn:task</code> | ||
|- | |- | ||
|BPMN Extension Element "wf:type" | |BPMN Extension Element "wf:type" | ||
|<code> | |<code>set_template_param</code> | ||
|} | |} | ||
Line 25: | Line 55: | ||
!'''Type''' | !'''Type''' | ||
|- | |- | ||
|<code> | |<code>title</code> | ||
|UIActivity | |UIActivity | ||
| | | | ||
| | |string | ||
|- | |- | ||
| style="width:70px;" |<code> | | style="width:70px;" |<code>user</code> | ||
|UIActivity | |UIActivity | ||
| | | | ||
| | | | ||
|- | |||
|<code>template-index</code> | |||
|''InstructedActivity?'' | |||
| | |||
| | |||
|- | |||
|<code>template- param</code> | |||
| | |||
| | |||
| | |||
|- | |||
|<code>value</code> | |||
| | |||
| | |||
| | |||
|- | |||
|<code>minor</code> | |||
| | |||
| | |||
| | |||
|- | |||
|<code>revisionId</code> | |||
| | |||
| | |||
| | |||
|- | |- | ||
|<code>timestamp</code> | |||
| | | | ||
| | | | ||
| | | | ||
|} | |} |
Revision as of 12:28, 27 September 2023
Description
The SetTemplateParams activity allows automatic setting of template parameters on a wiki page.
- Templates are accessed by the order of appearance on the page, starting at 0. Non-existing templates are counted as links, so they do not count in this list.
- Parameters inside the template can be specified by their name or the index in case of non-named parameters.
- 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 currently not supported
Example
<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>
Short profile | |
---|---|
Name | SetTemplateParams |
Async | Yes |
BPMN type | bpmn:task
|
BPMN Extension Element "wf:type" | set_template_param
|
Properties
Name of property | Source | Description | Type |
---|---|---|---|
title
|
UIActivity | string | |
user
|
UIActivity | ||
template-index
|
InstructedActivity? | ||
template- param
|
|||
value
|
|||
minor
|
|||
revisionId
|
|||
timestamp
|