Differences

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

Link to this comparison view

Both sides previous revision Previous revision
en:start:task_management [2016/07/07 14:56]
admin [WfTask*.php]
en:start:task_management [2016/07/07 15:01] (current)
admin [WfTask*.php]
Line 56: Line 56:
 } }
 </​Code>​ </​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(&​$context)**
 +
 +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 [[http://​swarnat.github.io/​Workflow-Designer-Developer/​classes/​classes/​Workflow.VTEntity.html|Here]].
 +
 +**beforeGetTaskform($viewer)**
 +
 +This function will be called before the configuration popup is shown. You could prepare all dependencies and assign values to the $viewer parameter, which is the Smarty Object used for the popup.
 +
 +**beforeSave(&​$values)
 +**
 +This function will be called before the configuration values are saved. The **$values** variable is an array with the submitted fields in the **task** variable.
 +
 +==== WfTask*.js ====
 +<WRAP center tip 100%>
 +You found below /​modules/​Workflow2/​tasks/​.
 +</​WRAP>​
 +
 +Will be loaded in the configuration popup and could handle all functions for this window.
 +
 +==== WfTask*.tpl ====
 +<WRAP center tip 100%>
 +You found below /​layouts/​vlayout/​modules/​Settings/​Workflow2/​tasksforms/​ \\
 +The wildcard will be replaced by the task key for this file and not the classname.
 +</​WRAP>​
 +
 +The configuration template. \\
 +There exists an open <form Tag, which will store any value you write to the task[…] variable and give this value also back to the template.