This is an old revision of the document!


Task Management

The Workflow Designer for VtigerCRM 6.x introduce a new process to integrate tasks you could use in your workflows.

Guided by the Linux Repositories I implement a Repository system to install/update new tasks.
So you will see any special tasks I provide and could install them manually with one click.

During Setup of the module

all available standard tasks will be installed. Some special task are marked not to install automatically, because they are mostly interact with external services, which not everybody needs.

During every Update of the module

all available task updates from my repositories are installed.
New tasks and tasks from external repositories won't installed/updated during module update.

Task Development

With this new task handling it will be much easier for you to develop your own custom tasks. You only need an ZIP-File with the following files:

  • icon.png
  • task.js
    • This JavaScript File will be loaded in the configuration popup of the task
    • There is no special structure you must pay attention
  • task.tpl
    • The template of the configuration popup
    • There is no special structure you must pay attention
  • task.php
    • The core task file with all php code
  • task.xml
    • The task specifications, which will be used to import all task specific options

Task.php

This file must have a special structure.

<?php
require_once(realpath(dirname(__FILE__).'/../autoload_wf.php'));
 
class dummyTypeClass extends \Workflow\Task
{
    public function handleTask(&$context) {
        /* Insert here source code to execute the task */
 
        return "yes";
    }
 
    public function beforeGetTaskform($viewer) {
        /* Insert here source code to create custom configurations pages */
    }
    public function beforeSave(&$values) {
        /* Insert here source code to modify the values the user submit on configuration */
    }
}