WorkflowDocumentation
From Eventum
| Table of contents |
Workflow API
The workflow API is used to provide custom functionality to Eventum. The basic idea is when an event happens (new issue, new note, blocked email, etc.) Eventum calls the workflow class specified for that project.
Getting Started
Creating a Workflow Class
To write your own Workflow class:
- Create a file named "class.my_name.php" in /eventum/include/workflow/.
- In that file, create a class named "my_name_Workflow_Backend" that extends "Abstract_Workflow_Backend".
class my_name_Workflow_Backend extends Abstract_Workflow_Backend
{
/** Override methods here */
}
Now you can override methods in that class to handle specific events. To get started, you can copy the method signatures from:
/eventum/include/workflow/class.abstract_workflow_backend.php
An example workflow implementation is in:
/eventum/include/workflow/class.example.php
Assigning a Workflow Class to a Project
Once you have created your class, you must set your project to use it. Only one workflow class may be assigned to a project at a time.
- Login to Eventum as an Administrator
- Go to "Administration" and click on the desired project
- Select "My Name" from the dropdown list next to "Workflow Backend" [Note that the values are displayed in Title Case, based on the filename class.<name_of_workflow>.php, replacing underscores with spaces.]
- Click "Update Project"
Your project should now be using your workflow class.
Individual Methods
Please see /eventum/include/workflow/class.abstract_workflow_backend.php for the individual methods you can override.
Future Direction
As Eventum is developed more methods will be added to the workflow class. If you need a new workflow method, or you need more arguments passed to an existing method please email the Eventum development list.
Examples
Please see the examples page for example workflow methods.
