change
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
|
||||
//require_once 'classes/model/Process.php';
|
||||
//require_once 'classes/model/Task.php';
|
||||
use ProcessMaker\Plugins\PluginRegistry;
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'CASE_SCHEDULER' table.
|
||||
@@ -448,6 +449,8 @@ class CaseScheduler extends BaseCaseScheduler
|
||||
|
||||
$params = array("sessionId" => $sessionId, "processId" => $processId, "taskId" => $taskId, "variables" => array());
|
||||
|
||||
//Here we are loading all plugins registered
|
||||
$oPluginRegistry = PluginRegistry::loadSingleton();
|
||||
//If this Job was was registered to be performed by a plugin
|
||||
if (isset($row["CASE_SH_PLUGIN_UID"]) && $row["CASE_SH_PLUGIN_UID"] != "") {
|
||||
//Check if the plugin is active
|
||||
@@ -455,18 +458,7 @@ class CaseScheduler extends BaseCaseScheduler
|
||||
|
||||
if (count($pluginParts) == 2) {
|
||||
|
||||
//Here we are loading all plugins registered
|
||||
//The singleton has a list of enabled plugins
|
||||
$sSerializedFile = PATH_DATA_SITE . "plugin.singleton";
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
|
||||
if (file_exists($sSerializedFile)) {
|
||||
$oPluginRegistry->unSerializeInstance(file_get_contents($sSerializedFile));
|
||||
}
|
||||
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
$activePluginsForCaseScheduler = $oPluginRegistry->getCaseSchedulerPlugins();
|
||||
|
||||
foreach ($activePluginsForCaseScheduler as $key => $caseSchedulerPlugin) {
|
||||
if (isset($caseSchedulerPlugin->sNamespace) && $caseSchedulerPlugin->sNamespace == $pluginParts[0] && isset($caseSchedulerPlugin->sActionId) && $caseSchedulerPlugin->sActionId == $pluginParts[1]) {
|
||||
$caseSchedulerSelected = $caseSchedulerPlugin;
|
||||
@@ -498,8 +490,6 @@ class CaseScheduler extends BaseCaseScheduler
|
||||
$paramsAux = $params;
|
||||
$paramsAux["executeTriggers"] = 1;
|
||||
|
||||
$oPluginRegistry = &PMPluginRegistry::getSingleton();
|
||||
|
||||
if ($oPluginRegistry->existsTrigger(PM_SCHEDULER_CREATE_CASE_BEFORE)) {
|
||||
$oPluginRegistry->executeTriggers(PM_SCHEDULER_CREATE_CASE_BEFORE, $paramsAux);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user