download

Sites

The Leave workflow application

Follow instructions in the ​INSTALL.TXT file included in the ​goflow distribution.
You can then play with the leave demo application (available online too).
You will find here some details of the leave application implementation.

defining the workflow process

First, let's take a look at the process definition; the process is stored in the database, by using entities like Process, Activities, Transitions, Application (see workflow/models.py, and the ​goflow data model generated by modelviz/graphviz). In the leavedemo project, the process is dumped with the django dumpdata utility, and provided as a fixture. Typically, when you want to define a process, you will use the admin web console.

this ​diagram is a graphviz dot representation. It has
written by hand, but soon, it should be generated.

Some definitions:A transition is a path from an Activity to another one.
An Activity is a task that a person (or an automatic process) with a specific role must achieve: it is linked to an Application which is typically an URL declared in the urls.py file.
A push application is a handler that return a user, given the context of process instance (in fact the parameter of the handler is a workitem, we will see this later)

Custom applications

for more advanced usages, you may write your own applications: for this, take a look at the application form code (see above) and copy-paste the code in your project (in an applications.py file) and customize it; one advantage is that the urls.py file can be quite simpler (less parameters on the application url line).

workflow urls

Some urls are workflow standard tasks, managed by the engine itself; like CRUD urls managed by admin, the workflow standard tasks are available with the following line in the urls.py file: