Workflow model in vTigercrm how to create a custom workflow.
 
It has simple steps to follow to make a custom workflow.
 
Step1:
 
create one new file (registerworkflow.php) to register workflow in you're vTiger root.
add all these lines in that file.
 
require_once 'include/utils/utils.php';
require 'modules/com_vtiger_workflow/VTEntityMethodManager.inc';
$emm = new VTEntityMethodManager($adb);
//$emm->addEntityMethod("Module Name","Label", "Path to file" , "Method Name" );
$emm->addEntityMethod("Invoice", "Update Inventory", "include/InventoryHandler.php", "handleInventoryProductRel");
run that file like.
 
http://YOUR-VTIGER/registerworkflow.php
 
Strictly follow you must run this file at once. If u run that file more than one time u create more entry.
 
Step 2:
 
Go to  
 
{YOUR_VTIGER_ROOT FOLDER}/include/InventoryHandler.php
 
And Add these lines
function handleInventoryProductRel($entity){
 
//Enter Your code Here
}
 
Step 3:
 
 
Go to
  Settings > CRM Settings > Workflow > Workflow List  > New Workflow
Vtiger Workflow
Vtiger Workflow[/caption]
 
Step 4:
 
In Your
  Settings > CRM Settings > Workflow > Edit Task 
You see like this
Vtiger Workflow