Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:extensions:workflowdesigner:taskmanagement [2014/07/03 10:41]
swarnat [Task.php]
en:extensions:workflowdesigner:taskmanagement [2017/11/16 11:40] (current)
swarnat
Line 14: Line 14:
 New tasks and tasks from external repositories won't installed/​updated during module update. New tasks and tasks from external repositories won't installed/​updated during module update.
  
-===== Task Development ===== +You will find the developer documentation here
- +[[https://​support.redoo-networks.com/knowledgebase/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** +
-    * This will be the image of the task in the designer\\ ([[https://​support.stefanwarnat.de/_media/en:​extensions:​workflowdesigner:​icon.png|Download default empty task image]]+
-  * **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. +
- +
-<code php> +
-<?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 */ +
-    }  +
-+
- +
-</​code>​ +
- +
-The require_once will make sure all Workflow related functions are available. +
-This line is important, because later I will make sure you could call every type externally. +
- +
-==handleTask== +
-This function will be executed every time the task will be executed and must include all php code you want to run in this situation. (But you could also include external files like in every other php script) +
-This function **MUST** have a return value, which is equal to one of the output points you configure in task.xml. +
-The parameter is from the Type **\Workflow\VTEntity**,​ which will be explained on a single page. +
- +
-== beforeGetTaskform ==+