/**
  * Select and run all active flows
  */
 function run_flows()
 {
     $flows = AOW_WorkFlow::get_full_list('', " aow_workflow.status = 'Active' ");
     foreach ($flows as $flow) {
         $flow->run_flow();
     }
     return true;
 }
    /**
     * Select and run all active flows
     */
	function run_flows(){
		$flows = AOW_WorkFlow::get_full_list(''," aow_workflow.status = 'Active'  AND (aow_workflow.run_when = 'Always' OR aow_workflow.run_when = 'In_Scheduler' OR aow_workflow.run_when = 'Create') ");

        foreach($flows as $flow){
            $flow->run_flow();
        }
        return true;
	}