MetaWorkflowPlugin
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.
http://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
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.1 or later, you can install from the
configure interface (Go to Plugins->Find More Extensions)
- The webserver user has to have permission to write to all areas of your installation for this to work.
- If you have a permanent connection to the internet, you are recommended to use the automatic installer script
- Just download the
MetaWorkflowPlugin_installer perl script and run it.
- Notes:
- The installer script will:
- Automatically resolve dependencies,
- Copy files into the right places in your local install (even if you have renamed data directories),
- check in new versions of any installed files that have existing RCS histories files in your existing install (such as topics).
- If the $TWIKI_PACKAGES environment variable is set to point to a directory, the installer will try to get archives from there. Otherwise it will try to download from twiki.org or cpan.org, as appropriate.
- (Developers only: the script will look for twikiplugins/MetaWorkflowPlugin/MetaWorkflowPlugin.tgz before downloading from TWiki.org)
- If you don't have a permanent connection, you can still use the automatic installer, by downloading all required TWiki archives to a local directory.
- Point the environment variable
$TWIKI_PACKAGES to this directory, and the installer script will look there first for required TWiki packages.
-
$TWIKI_PACKAGES is actually a path; you can list several directories separated by :
- If you are behind a firewall that blocks access to CPAN, you can pre-install the required CPAN libraries, as described at http://twiki.org/cgi-bin/view/TWiki/HowToInstallCpanModules
- If you don't want to use the installer script, or have problems on your platform (e.g. you don't have Perl 5.8), then you can still install manually:
- Download and unpack one of the
.zip or .tgz archives to a temporary directory.
- Manually copy the contents across to the relevant places in your TWiki installation.
- 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.
- Run
configure and enable the module, if it is a plugin.
- Repeat from step 1 for any missing dependencies.
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
- Set SHORTDESCRIPTION = Define a workflow based on updated meta data in TWiki topics