Draft:Manual:Extension/Workflows/Triggers: Difference between revisions

No edit summary
No edit summary
 
Line 23: Line 23:




​​If the workflow is based on an edit-event, you can limit the workflow to be triggered only for major edits. Edits that a user marks as a minor edit when saving the page will not trigger the workflow.
​​​If the workflow is based on an edit-event, you can limit the workflow to be triggered only for major edits. Edits that a user marks as a minor edit when saving the page will not trigger the workflow.
|}
|}



Latest revision as of 12:42, 20 May 2025

The special page MediaWiki:WorkflowTriggers makes it possible to set up different triggers for existing workflows. You can access this page from Global actions > Editing> Workflow triggers.

Characteristics of the triggers

All triggers share some commonalities:

Field Description
Name Give the trigger a unique name so that it is easy to identify its purpose.
Description Describe to other users in more detail what this workflow does.
Workflow to start Select the workflow that will be triggered.
Initial data for the workflow You can provide some default data to be used in the workflow. In a manual workflow trigger, this data can later be overwritten when the workflow is started by a user.
Conditions Select whether this workflow should only be available in particular namespaces. If no namespace is given, the workflow is available for the entire wiki.


​​​If the workflow is based on an edit-event, you can limit the workflow to be triggered only for major edits. Edits that a user marks as a minor edit when saving the page will not trigger the workflow.

Types of triggers

Based on a semantic property

If the wiki uses semantic properties of type date, a workflow can start based on this date. It is possible to define an offset from the date, so that the workflow can start before or after the date in the associated property has been reached.

Semantic date trigger
Semantic date trigger
Additional fields
Field Description
Semantic property (of type: Date) Name of the date-property in the wiki that will trigger the workflow
Days offset from the date in the property Set to a negative number if the workflow should start before the property date (e.g., -7)

Set to a positive number if the worklfow should start after the property date (e.g., 5)

On edit

A workflow can also be triggered each time a page is edited. For this trigger it makes sense to set the conditions to individual namespaces and to trigger only on major edits. Users should be instructed that this workflow exists and that they should mark edits as minor when saving the page so that no unnecessary workflows are triggered.

On page creation

When new pages are created, a workflow can also be triggered.

Manual

Workflows can also be selected to start manually. In this case, the workflow is available in the page tools menu and can be started at any time.

It's possible to configure the workflows to be available only in chosen namespaces.

For example, it is possible to create a manual trigger for the Expert Document Control workflow to approve pages. This workflow can then be set to be offered only in a particular namespace and assign an approval task to a particular reviewer group.

Manual start of a workflow

Source editing

Technically savvy users can also edit workflow triggers in the source code (JSON syntax) and configure more detailed settings. A corresponding link is provided on the page.