]> CyberLeo.Net >> Repos - Github/sugarcrm.git/blob - tests/include/workflow/testfiles/workflow/workflow.php
Added unit tests.
[Github/sugarcrm.git] / tests / include / workflow / testfiles / workflow / workflow.php
1 <?php
2
3 include_once("include/workflow/alert_utils.php");
4 include_once("include/workflow/action_utils.php");
5 include_once("include/workflow/time_utils.php");
6 include_once("include/workflow/trigger_utils.php");
7 //BEGIN WFLOW PLUGINS
8 include_once("include/workflow/custom_utils.php");
9 //END WFLOW PLUGINS
10         class Accounts_workflow {
11         function process_wflow_triggers(& $focus){
12                 include("custom/modules/Accounts/workflow/triggers_array.php");
13                 include("custom/modules/Accounts/workflow/alerts_array.php");
14                 include("custom/modules/Accounts/workflow/actions_array.php");
15                 include("custom/modules/Accounts/workflow/plugins_array.php");
16                 
17  if(true){ 
18  
19
20          //Frame Secondary 
21
22          $secondary_array = array(); 
23          //Secondary Triggers 
24
25         global $triggeredWorkflows;
26         if (!isset($triggeredWorkflows['e9fb6b5f_ae96_2c2c_c8cb_4c7354d98b09'])){
27                 $triggeredWorkflows['e9fb6b5f_ae96_2c2c_c8cb_4c7354d98b09'] = true;
28                  unset($alertshell_array); 
29                  process_workflow_actions($focus, $action_meta_array['Accounts0_action0']); 
30         }
31  
32
33          //End Frame Secondary 
34
35          unset($secondary_array); 
36  
37
38  //End if trigger is true 
39  } 
40
41
42  if( ( !($focus->fetched_row['name'] ==  'Sugar' )) && 
43  (isset($focus->name) && $focus->name ==  'Sugar')){ 
44  
45
46          //Frame Secondary 
47
48          $secondary_array = array(); 
49          //Secondary Triggers 
50
51         global $triggeredWorkflows;
52         if (!isset($triggeredWorkflows['eaa0bd50_7aff_3ed6_f43c_4c7354ab1221'])){
53                 $triggeredWorkflows['eaa0bd50_7aff_3ed6_f43c_4c7354ab1221'] = true;
54                  unset($alertshell_array); 
55                  process_workflow_actions($focus, $action_meta_array['Accounts1_action0']); 
56         }
57  
58
59          //End Frame Secondary 
60
61          unset($secondary_array); 
62  
63
64  //End if trigger is true 
65  } 
66
67
68         //end function process_wflow_triggers
69         }
70         
71         //end class
72         }
73
74 ?>