diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/TimerEvent.php b/workflow/engine/src/ProcessMaker/BusinessModel/TimerEvent.php index ed72c3c84..0e8b61aff 100644 --- a/workflow/engine/src/ProcessMaker/BusinessModel/TimerEvent.php +++ b/workflow/engine/src/ProcessMaker/BusinessModel/TimerEvent.php @@ -765,9 +765,19 @@ class TimerEvent if (isset($arrayData["TMREVN_CONFIGURATION_DATA"])) { $arrayData["TMREVN_CONFIGURATION_DATA"] = serialize($arrayData["TMREVN_CONFIGURATION_DATA"]); } + + $oldValues = $timerEvent->toArray(); $timerEvent->fromArray($arrayData, \BasePeer::TYPE_FIELDNAME); + $nowValues = $timerEvent->toArray(); + //If the timer event undergoes any editing, the value of the 'TMREVN_STATUS' + //field must be changed to 'ACTIVE', otherwise the 'ONE-DATE-TIME' + //option will prevent execution. + if (!($oldValues == $nowValues)) { + $timerEvent->setTmrevnStatus("ACTIVE"); + } + if ($bpmnEvent->getEvnType() == "START") { switch ($arrayFinalData["TMREVN_OPTION"]) { case "HOURLY": @@ -1471,11 +1481,11 @@ class TimerEvent $flagRecord = true; } } - + if (!$flagRecord) { $common->frontEndShow("TEXT", "Not exists any record to start a new case, on date \"$datetime (UTC +00:00)\""); - - $this->log("NO-RECORDS", "Not exists any record to start a new case"); + $action = "NO-RECORDS"; + $this->log($action, "Not exists any record to start a new case"); $aInfo = array( 'ip' => \G::getIpAddress() ,'action' => $action @@ -1493,7 +1503,8 @@ class TimerEvent $common->frontEndShow("END"); //Intermediate Catch Timer-Event (continue the case) /////////////////////////////////////////////////////// - $this->log("START-CONTINUE-CASES", "Date \"$datetime (UTC +00:00)\": Start continue the cases"); + $action = "START-CONTINUE-CASES"; + $this->log($action, "Date \"$datetime (UTC +00:00)\": Start continue the cases"); $aInfo = array( 'ip' => \G::getIpAddress() ,'action' => $action