8.2 Authoring process definitions
8.2.1 Process authoring overview
This section will get you started creating your own workflow process definitions.
The process definitions are normal jBPM process definitions. In jBPM, a process definition is an XML file. This XML file can be deployed as-is, or can be put in a process archive (a zip file). The process archive can contain additional resources such as class files for process actions.
Daisy adds a custom metadata layer to the jBPM workflow process definition. This extra metadata:
describes the task interactions (essentially comes down to a description of the variables that can be updated)
adds localization for things like tasks and transitions (using resource bundles)
The Daisy-specific metadata is completely optional (i.e. it is possible to deploy pure jBPM process definitions), but since most tasks will require some form of input from the user (variables), you'll likely want to make use of it.
22.214.171.124 Creating process definitions: the steps
Creating a new workflow process definition involves the following steps:
Create a process definition file (processdefinition.xml) in the JPDL (JBoss Process Definition Language) format.
Create a Daisy process metadata file (daisy-process-meta.xml) adding labels and descriptions for tasks, transitions, etc, and describing the interaction with tasks.
Optionally create resource bundles with localized texts.
Zip these together
Deploy them via the Daisy Wiki Administration console.
126.96.36.199.1 Writing the process definition
The process definition itself is of course the most important thing. A workflow process consists of a number of nodes/states (at least a start and an end state) with transitions between them. We refer to the jBPM documentation for information on how to author these. It is recommended to look not only at the chapter describing the JPDL syntax, but also to study the underlying concepts of GOP (Graph Oriented Programming).
Looking at the sample processes included with Daisy can also help you get started.
188.8.131.52.2 Creating a Daisy process metadata file
See the section
184.108.40.206.3 Creating resource bundles
See the section on
220.127.116.11.4 Creating the process zip
Package the files together in a zip file, using the following structure:
root | +-- processdefinition.xml | +-- daisy-process-meta.xml | +-- i18n (directory) | +-- messages bundle files (e.g. messages.xml, messages_fr.xml, ...)
18.104.22.168.5 Deploying the process definition
A process definition can be deployed using the Daisy API, or more commonly through the Administration console of the Daisy Wiki.
This last one is accessible by logging in to the Daisy Wiki, switching to the Administrator role, selecting the Administration option in the menu, and finally selecting “Manage process definitions”.
Make sure the name of your process definition (defined in the processdefinition.xml using the name attribute on the root element) doesn't conflict with the name of any existing process definition, unless of course you are deploying a new version of an existing process.