User Tools


Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
en:devel:addworkflowfunction [2015/10/24 18:49]
127.0.0.1 external edit
en:devel:addworkflowfunction [2019/08/27 19:00]
joebordes
Line 1: Line 1:
 ====== How to add a workflow custom function ====== ====== How to add a workflow custom function ======
  
-There are two types of workflow tasks that can be added to the system: **custom workflow functions** and full blown **workflow tasks**. The difference is the configuration screen. A **custom function** is just a set of instructions and code that do not need any configuration options, it's task is clearly defined and it just needs to be launched on the given event. For example, a routine that relates products and services of an invoice with the account of the invoice is a custom function. This custom function does not need anything more than what it receives to get it'​s ​work done, but it could get a little complicated and we could require an option to indicate if we want to have only products and not services related or the reverse, or both. Now that we need to know which elements to relate the custom function needs a configuration screen and must be converted into a **workflow task with configuration screen**.+There are two types of workflow tasks that can be added to the system: **custom workflow functions** and full-blown **workflow tasks**. The difference is the configuration screen. A **custom function** is just a set of instructions and code that do not need any configuration options, it's task is clearly defined and it just needs to be launched on the given event. For example, a routine that relates ​the products and services of an invoice with the account of the invoice is a custom function. This custom function does not need anything more than what it receives to get its work done, but it could get a little complicated and we could require an option to indicate if we want to have only products and not services related or the reverse, or both. Now that we need to know which elements to relate the custom function needs a configuration screen and must be converted into a **workflow task with configuration screen**.
  
 Here we explain how to create the first type of workflows, [[en:​devel:​addworkflowtask|for the second type go here]]. Here we explain how to create the first type of workflows, [[en:​devel:​addworkflowtask|for the second type go here]].
  
-A **workflow method or custom function** needs a name to show in the configuration section, a class that will extend VTTask and do the work, a template to show the configuration options on screen ​and it will be associated to certain modules and not to others. Finally it may be active or not depending on a certain module ​being installed or not.+A **workflow method or custom function** needs a name to show in the configuration section, a class that will extend VTTask and does the work, and it will be associated to certain modules and not to others. Finallyit may be active or not depending on a certain module ​is installed or not.
  
   * **Add new task definition to the application.** This is done by inserting a record with the details in the //​com_vtiger_workflowtasks_entitymethod//​ table.   * **Add new task definition to the application.** This is done by inserting a record with the details in the //​com_vtiger_workflowtasks_entitymethod//​ table.