PROCESS AUTHORING OVERVIEW

Introduction

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.

wf_process_archive

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.

wf_metadata

Creating process definitions: the steps

Creating a new workflow process definition involves the following steps:

  1. Create a process definition file (processdefinition.xml) in the JPDL (JBoss Process Definition Language) format.

  2. Create a Daisy process metadata file (daisy-process-meta.xml) adding labels and descriptions for tasks, transitions, etc, and describing the interaction with tasks.

  3. Optionally create resource bundles with localized texts.

  4. Zip these together

  5. Deploy them via the Daisy Wiki Administration console.

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).

Further in this document we'll also give more information that is relevant to authoring process definitions, such as some structural requirements imposed by Daisy (nodes, tasks and transitions should have names), and some useful utilities (writing actions in Javascript, the assignment handler).

Looking at the sample processes included with Daisy can also help you get started.

Creating a Daisy process metadata file

See the section daisy-process-meta.xml reference for more information on this.

Creating resource bundles

See the section on internationalization for more information on this.

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, ...)

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.