Workflow model in vTigercrm how to create custom workflow.
It have simple steps to follow to make custom workflow.
create one new file (registerworkflow.php) to register workflow in ur vTiger root .
add all these line in that file.
require_once 'include/utils/utils.php';
require 'modules/com_vtiger_workflow/';
$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.
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 > Workflow > Workflow List  > New Workflow
Vtiger Workflow Vtiger Workflow[/caption]
Step 4:
In Your
  Settings > Workflow > Edit Task 
You see like this
Vtiger Workflow