PMCORE-2193

This commit is contained in:
Andrea Adamczyk
2020-09-28 11:43:16 -04:00
committed by Julio Cesar Laura Avendaño
parent 5f12753187
commit c434e13467
3 changed files with 50 additions and 3 deletions

View File

@@ -336,9 +336,8 @@ try {
$task->messageeventcron();
break;
case 'timereventcron':
$timerEvent = new \ProcessMaker\BusinessModel\TimerEvent();
$timerEvent->startContinueCaseByTimerEvent($now, true);
$task = new Task($asynchronous, $sObject);
$task->timerEventCron($now, true);
break;
case 'sendnotificationscron':
if (empty($argvx) || strpos($argvx, "send-notifications") !== false) {

View File

@@ -22,6 +22,7 @@ use ProcessMaker\BusinessModel\Cases as BmCases;
use ProcessMaker\BusinessModel\Light\PushMessageAndroid;
use ProcessMaker\BusinessModel\Light\PushMessageIOS;
use ProcessMaker\BusinessModel\MessageApplication;
use ProcessMaker\BusinessModel\TimerEvent;
use ProcessMaker\Core\JobsManager;
use ProcessMaker\Plugins\PluginRegistry;
use Propel;
@@ -598,4 +599,19 @@ class Task
};
$this->runTask($job);
}
/**
* Start/Continue cases by Timer-Event
*
* @param string $datetime
* @param bool $frontEnd
*/
public function timerEventCron($datetime, $frontEnd)
{
$job = function() use ($datetime, $frontEnd) {
$timerEvent = new TimerEvent();
$timerEvent->startContinueCaseByTimerEvent($datetime, $frontEnd);
};
$this->runTask($job);
}
}