Ejemplo n.º 1
0
 /**
  * Throw all events to End Process
  *
  * @param string $currentTask     Task uid
  *
  * @return void
  */
 private function throwElementToEnd($currentTask, $routeCondition)
 {
     try {
         $bpmnFlow = new BpmnFlow();
         $rsCriFlow = $bpmnFlow->getElementOriginToElementDest($currentTask);
         $arrayElement = array();
         $count = 0;
         $continue = false;
         if ($rsCriFlow->next()) {
             $continue = true;
             $row = $rsCriFlow->getRow();
         }
         while ($continue) {
             $array[0] = $row["FLO_ELEMENT_DEST"];
             $array[1] = $row["FLO_ELEMENT_DEST_TYPE"];
             $arrayElement[$count++] = $array;
             $continue = false;
             if ($rsCriFlow->next()) {
                 $continue = true;
                 $row = $rsCriFlow->getRow();
             } else {
                 $rsCriFlow = $bpmnFlow->getElementOriginToElementDest($row["FLO_ELEMENT_DEST"], $routeCondition, "bpmnEvent");
                 $routeCondition = '';
                 $continue = false;
                 if ($rsCriFlow->next()) {
                     $continue = true;
                     $row = $rsCriFlow->getRow();
                 }
             }
         }
         return $arrayElement;
     } catch (Exception $e) {
         throw $e;
     }
 }