wftk: wftk core engine

[ download ] [ xml source ] [ discussion ]

This is the core workflow engine for the open-source workflow toolkit. It is a prototype, meaning that it is really bare-bones. The basic mode of operation of this version is as a command-line program which accepts one workflow event command on its command line, or a script file on stdin. Commands are simple: start a process, complete or reject a task, set a value. These commands are intended to be used by a task manager such as the to-do manager to interpret a workflow process definition.

Besides its commands, the engine has two sources of input: the process definition and the datasheet. The procdef stores information about a class of processes; the datasheet stores information about the current instance of that class. Both documents are XML documents, and the core engine interprets these documents using James Clark's expat parser, a stable and fairly simple parser.

As the engine performs the commands given it, it emits commands which will be consumed by the task manager. These commands are on stdout and consists of instructions to active tasks, complete the process, or set the owner of the process. In addition, debugging output may be interspersed on stdout and should be ignored by the task manager.

This initial version of wftk core understands nothing about databases. It knows only how to get its process definitions from the local filesystem, and the same goes for datasheet storage. It is wasteful, as it parses both procdef and datasheet on each call (instead of staying resident as a daemon and caching this information. All in good time.) It relies on an external task manager to maintain all database information about active processes and tasks; indeed, it can't even activate a task alone. It can, however, make changes to data, alert users and others of events, and start programs.

Here's how we do all this stuff:

This code and documentation are released under the terms of the GNU license. They are additionally copyright (c) 2000, Vivtek. All rights reserved except those explicitly granted under the terms of the GNU license.