PMCORE-1404 Use Jobs in the 'script task' and 'service task' execution

This commit is contained in:
Roly Rudy Gutierrez Pinto
2020-05-19 12:15:46 -04:00
parent 5bd2d6f1ec
commit 5041c9be3d
19 changed files with 711 additions and 309 deletions

View File

@@ -2,9 +2,14 @@
use ProcessMaker\Plugins\PluginRegistry;
spl_autoload_register(function($sClassName) {
if (!empty(config("system.workspace"))) {
$sPath = PATH_DB . config("system.workspace") . PATH_SEP . 'classes' . PATH_SEP;
/**
* The helper 'config()' is loaded via 'spl_autoload_register()' in unit testing.
* The helper is pulled out to avoid an infinite loop.
*/
$workspace = config("system.workspace", null);
spl_autoload_register(function($sClassName) use($workspace) {
if (!empty($workspace)) {
$sPath = PATH_DB . $workspace . PATH_SEP . 'classes' . PATH_SEP;
if (file_exists($sPath . $sClassName . '.php')) {
require_once $sPath . $sClassName . '.php';
}