MetaWorkflowPlugin
Define a workflow based on updated meta data (such as form fields, or meta data from another plugin)
Introduction
This plugin defines a workflow based on updated meta data in a number of topics. It was originally written for use with the
WorkflowPlugin, but can also be used to create a workflow using
TWikiForms or any other changing meta data. To view the meta data of a topic, append
?raw=debug
to the URL (i.e.
https://twiki.org/cgi-bin/view/Plugins/MetaWorkflowPlugin?raw=debug).
Usage
To use this plugin, you must first create a Meta Worflow Definition table. This can either be in the topic you want to display the message from, or in another topic specified by the following setting:
* Set METAWORKFLOWDEFINITION = Web.SomeTopic
The meta workflow definition table starts with the
%METAWORKFLOW{...}%
variable, which can have the following parameters:
Parameter |
Comment |
Default |
type |
The type of meta data. |
required |
name |
The name of the meta data type. Needed if you are working with multiple entries of the same type (i.e. for FIELD). |
none |
key |
The key of the meta data you want to match (i.e. value). |
name |
The table itself must follow immediately after the
%METAWORKFLOW{...}%
variable. It is made up of three columns, as explained below.
Topic |
Value |
Message |
The topic where the meta data is coming from. |
Defines what the value needs to be equal to before moving to the next row of the table. |
The message displayed if the value is not equal. |
The topic column can also contain the word
FINAL
, which will display a message once the workflow has been completed. The plugin will ignore header rows.
The message is displayed using the
%METAWORKFLOWCURRENT%
variable. This needs to be in the same topic as the definition table, or in a topic with the
METAWORKFLOWDEFINITION
setting.
Example
A working example of using this plugin to create a workflow based on the value of a form field can be found at
Sandbox.MetaWorkflowExample, once you have installed and enabled the plugin.
Plugin Settings
- To suppress warnings on your topic, use the following (Note: only has effect on the topic it is set on):
* Set METAWORKFLOWWARNING = off
- One line description, is shown in the TextFormattingRules topic:
- Set SHORTDESCRIPTION = Define a workflow based on updated meta data (such as form fields, or meta data from another plugin)
Installation Instructions
You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server where TWiki is running.
Like many other TWiki extensions, this module is shipped with a fully
automatic installer script written using the BuildContrib.
- If you have TWiki 4.2 or later, you can install from the
configure
interface (Go to Plugins->Find More Extensions)
- If you have any problems, then you can still install manually from the command-line:
- Download one of the
.zip
or .tgz
archives
- Unpack the archive in the root directory of your TWiki installation.
- Run the installer script (
perl <module>_installer
)
- Run
configure
and enable the module, if it is a plugin.
- Repeat for any missing dependencies.
- If you are still having problems, then instead of running the installer script:
- Make sure that the file permissions allow the webserver user to access all files.
- Check in any installed files that have existing
,v
files in your existing install (take care not to lock the files when you check in)
- Manually edit LocalSite.cfg to set any configuration variables.
Plugin Files
File: |
Description: |
data/TWiki/MetaWorkflowPlugin.txt |
Documentation |
data/Sandbox/MetaWorkflowExample.txt |
Example |
data/Sandbox/MetaWorkflowExampleFormDefinition.txt |
Example |
data/Sandbox/MetaWorkflowExamplePhaseOne.txt |
Example |
data/Sandbox/MetaWorkflowExamplePhaseThree.txt |
Example |
data/Sandbox/MetaWorkflowExamplePhaseTwo.txt |
Example |
lib/TWiki/Plugins/MetaWorkflowPlugin.pm |
Perl module |
Plugin Info
Related Topics: MetaWorkflowExample,
TWikiPlugins,
DeveloperDocumentationCategory,
AdminDocumentationCategory