Merged in release/3.2 (pull request #5621)
Updating branch release/3.2.1 (Fourth merge) Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
37
build.php
37
build.php
@@ -1,37 +0,0 @@
|
||||
<?php
|
||||
/**
|
||||
* Process Maker Php Build tool v. 0.3.1
|
||||
* Rev. 05-27-2016
|
||||
*
|
||||
* Use this as an external tool for Phpstorm
|
||||
* Configure as it follows:
|
||||
*
|
||||
* Name: PM php Builder
|
||||
* Group: Process Maker
|
||||
* Description: Process Maker Php Builder.
|
||||
* Tools Settings
|
||||
* Program: $PhpExecutable$
|
||||
* Parameters:
|
||||
* build.php --base_dir=$ProjectFileDir$ --mode=prod --extension
|
||||
* --extensionDir=$ProjectFileDir$/workflow/engine/plugins
|
||||
* Working Directory: $ProjectFileDir$
|
||||
* Please, notice you can change --extensionDir to your own extension folder.
|
||||
*
|
||||
* Also, use the respective directory owner permisions:
|
||||
* ~/processmaker$ sudo chown -R www-data:www-data workflow/public_html/
|
||||
* ~/processmaker$ sudo chown -R www-data:www-data vendor/colosa/MichelangeloFE/build
|
||||
*
|
||||
* Use a shortcut:
|
||||
*
|
||||
* Go to Settings -> Appearance & Behavior -> Keymap, search for ProcessMaker, open the context
|
||||
* menu of the option and select Add Keyboard Shortcut, use whatever shortcut you want, for example Alt+b
|
||||
*
|
||||
* If you need help: php build.php --help
|
||||
*
|
||||
*/
|
||||
include_once('class.Build.php');
|
||||
use Build\Utils\ProcessMakerPhpBuilderHelper;
|
||||
|
||||
$phpBuilder = new ProcessMakerPhpBuilderHelper();
|
||||
$phpBuilder->utils->echoContent("Config finished, start deploying...");
|
||||
$phpBuilder->buildAll();
|
||||
1490
class.Build.php
1490
class.Build.php
File diff suppressed because it is too large
Load Diff
68
composer.lock
generated
68
composer.lock
generated
@@ -55,7 +55,7 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "git@bitbucket.org:colosa/michelangelofe.git",
|
||||
"reference": "e0c591a07201ebfa2582a819680a1a25a1fdf719"
|
||||
"reference": "cc19932a095b2232bef7998d2c90b2408ad9be19"
|
||||
},
|
||||
"require": {
|
||||
"colosa/pmui": "release/3.2-dev"
|
||||
@@ -66,7 +66,7 @@
|
||||
"keywords": [
|
||||
"js app ProcessMaker"
|
||||
],
|
||||
"time": "2017-03-11 01:50:42"
|
||||
"time": "2017-04-11 15:29:24"
|
||||
},
|
||||
{
|
||||
"name": "colosa/pmDynaform",
|
||||
@@ -74,7 +74,7 @@
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "git@bitbucket.org:colosa/pmdynaform.git",
|
||||
"reference": "e0c2d7b6b50331dacb30f31118c8546edca32007"
|
||||
"reference": "17ac424d4f51c42c7812fdc117948eef45bddce8"
|
||||
},
|
||||
"type": "library",
|
||||
"description": "JS Library to render ProcessMaker Dynaforms",
|
||||
@@ -82,7 +82,7 @@
|
||||
"keywords": [
|
||||
"js lib ProcessMaker Dynaforms"
|
||||
],
|
||||
"time": "2017-03-11 02:03:24"
|
||||
"time": "2017-04-11 15:29:14"
|
||||
},
|
||||
{
|
||||
"name": "colosa/pmUI",
|
||||
@@ -610,16 +610,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/config",
|
||||
"version": "v2.8.18",
|
||||
"version": "v2.8.19",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/config.git",
|
||||
"reference": "06ce6bb46c24963ec09323da45d0f4f85d3cecd2"
|
||||
"reference": "35b7dfa089d7605eb1fdd46281b3070fb9f38750"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/config/zipball/06ce6bb46c24963ec09323da45d0f4f85d3cecd2",
|
||||
"reference": "06ce6bb46c24963ec09323da45d0f4f85d3cecd2",
|
||||
"url": "https://api.github.com/repos/symfony/config/zipball/35b7dfa089d7605eb1fdd46281b3070fb9f38750",
|
||||
"reference": "35b7dfa089d7605eb1fdd46281b3070fb9f38750",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -662,20 +662,20 @@
|
||||
],
|
||||
"description": "Symfony Config Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-03-01T18:13:50+00:00"
|
||||
"time": "2017-04-04T15:24:26+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/console",
|
||||
"version": "v2.8.18",
|
||||
"version": "v2.8.19",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/console.git",
|
||||
"reference": "81508e6fac4476771275a3f4f53c3fee9b956bfa"
|
||||
"reference": "86407ff20855a5eaa2a7219bd815e9c40a88633e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/81508e6fac4476771275a3f4f53c3fee9b956bfa",
|
||||
"reference": "81508e6fac4476771275a3f4f53c3fee9b956bfa",
|
||||
"url": "https://api.github.com/repos/symfony/console/zipball/86407ff20855a5eaa2a7219bd815e9c40a88633e",
|
||||
"reference": "86407ff20855a5eaa2a7219bd815e9c40a88633e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -723,7 +723,7 @@
|
||||
],
|
||||
"description": "Symfony Console Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-03-04T11:00:12+00:00"
|
||||
"time": "2017-04-03T20:37:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/debug",
|
||||
@@ -784,16 +784,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/dependency-injection",
|
||||
"version": "v2.8.18",
|
||||
"version": "v2.8.19",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/dependency-injection.git",
|
||||
"reference": "efdbeefa454a41154fd99a6f0489f0e9cb46c497"
|
||||
"reference": "14b9d8ae69ac4c74e8f05fee7e0a57039b99c81e"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/efdbeefa454a41154fd99a6f0489f0e9cb46c497",
|
||||
"reference": "efdbeefa454a41154fd99a6f0489f0e9cb46c497",
|
||||
"url": "https://api.github.com/repos/symfony/dependency-injection/zipball/14b9d8ae69ac4c74e8f05fee7e0a57039b99c81e",
|
||||
"reference": "14b9d8ae69ac4c74e8f05fee7e0a57039b99c81e",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -843,20 +843,20 @@
|
||||
],
|
||||
"description": "Symfony DependencyInjection Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-02-28T12:31:05+00:00"
|
||||
"time": "2017-04-03T22:14:48+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/event-dispatcher",
|
||||
"version": "v2.8.18",
|
||||
"version": "v2.8.19",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/event-dispatcher.git",
|
||||
"reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0"
|
||||
"reference": "88b65f0ac25355090e524aba4ceb066025df8bd2"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/bb4ec47e8e109c1c1172145732d0aa468d967cd0",
|
||||
"reference": "bb4ec47e8e109c1c1172145732d0aa468d967cd0",
|
||||
"url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/88b65f0ac25355090e524aba4ceb066025df8bd2",
|
||||
"reference": "88b65f0ac25355090e524aba4ceb066025df8bd2",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -903,7 +903,7 @@
|
||||
],
|
||||
"description": "Symfony EventDispatcher Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-02-21T08:33:48+00:00"
|
||||
"time": "2017-04-03T20:37:06+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/filesystem",
|
||||
@@ -1065,16 +1065,16 @@
|
||||
},
|
||||
{
|
||||
"name": "symfony/translation",
|
||||
"version": "v2.8.18",
|
||||
"version": "v2.8.19",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/translation.git",
|
||||
"reference": "b538355bc99db2ec7cc35284ec76d92ae7d1d256"
|
||||
"reference": "047e97a64d609778cadfc76e3a09793696bb19f1"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/b538355bc99db2ec7cc35284ec76d92ae7d1d256",
|
||||
"reference": "b538355bc99db2ec7cc35284ec76d92ae7d1d256",
|
||||
"url": "https://api.github.com/repos/symfony/translation/zipball/047e97a64d609778cadfc76e3a09793696bb19f1",
|
||||
"reference": "047e97a64d609778cadfc76e3a09793696bb19f1",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1125,20 +1125,20 @@
|
||||
],
|
||||
"description": "Symfony Translation Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-03-04T12:20:59+00:00"
|
||||
"time": "2017-03-21T21:39:01+00:00"
|
||||
},
|
||||
{
|
||||
"name": "symfony/yaml",
|
||||
"version": "v2.8.18",
|
||||
"version": "v2.8.19",
|
||||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/symfony/yaml.git",
|
||||
"reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d"
|
||||
"reference": "286d84891690b0e2515874717e49360d1c98a703"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d",
|
||||
"reference": "2a7bab3c16f6f452c47818fdd08f3b1e49ffcf7d",
|
||||
"url": "https://api.github.com/repos/symfony/yaml/zipball/286d84891690b0e2515874717e49360d1c98a703",
|
||||
"reference": "286d84891690b0e2515874717e49360d1c98a703",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
@@ -1174,7 +1174,7 @@
|
||||
],
|
||||
"description": "Symfony Yaml Component",
|
||||
"homepage": "https://symfony.com",
|
||||
"time": "2017-03-01T18:13:50+00:00"
|
||||
"time": "2017-03-20T09:41:44+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
|
||||
@@ -563,6 +563,7 @@ var G_Grid = function(oForm, sGridName){
|
||||
case 'textarea': //TEXTAREA
|
||||
aObjects = oNewRow.getElementsByTagName('td')[i].getElementsByTagName('textarea');
|
||||
if (aObjects){
|
||||
aObjects[0].value = '';
|
||||
aObjects[0].className = "module_app_input___gray";
|
||||
|
||||
newID = aObjects[0].id.replace(/\[1\]/g, '\[' + currentRow + '\]');
|
||||
|
||||
@@ -1345,7 +1345,7 @@ break;case'hidden':if((attributes.gridtype!="yesno"&&attributes.gridtype!="dropd
|
||||
newID=aObjects[n].id.replace(/\[1\]/g,'\['+currentRow+'\]');aObjects[n].id=newID;aObjects[n].name=newID;}
|
||||
break;case'button':if(aObjects[n].onclick){var onclickevn=new String(aObjects[n].onclick);eval('aObjects[n].onclick = '+onclickevn.replace(/\[1\]/g,'\['+currentRow+'\]')+';');}
|
||||
break;case"file":aObjects[n].value="";break;}}}
|
||||
aObjects=null;break;case'textarea':aObjects=oNewRow.getElementsByTagName('td')[i].getElementsByTagName('textarea');if(aObjects){aObjects[0].className="module_app_input___gray";newID=aObjects[0].id.replace(/\[1\]/g,'\['+currentRow+'\]');aObjects[0].id=newID;aObjects[0].name=newID;attributes=elementAttributesNS(aObjects[0],'pm');if(attributes.defaultvalue!=''&&typeof attributes.defaultvalue!='undefined'){defaultValue=attributes.defaultvalue;}else{defaultValue='';}
|
||||
aObjects=null;break;case'textarea':aObjects=oNewRow.getElementsByTagName('td')[i].getElementsByTagName('textarea');if(aObjects){aObjects[0].value='';aObjects[0].className="module_app_input___gray";newID=aObjects[0].id.replace(/\[1\]/g,'\['+currentRow+'\]');aObjects[0].id=newID;aObjects[0].name=newID;attributes=elementAttributesNS(aObjects[0],'pm');if(attributes.defaultvalue!=''&&typeof attributes.defaultvalue!='undefined'){defaultValue=attributes.defaultvalue;}else{defaultValue='';}
|
||||
aObjects[0].innerHTML=defaultValue;}
|
||||
aObjects=null;break;case'select':aObjects=oNewRow.getElementsByTagName('td')[i].getElementsByTagName('select');if(aObjects){newID=aObjects[0].id.replace(/\[1\]/g,'\['+currentRow+'\]');aObjects[0].id=newID;aObjects[0].name=newID;var oNewSelect=this.cloneElement(aObjects[0]);oNewSelect.id=newID;oNewSelect.name=newID;attributes=elementAttributesNS(aObjects[0],'pm');if(attributes.defaultvalue!=''&&typeof attributes.defaultvalue!='undefined'){defaultValue=attributes.defaultvalue;}else{defaultValue='';}
|
||||
var aDependents=this.allDependentFields.split(',');sObject=this.getObjectName(newID);var sw=false;for(x=0;x<aDependents.length;x++){if(aDependents[x]==sObject)sw=true;}
|
||||
|
||||
@@ -91,6 +91,8 @@ try {
|
||||
require_once('propel/Propel.php');
|
||||
require_once('creole/Creole.php');
|
||||
|
||||
//TODO: get rid of the global variable improving the timezone activation when this feature is enabled
|
||||
global $arraySystemConfiguration;
|
||||
$arraySystemConfiguration = System::getSystemConfiguration('', '', $workspace);
|
||||
|
||||
$e_all = (defined('E_DEPRECATED'))? E_ALL & ~E_DEPRECATED : E_ALL;
|
||||
@@ -630,7 +632,6 @@ function executeScheduledCases($sNow=null)
|
||||
try {
|
||||
global $argvx;
|
||||
global $sNow;
|
||||
|
||||
$log = array();
|
||||
|
||||
if ($argvx != "" && strpos($argvx, "scheduler") === false) {
|
||||
@@ -640,10 +641,10 @@ function executeScheduledCases($sNow=null)
|
||||
setExecutionMessage("Executing the scheduled starting cases");
|
||||
setExecutionResultMessage('PROCESSING');
|
||||
|
||||
$sNow = isset($sNow)? $sNow : date('Y-m-d H:i:s');
|
||||
$runDate = runDateForScheduledCases($sNow);
|
||||
|
||||
$oCaseScheduler = new CaseScheduler();
|
||||
$oCaseScheduler->caseSchedulerCron($sNow, $log, 1);
|
||||
$oCaseScheduler->caseSchedulerCron($runDate, $log, 1);
|
||||
|
||||
foreach ($log as $value) {
|
||||
$arrayCron = unserialize(trim(@file_get_contents(PATH_DATA . "cron")));
|
||||
@@ -660,6 +661,35 @@ function executeScheduledCases($sNow=null)
|
||||
}
|
||||
}
|
||||
|
||||
function runDateForScheduledCases($sNow) {
|
||||
global $arraySystemConfiguration;
|
||||
|
||||
$runDate = isset($sNow)? $sNow : date('Y-m-d H:i:s');
|
||||
|
||||
$systemUtcTimeZone = false;
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (PMLicensedFeatures::getSingleton()->verifyfeature('oq3S29xemxEZXJpZEIzN01qenJUaStSekY4cTdJVm5vbWtVM0d4S2lJSS9qUT0=')) {
|
||||
$systemUtcTimeZone = (int)($arraySystemConfiguration['system_utc_time_zone']) == 1;
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
if ($systemUtcTimeZone) {
|
||||
if (isset($sNow)) {
|
||||
//as the $sNow param that comes from the command line doesn't specicy a time zone
|
||||
//we assume that the user set this time using the server time zone so we use the gmdate
|
||||
//function to convert it
|
||||
$currentTimeZone = date_default_timezone_get();
|
||||
date_default_timezone_set($arraySystemConfiguration['time_zone']);
|
||||
$runDate = gmdate('Y-m-d H:i:s', strtotime($sNow));
|
||||
date_default_timezone_set($currentTimeZone);
|
||||
}
|
||||
else {
|
||||
$runDate = gmdate('Y-m-d H:i:s');
|
||||
}
|
||||
}
|
||||
return $runDate;
|
||||
}
|
||||
|
||||
function executeUpdateAppTitle()
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -80,7 +80,7 @@ class actionsByEmailCoreClass extends PMPlugin
|
||||
|
||||
$emailServer = new \ProcessMaker\BusinessModel\EmailServer();
|
||||
|
||||
$emailSetup = ($dataAbe['ABE_EMAIL_SERVER_UID'] != '') ?
|
||||
$emailSetup = (!is_null(\EmailServerPeer::retrieveByPK($dataAbe['ABE_EMAIL_SERVER_UID']))) ?
|
||||
$emailServer->getEmailServer($dataAbe['ABE_EMAIL_SERVER_UID'], true) :
|
||||
$emailServer->getEmailServerDefault();
|
||||
|
||||
@@ -158,7 +158,13 @@ class actionsByEmailCoreClass extends PMPlugin
|
||||
$envSkin = defined("SYS_SKIN") ? SYS_SKIN : $conf->getConfiguration('SKIN_CRON', '');
|
||||
$envHost = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : SERVER_NAME;
|
||||
$envProtocol = defined("REQUEST_SCHEME") && REQUEST_SCHEME === "https";
|
||||
if (isset($_SERVER['SERVER_PORT'])) {
|
||||
$envPort = ($_SERVER['SERVER_PORT'] != "80") ? ":" . $_SERVER['SERVER_PORT'] : "";
|
||||
} else if (defined('SERVER_PORT')) {
|
||||
$envPort = (SERVER_PORT . "" != "80") ? ":" . SERVER_PORT : "";
|
||||
} else {
|
||||
$envPort = ""; // Empty by default
|
||||
}
|
||||
if (!empty($envPort) && strpos($envHost, $envPort) === false) {
|
||||
$envHost = $envHost . $envPort;
|
||||
}
|
||||
|
||||
@@ -1249,15 +1249,7 @@ class Derivation
|
||||
break;
|
||||
}
|
||||
|
||||
$rouPreType = "";
|
||||
$rouPreTask = "";
|
||||
$taskNextDelNextDelRouType = $arrayTaskNextDelNextDel["ROU_TYPE"];
|
||||
|
||||
if(isset($arrayTaskNextDelNextDel["NEXT_TASK"]["ROU_PREVIOUS_TYPE"]) && isset($arrayTaskNextDelNextDel["NEXT_TASK"]["ROU_PREVIOUS_TASK"])){
|
||||
$rouPreType = $arrayTaskNextDelNextDel["NEXT_TASK"]["ROU_PREVIOUS_TYPE"];
|
||||
$rouPreTask = $arrayTaskNextDelNextDel["NEXT_TASK"]["ROU_PREVIOUS_TASK"];
|
||||
}
|
||||
|
||||
$nextDelegationsAux[++$i] = array(
|
||||
"TAS_UID" => $arrayTaskNextDelNextDel["NEXT_TASK"]["TAS_UID"],
|
||||
"USR_UID" => $arrayTaskNextDelNextDel["NEXT_TASK"]["USER_ASSIGNED"]["USR_UID"],
|
||||
@@ -1265,8 +1257,8 @@ class Derivation
|
||||
"TAS_DEF_PROC_CODE" => $arrayTaskNextDelNextDel["NEXT_TASK"]["TAS_DEF_PROC_CODE"],
|
||||
"DEL_PRIORITY" => "",
|
||||
"TAS_PARENT" => $arrayTaskNextDelNextDel["NEXT_TASK"]["TAS_PARENT"],
|
||||
"ROU_PREVIOUS_TYPE" => $rouPreType,
|
||||
"ROU_PREVIOUS_TASK" => $rouPreTask
|
||||
"ROU_PREVIOUS_TYPE" => isset($arrayTaskNextDelNextDel["NEXT_TASK"]["ROU_PREVIOUS_TYPE"]) ? $arrayTaskNextDelNextDel["NEXT_TASK"]["ROU_PREVIOUS_TYPE"] : '',
|
||||
"ROU_PREVIOUS_TASK" => isset($arrayTaskNextDelNextDel["NEXT_TASK"]["ROU_PREVIOUS_TASK"]) ? $arrayTaskNextDelNextDel["NEXT_TASK"]["ROU_PREVIOUS_TASK"] : ''
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1614,8 +1606,8 @@ class Derivation
|
||||
'TAS_DEF_PROC_CODE' => $aDeriveTask['NEXT_TASK']['TAS_DEF_PROC_CODE'],
|
||||
'DEL_PRIORITY' => 3,
|
||||
'TAS_PARENT' => $aDeriveTask['NEXT_TASK']['TAS_PARENT'],
|
||||
'ROU_PREVIOUS_TYPE' => $aDeriveTask['NEXT_TASK']['ROU_PREVIOUS_TYPE'],
|
||||
'ROU_PREVIOUS_TASK' => $aDeriveTask['NEXT_TASK']['ROU_PREVIOUS_TASK']
|
||||
'ROU_PREVIOUS_TYPE' => isset($aDeriveTask['NEXT_TASK']['ROU_PREVIOUS_TYPE']) ? $aDeriveTask['NEXT_TASK']['ROU_PREVIOUS_TYPE'] : '',
|
||||
'ROU_PREVIOUS_TASK' => isset($aDeriveTask['NEXT_TASK']['ROU_PREVIOUS_TASK']) ? $aDeriveTask['NEXT_TASK']['ROU_PREVIOUS_TASK'] : ''
|
||||
);
|
||||
}
|
||||
$currentDelegation2 = array(
|
||||
|
||||
@@ -1901,22 +1901,6 @@ class PMPluginRegistry
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Use this for extensions
|
||||
*
|
||||
* @return array with namespace and plugin folder
|
||||
*/
|
||||
public function getEnabledPlugins()
|
||||
{
|
||||
$enabledPlugins = array();
|
||||
foreach ($this->_aPluginDetails as $row) {
|
||||
if ($row->enabled) {
|
||||
$enabledPlugins[$row->sNamespace] = $row->sPluginFolder;
|
||||
}
|
||||
}
|
||||
return $enabledPlugins;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registry in an array routes for js or css files.
|
||||
* @param type $pluginName
|
||||
|
||||
@@ -823,6 +823,9 @@ class pmDynaform
|
||||
|
||||
public function getDatabaseProvider($dbConnection)
|
||||
{
|
||||
if ($dbConnection === "workflow" || $dbConnection === "rbac" || $dbConnection === "rp") {
|
||||
return "mysql";
|
||||
}
|
||||
if ($this->databaseProviders === null) {
|
||||
$a = new Criteria("workflow");
|
||||
$a->addSelectColumn(DbSourcePeer::DBS_UID);
|
||||
|
||||
@@ -2598,7 +2598,7 @@ function PMFGetNextAssignedUser ($application, $task, $delIndex = null, $userUid
|
||||
* @label PMF Get User Email Address
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFGetUserEmailAddress.28.29
|
||||
*
|
||||
* @param string(32) or Array | $id | Case ID | Id of the case.
|
||||
* @param string(32) or Array | $id | List of Recipients | which can be a mixture of user IDs, group IDs, variable names or email addresses
|
||||
* @param string(32) | $APP_UID = null | Application ID | Id of the Application.
|
||||
* @param string(32) | $prefix = "usr" | prefix | Id of the task.
|
||||
* @return array | $aRecipient | Array of the Recipient | Return an Array of the Recipient.
|
||||
|
||||
@@ -2156,10 +2156,74 @@ class wsBase
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Execute the trigger defined in the steps
|
||||
* This function is used when the case is derived from abe, Soap, PMFDerivateCase
|
||||
*
|
||||
* @param array $appData contain all the information about the case
|
||||
* @param string $tasUid
|
||||
* @param string $stepType
|
||||
* @param string $stepUidObj
|
||||
* @param string $triggerType
|
||||
* @param string $labelAssigment
|
||||
* @return string $varTriggers
|
||||
*/
|
||||
function executeTriggerFromDerivate($appData, $tasUid, $stepType, $stepUidObj, $triggerType, $labelAssigment = '')
|
||||
{
|
||||
$varTriggers = "";
|
||||
$oCase = new Cases();
|
||||
|
||||
//Execute triggers before assignment
|
||||
$aTriggers = $oCase->loadTriggers($tasUid, $stepType, $stepUidObj, $triggerType);
|
||||
|
||||
if (count( $aTriggers ) > 0) {
|
||||
$varTriggers = $varTriggers . "<br /><b>".$labelAssigment."</b><br />";
|
||||
|
||||
$oPMScript = new PMScript();
|
||||
|
||||
foreach ($aTriggers as $aTrigger) {
|
||||
//Set variables
|
||||
$params = new stdClass();
|
||||
$params->appData = $appData;
|
||||
|
||||
if ($this->stored_system_variables) {
|
||||
$params->option = "STORED SESSION";
|
||||
$params->SID = $this->wsSessionId;
|
||||
}
|
||||
|
||||
$appFields["APP_DATA"] = array_merge($appData, G::getSystemConstants($params));
|
||||
|
||||
//PMScript
|
||||
$oPMScript->setFields( $appFields['APP_DATA'] );
|
||||
$bExecute = true;
|
||||
|
||||
if ($aTrigger['ST_CONDITION'] !== '') {
|
||||
$oPMScript->setScript( $aTrigger['ST_CONDITION'] );
|
||||
$bExecute = $oPMScript->evaluate();
|
||||
}
|
||||
|
||||
if ($bExecute) {
|
||||
$oPMScript->setScript( $aTrigger['TRI_WEBBOT'] );
|
||||
$oPMScript->execute();
|
||||
|
||||
$trigger = TriggersPeer::retrieveByPk($aTrigger["TRI_UID"]);
|
||||
$varTriggers = $varTriggers . " - " . nl2br(htmlentities($trigger->getTriTitle(), ENT_QUOTES)) . "<br />";
|
||||
|
||||
$appFields['APP_DATA'] = $oPMScript->aFields;
|
||||
unset($appFields['APP_STATUS']);
|
||||
unset($appFields['APP_PROC_STATUS']);
|
||||
unset($appFields['APP_PROC_CODE']);
|
||||
unset($appFields['APP_PIN']);
|
||||
$oCase->updateCase($caseId, $appFields);
|
||||
}
|
||||
}
|
||||
}
|
||||
return $varTriggers;
|
||||
}
|
||||
|
||||
/**
|
||||
* derivate Case moves the case to the next task in the process according to the routing rules
|
||||
*
|
||||
* Derivate Case moves the case to the next task in the process according to the routing rules
|
||||
* This function is used from: action by email, web entry, PMFDerivateCase, Mobile
|
||||
* @param string $userId
|
||||
* @param string $caseId
|
||||
* @param string $delIndex
|
||||
@@ -2178,10 +2242,10 @@ class wsBase
|
||||
$_SESSION["INDEX"] = $delIndex;
|
||||
$_SESSION["USER_LOGGED"] = $userId;
|
||||
|
||||
//Define variables
|
||||
$sStatus = 'TO_DO';
|
||||
|
||||
$varResponse = '';
|
||||
$varTriggers = "\n";
|
||||
$previousAppData = array();
|
||||
|
||||
if ($delIndex == '') {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
@@ -2216,17 +2280,9 @@ class wsBase
|
||||
return $result;
|
||||
}
|
||||
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( AppDelayPeer::APP_UID );
|
||||
$oCriteria->addSelectColumn( AppDelayPeer::APP_DEL_INDEX );
|
||||
$oCriteria->add( AppDelayPeer::APP_TYPE, '' );
|
||||
$oCriteria->add( $oCriteria->getNewCriterion( AppDelayPeer::APP_TYPE, 'PAUSE' )->addOr( $oCriteria->getNewCriterion( AppDelayPeer::APP_TYPE, 'CANCEL' ) ) );
|
||||
$oCriteria->addAscendingOrderByColumn( AppDelayPeer::APP_ENABLE_ACTION_DATE );
|
||||
$oDataset = AppDelayPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$aRow = $oDataset->getRow();
|
||||
|
||||
//Validate if the case is paused or cancelled
|
||||
$oAppDelay = new AppDelay();
|
||||
$aRow = $oAppDelay->getCasesCancelOrPaused($caseId);
|
||||
if (is_array($aRow)) {
|
||||
if (isset( $aRow['APP_DISABLE_ACTION_USER'] ) && $aRow['APP_DISABLE_ACTION_USER'] != 0 && isset( $aRow['APP_DISABLE_ACTION_DATE'] ) && $aRow['APP_DISABLE_ACTION_DATE'] != '') {
|
||||
$result = new wsResponse( 19, G::LoadTranslation( 'ID_CASE_IN_STATUS' ) . " " . $aRow['APP_TYPE'] );
|
||||
@@ -2258,101 +2314,18 @@ class wsBase
|
||||
|
||||
global $oPMScript;
|
||||
|
||||
if ($bExecuteTriggersBeforeAssignment) {
|
||||
if (isset($oPMScript->aFields['APPLICATION']) && ($oPMScript->aFields['APPLICATION'] != $caseId)) {
|
||||
$previousAppData = $oPMScript->aFields;
|
||||
}
|
||||
|
||||
$varTriggers = "\n";
|
||||
//Execute triggers before assignment
|
||||
$aTriggers = $oCase->loadTriggers( $appdel['TAS_UID'], 'ASSIGN_TASK', - 1, 'BEFORE' );
|
||||
|
||||
if (count( $aTriggers ) > 0) {
|
||||
$varTriggers = $varTriggers . "<br /><b>-= Before Assignment =-</b><br />";
|
||||
|
||||
$oPMScript = new PMScript();
|
||||
|
||||
foreach ($aTriggers as $aTrigger) {
|
||||
//Set variables
|
||||
$params = new stdClass();
|
||||
$params->appData = $appFields["APP_DATA"];
|
||||
|
||||
if ($this->stored_system_variables) {
|
||||
$params->option = "STORED SESSION";
|
||||
$params->SID = $this->wsSessionId;
|
||||
if ($bExecuteTriggersBeforeAssignment) {
|
||||
$varTriggers .= $this->executeTriggerFromDerivate($appFields["APP_DATA"], $appdel['TAS_UID'], 'ASSIGN_TASK', -1, 'BEFORE', "-= Before Assignment =-");
|
||||
}
|
||||
|
||||
$appFields["APP_DATA"] = array_merge( $appFields["APP_DATA"], G::getSystemConstants( $params ) );
|
||||
|
||||
//PMScript
|
||||
$oPMScript->setFields( $appFields['APP_DATA'] );
|
||||
$bExecute = true;
|
||||
|
||||
if ($aTrigger['ST_CONDITION'] !== '') {
|
||||
$oPMScript->setScript( $aTrigger['ST_CONDITION'] );
|
||||
$bExecute = $oPMScript->evaluate();
|
||||
}
|
||||
|
||||
if ($bExecute) {
|
||||
$oPMScript->setScript( $aTrigger['TRI_WEBBOT'] );
|
||||
$oPMScript->execute();
|
||||
|
||||
$trigger = TriggersPeer::retrieveByPk($aTrigger["TRI_UID"]);
|
||||
$varTriggers = $varTriggers . " - " . nl2br(htmlentities($trigger->getTriTitle(), ENT_QUOTES)) . "<br />";
|
||||
|
||||
//$appFields = $oCase->loadCase( $caseId );
|
||||
$appFields['APP_DATA'] = $oPMScript->aFields;
|
||||
unset($appFields['APP_STATUS']);
|
||||
unset($appFields['APP_PROC_STATUS']);
|
||||
unset($appFields['APP_PROC_CODE']);
|
||||
unset($appFields['APP_PIN']);
|
||||
$oCase->updateCase( $caseId, $appFields );
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Execute triggers before derivation BEFORE_ROUTING
|
||||
$aTriggers = $oCase->loadTriggers( $appdel['TAS_UID'], 'ASSIGN_TASK', - 2, 'BEFORE' );
|
||||
|
||||
if (count( $aTriggers ) > 0) {
|
||||
$varTriggers .= "<b>-= Before Derivation =-</b><br/>";
|
||||
|
||||
$oPMScript = new PMScript();
|
||||
|
||||
foreach ($aTriggers as $aTrigger) {
|
||||
//Set variables
|
||||
$params = new stdClass();
|
||||
$params->appData = $appFields["APP_DATA"];
|
||||
|
||||
if ($this->stored_system_variables) {
|
||||
$params->option = "STORED SESSION";
|
||||
$params->SID = $this->wsSessionId;
|
||||
}
|
||||
|
||||
$appFields["APP_DATA"] = array_merge( $appFields["APP_DATA"], G::getSystemConstants( $params ) );
|
||||
|
||||
//PMScript
|
||||
$oPMScript->setFields( $appFields['APP_DATA'] );
|
||||
$bExecute = true;
|
||||
|
||||
if ($aTrigger['ST_CONDITION'] !== '') {
|
||||
$oPMScript->setScript( $aTrigger['ST_CONDITION'] );
|
||||
$bExecute = $oPMScript->evaluate();
|
||||
}
|
||||
|
||||
if ($bExecute) {
|
||||
$oPMScript->setScript( $aTrigger['TRI_WEBBOT'] );
|
||||
$oPMScript->execute();
|
||||
|
||||
$oTrigger = TriggersPeer::retrieveByPk( $aTrigger['TRI_UID'] );
|
||||
$varTriggers .= " - " . nl2br( htmlentities( $oTrigger->getTriTitle(), ENT_QUOTES ) ) . "<br/>";
|
||||
//$appFields = $oCase->loadCase( $caseId );
|
||||
$appFields['APP_DATA'] = $oPMScript->aFields;
|
||||
unset($appFields['APP_STATUS']);
|
||||
unset($appFields['APP_PROC_STATUS']);
|
||||
unset($appFields['APP_PROC_CODE']);
|
||||
unset($appFields['APP_PIN']);
|
||||
//$appFields['APP_DATA']['APPLICATION'] = $caseId;
|
||||
$oCase->updateCase( $caseId, $appFields );
|
||||
}
|
||||
}
|
||||
}
|
||||
//Execute triggers before routing
|
||||
$varTriggers .= $this->executeTriggerFromDerivate($appFields["APP_DATA"], $appdel['TAS_UID'], 'ASSIGN_TASK', -2, 'BEFORE', "-= Before Derivation =-");
|
||||
|
||||
$oDerivation = new Derivation();
|
||||
if (!empty($tasks)) {
|
||||
@@ -2396,8 +2369,8 @@ class wsBase
|
||||
$nodeNext['TAS_DEF_PROC_CODE'] = $val['NEXT_TASK']['TAS_DEF_PROC_CODE'];
|
||||
$nodeNext['DEL_PRIORITY'] = $appdel['DEL_PRIORITY'];
|
||||
$nodeNext['TAS_PARENT'] = $val['NEXT_TASK']['TAS_PARENT'];
|
||||
$nodeNext['ROU_CONDITION'] = $val['ROU_CONDITION'];
|
||||
|
||||
$nodeNext['ROU_PREVIOUS_TYPE'] = (isset($val['NEXT_TASK']['ROU_PREVIOUS_TYPE'])) ? $val['NEXT_TASK']['ROU_PREVIOUS_TYPE'] : '';
|
||||
$nodeNext['ROU_PREVIOUS_TASK'] = (isset($val['NEXT_TASK']['ROU_PREVIOUS_TASK'])) ? $val['NEXT_TASK']['ROU_PREVIOUS_TASK'] : '';
|
||||
$nextDelegations[] = $nodeNext;
|
||||
$varResponse = $varResponse . (($varResponse != '') ? ',' : '') . $val['NEXT_TASK']['TAS_TITLE'] . $usrasgdUserName;
|
||||
}
|
||||
@@ -2408,27 +2381,26 @@ class wsBase
|
||||
$appFields['TAS_UID'] = $derive['TAS_UID'];
|
||||
}
|
||||
|
||||
$row = array ();
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$del = DBAdapter::getStringDelimiter();
|
||||
$oCriteria->addSelectColumn( RoutePeer::ROU_TYPE );
|
||||
$oCriteria->addSelectColumn( RoutePeer::ROU_NEXT_TASK );
|
||||
$oCriteria->add( RoutePeer::TAS_UID, $appdel['TAS_UID'] );
|
||||
$oDataset = TaskPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
|
||||
while ($aRow = $oDataset->getRow()) {
|
||||
$row[] = array('ROU_TYPE' => $aRow['ROU_TYPE'], 'ROU_NEXT_TASK' => $aRow['ROU_NEXT_TASK']);
|
||||
$oDataset->next();
|
||||
//Get from the route information the nextTask
|
||||
$nextTaskUid = $appdel['TAS_UID'];
|
||||
$nextRouteType = '';
|
||||
do {
|
||||
$oRoute = new \Route();
|
||||
$nextRouteTask = $oRoute->getNextRouteByTask($nextTaskUid);
|
||||
$prefix = '';
|
||||
if (isset($nextRouteTask['ROU_NEXT_TASK'])) {
|
||||
$nextTaskUid = $nextRouteTask['ROU_NEXT_TASK'];
|
||||
$nextRouteType = $nextRouteTask['ROU_TYPE'];
|
||||
$prefix = substr($nextTaskUid, 0, 4);
|
||||
}
|
||||
} while ($prefix == 'gtg-');
|
||||
|
||||
$aCurrentDerivation = array (
|
||||
'APP_UID' => $caseId,
|
||||
'DEL_INDEX' => $delIndex,
|
||||
'APP_STATUS' => $sStatus,
|
||||
'TAS_UID' => $appdel['TAS_UID'],
|
||||
'ROU_TYPE' => $row[0]['ROU_TYPE']
|
||||
'ROU_TYPE' => $nextRouteType
|
||||
);
|
||||
|
||||
//We define some parameters in the before the derivation
|
||||
@@ -2436,66 +2408,19 @@ class wsBase
|
||||
$oDerivation->beforeDerivate(
|
||||
$aData,
|
||||
$nextDelegations,
|
||||
$row[0]['ROU_TYPE'],
|
||||
$nextRouteType,
|
||||
$aCurrentDerivation
|
||||
);
|
||||
|
||||
$appFields = $oCase->loadCase( $caseId );
|
||||
|
||||
//Execute triggers after derivation
|
||||
$aTriggers = $oCase->loadTriggers( $appdel['TAS_UID'], 'ASSIGN_TASK', - 2, 'AFTER' );
|
||||
|
||||
if (count( $aTriggers ) > 0) {
|
||||
|
||||
//Set variables
|
||||
$params = new stdClass();
|
||||
$params->appData = $appFields["APP_DATA"];
|
||||
|
||||
if ($this->stored_system_variables) {
|
||||
$params->option = "STORED SESSION";
|
||||
$params->SID = $this->wsSessionId;
|
||||
}
|
||||
|
||||
$appFields["APP_DATA"] = array_merge( $appFields["APP_DATA"], G::getSystemConstants( $params ) );
|
||||
|
||||
//PMScript
|
||||
$oPMScript = new PMScript();
|
||||
$oPMScript->setFields( $appFields['APP_DATA'] );
|
||||
|
||||
$varTriggers .= "<b>-= After Derivation =-</b><br/>";
|
||||
|
||||
foreach ($aTriggers as $aTrigger) {
|
||||
$bExecute = true;
|
||||
|
||||
if ($aTrigger['ST_CONDITION'] !== '') {
|
||||
$oPMScript->setScript( $aTrigger['ST_CONDITION'] );
|
||||
$bExecute = $oPMScript->evaluate();
|
||||
}
|
||||
|
||||
if ($bExecute) {
|
||||
$oPMScript->setScript( $aTrigger['TRI_WEBBOT'] );
|
||||
$oPMScript->execute();
|
||||
|
||||
$oTrigger = TriggersPeer::retrieveByPk( $aTrigger['TRI_UID'] );
|
||||
$varTriggers .= " - " . nl2br( htmlentities( $oTrigger->getTriTitle(), ENT_QUOTES ) ) . "<br/>";
|
||||
//$appFields = $oCase->loadCase($caseId);
|
||||
$appFields['APP_DATA'] = $oPMScript->aFields;
|
||||
//$appFields['APP_DATA']['APPLICATION'] = $caseId;
|
||||
//$appFields = $oCase->loadCase($caseId);
|
||||
unset($appFields['APP_STATUS']);
|
||||
unset($appFields['APP_PROC_STATUS']);
|
||||
unset($appFields['APP_PROC_CODE']);
|
||||
unset($appFields['APP_PIN']);
|
||||
$oCase->updateCase( $caseId, $appFields );
|
||||
}
|
||||
}
|
||||
}
|
||||
//Execute triggers after routing
|
||||
$varTriggers .= $this->executeTriggerFromDerivate($appFields["APP_DATA"], $appdel['TAS_UID'], 'ASSIGN_TASK', -2, 'AFTER', "-= After Derivation =-");
|
||||
|
||||
$sFromName = "";
|
||||
|
||||
if ($userId != "") {
|
||||
$user = new Users();
|
||||
|
||||
$arrayUserData = $user->load($userId);
|
||||
|
||||
if (trim($arrayUserData["USR_EMAIL"]) == "") {
|
||||
@@ -2507,15 +2432,9 @@ class wsBase
|
||||
|
||||
$oCase->sendNotifications( $appdel['TAS_UID'], $nextDelegations, $appFields['APP_DATA'], $caseId, $delIndex, $sFromName );
|
||||
|
||||
//Save data - Start
|
||||
//$appFields = $oCase->loadCase($caseId);
|
||||
//$oCase->updateCase($caseId, $appFields);
|
||||
//Save data - End
|
||||
|
||||
|
||||
$oProcess = new Process();
|
||||
$oProcessFieds = $oProcess->Load( $appFields['PRO_UID'] );
|
||||
//here dubug mode in web entry
|
||||
//here debug mode in web entry
|
||||
|
||||
|
||||
if (isset( $oProcessFieds['PRO_DEBUG'] ) && $oProcessFieds['PRO_DEBUG']) {
|
||||
@@ -2528,7 +2447,7 @@ class wsBase
|
||||
|
||||
$res = $result->getPayloadArray();
|
||||
|
||||
//now fill the array of AppDelegationPeer
|
||||
//Now fill the array of AppDelegationPeer
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( AppDelegationPeer::DEL_INDEX );
|
||||
$oCriteria->addSelectColumn( AppDelegationPeer::USR_UID );
|
||||
@@ -2546,7 +2465,6 @@ class wsBase
|
||||
|
||||
while ($oDataset->next()) {
|
||||
$aAppDel = $oDataset->getRow();
|
||||
|
||||
$oUser = new Users();
|
||||
|
||||
try {
|
||||
@@ -2566,7 +2484,7 @@ class wsBase
|
||||
$taskName = '';
|
||||
}
|
||||
|
||||
// execute events
|
||||
//Execute events
|
||||
$eventPro = $_SESSION["PROCESS"];
|
||||
$eventApp = $caseId;
|
||||
$eventInd = $aAppDel['DEL_INDEX'];
|
||||
@@ -2574,8 +2492,7 @@ class wsBase
|
||||
|
||||
$oEvent = new Event();
|
||||
$oEvent->createAppEvents( $eventPro, $eventApp, $eventInd, $eventTas );
|
||||
// end events
|
||||
|
||||
//End events
|
||||
|
||||
$currentUser = new stdClass();
|
||||
$currentUser->userId = $aAppDel['USR_UID'];
|
||||
@@ -2592,6 +2509,10 @@ class wsBase
|
||||
|
||||
$g->sessionVarRestore();
|
||||
|
||||
if (!empty($previousAppData)) {
|
||||
$oPMScript->aFields = $previousAppData;
|
||||
}
|
||||
|
||||
return $res;
|
||||
} catch (Exception $e) {
|
||||
$result = new wsResponse( 100, $e->getMessage() );
|
||||
|
||||
@@ -145,6 +145,13 @@ class workspaceTools
|
||||
$final = $stop - $start;
|
||||
CLI::logging("<*> Check Mafe Requirements Process took $final seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Updating Triggers...\n");
|
||||
$this->updateTriggers(true, $lang);
|
||||
$stop = microtime(true);
|
||||
$final = $stop - $start;
|
||||
CLI::logging("<*> Updating Triggers Process took $final seconds.\n");
|
||||
|
||||
$start = microtime(true);
|
||||
CLI::logging("> Backup log files...\n");
|
||||
$this->backupLogFiles();
|
||||
@@ -2591,10 +2598,10 @@ class workspaceTools
|
||||
LEFT JOIN ' . $this->dbName . '.USERS ON CUR_USER.USR_UID = USERS.USR_UID
|
||||
LEFT JOIN ' . $this->dbName . '.TASK ON CUR_USER.TAS_UID = TASK.TAS_UID) USERS_VALUES
|
||||
SET
|
||||
LPL.DEL_CURRENT_USR_USERNAME = USERS_VALUES.USR_USERNAME,
|
||||
LPL.DEL_CURRENT_USR_FIRSTNAME = USERS_VALUES.USR_FIRSTNAME,
|
||||
LPL.DEL_CURRENT_USR_LASTNAME = USERS_VALUES.USR_LASTNAME,
|
||||
LPL.DEL_CURRENT_TAS_TITLE = USERS_VALUES.TAS_TITLE
|
||||
LPL.DEL_CURRENT_USR_USERNAME = IFNULL(USERS_VALUES.USR_USERNAME, \'\'),
|
||||
LPL.DEL_CURRENT_USR_FIRSTNAME = IFNULL(USERS_VALUES.USR_FIRSTNAME, \'\'),
|
||||
LPL.DEL_CURRENT_USR_LASTNAME = IFNULL(USERS_VALUES.USR_LASTNAME, \'\'),
|
||||
LPL.DEL_CURRENT_TAS_TITLE = IFNULL(USERS_VALUES.TAS_TITLE, \'\')
|
||||
WHERE LPL.APP_UID = USERS_VALUES.APP_UID';
|
||||
$con = Propel::getConnection("workflow");
|
||||
$stmt = $con->createStatement();
|
||||
@@ -2613,6 +2620,7 @@ class workspaceTools
|
||||
$delaycriteria->addSelectColumn(AppCacheViewPeer::USR_UID);
|
||||
$delaycriteria->addSelectColumn(AppCacheViewPeer::APP_STATUS);
|
||||
$delaycriteria->addSelectColumn(AppCacheViewPeer::TAS_UID);
|
||||
$delaycriteria->addSelectColumn(AppCacheViewPeer::DEL_DELEGATE_DATE);
|
||||
|
||||
$delaycriteria->addJoin( AppCacheViewPeer::APP_UID, AppDelayPeer::APP_UID . ' AND ' . AppCacheViewPeer::DEL_INDEX . ' = ' . AppDelayPeer::APP_DEL_INDEX, Criteria::INNER_JOIN );
|
||||
$delaycriteria->add(AppDelayPeer::APP_DISABLE_ACTION_USER, "0", CRITERIA::EQUAL);
|
||||
@@ -3784,4 +3792,14 @@ class workspaceTools
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updating triggers
|
||||
* @param $flagRecreate
|
||||
* @param $lang
|
||||
*/
|
||||
public function updateTriggers($flagRecreate, $lang)
|
||||
{
|
||||
$this->initPropel(true);
|
||||
$this->upgradeTriggersOfTables($flagRecreate, $lang);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,5 +112,25 @@ class AppDelay extends BaseAppDelay
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Verify if the case is Paused or cancelled
|
||||
*
|
||||
* @param $appUid string
|
||||
* @return $oDataset array
|
||||
*/
|
||||
public function getCasesCancelOrPaused($appUid)
|
||||
{
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( AppDelayPeer::APP_UID );
|
||||
$oCriteria->addSelectColumn( AppDelayPeer::APP_DEL_INDEX );
|
||||
$oCriteria->add( AppDelayPeer::APP_UID, $appUid );
|
||||
$oCriteria->add( $oCriteria->getNewCriterion( AppDelayPeer::APP_TYPE, 'PAUSE' )->addOr( $oCriteria->getNewCriterion( AppDelayPeer::APP_TYPE, 'CANCEL' ) ) );
|
||||
$oCriteria->addAscendingOrderByColumn( AppDelayPeer::APP_ENABLE_ACTION_DATE );
|
||||
$oDataset = AppDelayPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -384,4 +384,23 @@ class Route extends BaseRoute
|
||||
$this->updateRouteOrder($accountsArray);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the route for the specific task
|
||||
*
|
||||
* @param $tasUid string
|
||||
* @return $nextRoute array
|
||||
*/
|
||||
public function getNextRouteByTask($tasUid)
|
||||
{
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( RoutePeer::ROU_TYPE );
|
||||
$oCriteria->addSelectColumn( RoutePeer::ROU_NEXT_TASK );
|
||||
$oCriteria->add( RoutePeer::TAS_UID, $tasUid );
|
||||
$oDataset = TaskPeer::doSelectRS( $oCriteria );
|
||||
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
|
||||
$oDataset->next();
|
||||
$row = $oDataset->getRow();
|
||||
return (is_array($row)) ? $row : array();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -61,7 +61,7 @@ $_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] = count( $triggers );
|
||||
$_SESSION['TRIGGER_DEBUG']['TIME'] = G::toUpper(G::loadTranslation('ID_AFTER'));
|
||||
|
||||
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
|
||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
|
||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = array_column($triggers, 'TRI_TITLE');
|
||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = $triggers;
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ try {
|
||||
//save trigger variables for debugger
|
||||
$_SESSION['TRIGGER_DEBUG']['info'][0]['NUM_TRIGGERS'] = sizeof( $triggers );
|
||||
$_SESSION['TRIGGER_DEBUG']['info'][0]['TIME'] = G::toUpper(G::loadTranslation('ID_BEFORE'));
|
||||
$_SESSION['TRIGGER_DEBUG']['info'][0]['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
|
||||
$_SESSION['TRIGGER_DEBUG']['info'][0]['TRIGGERS_NAMES'] = array_column($triggers, 'TRI_TITLE');
|
||||
$_SESSION['TRIGGER_DEBUG']['info'][0]['TRIGGERS_VALUES'] = $triggers;
|
||||
$_SESSION['TRIGGER_DEBUG']['info'][0]['TRIGGERS_EXECUTION_TIME'] = $oCase->arrayTriggerExecutionTime;
|
||||
$arrayInfoTriggerExecutionTime = [];
|
||||
@@ -171,7 +171,7 @@ try {
|
||||
|
||||
$_SESSION['TRIGGER_DEBUG']['info'][1]['NUM_TRIGGERS'] = sizeof( $triggers );
|
||||
$_SESSION['TRIGGER_DEBUG']['info'][1]['TIME'] = G::toUpper(G::loadTranslation('ID_AFTER'));
|
||||
$_SESSION['TRIGGER_DEBUG']['info'][1]['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
|
||||
$_SESSION['TRIGGER_DEBUG']['info'][1]['TRIGGERS_NAMES'] = array_column($triggers, 'TRI_TITLE');
|
||||
$_SESSION['TRIGGER_DEBUG']['info'][1]['TRIGGERS_VALUES'] = $triggers;
|
||||
$_SESSION['TRIGGER_DEBUG']['info'][1]['TRIGGERS_EXECUTION_TIME'] = $oCase->arrayTriggerExecutionTime;
|
||||
$arrayInfoTriggerExecutionTimeAux = [];
|
||||
|
||||
@@ -166,7 +166,7 @@ try {
|
||||
$_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] = count( $triggers );
|
||||
$_SESSION['TRIGGER_DEBUG']['TIME'] = G::toUpper(G::loadTranslation('ID_AFTER'));
|
||||
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
|
||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
|
||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = array_column($triggers, 'TRI_TITLE');
|
||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = $triggers;
|
||||
$oProcess = new Process();
|
||||
$oProcessFieds = $oProcess->Load( $_SESSION['PROCESS'] );
|
||||
|
||||
@@ -90,7 +90,7 @@ $_SESSION["TRIGGER_DEBUG"]["NUM_TRIGGERS"] = count($arrayTrigger);
|
||||
$_SESSION["TRIGGER_DEBUG"]["TIME"] = "AFTER";
|
||||
|
||||
if ($_SESSION["TRIGGER_DEBUG"]["NUM_TRIGGERS"] > 0) {
|
||||
$_SESSION["TRIGGER_DEBUG"]["TRIGGERS_NAMES"] = $case->getTriggerNames($arrayTrigger);
|
||||
$_SESSION["TRIGGER_DEBUG"]["TRIGGERS_NAMES"] = array_column($arrayTrigger, 'TRI_TITLE');
|
||||
$_SESSION["TRIGGER_DEBUG"]["TRIGGERS_VALUES"] = $arrayTrigger;
|
||||
}
|
||||
|
||||
|
||||
@@ -209,7 +209,7 @@ if ($flagExecuteBeforeTriggers) {
|
||||
$_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] = count( $triggers );
|
||||
$_SESSION['TRIGGER_DEBUG']['TIME'] = G::toUpper(G::loadTranslation('ID_BEFORE'));
|
||||
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
|
||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
|
||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = array_column($triggers, 'TRI_TITLE');
|
||||
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = $triggers;
|
||||
}
|
||||
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
*/
|
||||
include_once (PATH_TRUNK."/class.Build.php");
|
||||
use Build\Utils\ProcessMakerPhpBuilderHelper;
|
||||
|
||||
// lets display the items
|
||||
$pluginFile = $_GET['id'];
|
||||
@@ -88,16 +86,6 @@ if ($handle = opendir( PATH_PLUGINS )) {
|
||||
}
|
||||
}
|
||||
closedir( $handle );
|
||||
|
||||
/**
|
||||
* Calls PMExtensionClass Builder to include Plugins changes.
|
||||
*/
|
||||
$phpBuilder = new ProcessMakerPhpBuilderHelper();
|
||||
$phpBuilder->enabledExtensions = $oPluginRegistry->getEnabledPlugins();
|
||||
if (!empty($phpBuilder->enabledExtensions)) {
|
||||
$phpBuilder->extension = true;
|
||||
}
|
||||
$phpBuilder->buildAll();
|
||||
}
|
||||
|
||||
//$oPluginRegistry->showArrays();
|
||||
|
||||
@@ -944,6 +944,12 @@ class InputDocument
|
||||
//***Validating the file allowed extensions***
|
||||
$res = \G::verifyInputDocExtension($aID['INP_DOC_TYPE_FILE'], $arrayFileName[$i], $arrayFileTmpName[$i]);
|
||||
if ($res->status == 0) {
|
||||
//The value of the variable "_label" is cleared because the file load failed.
|
||||
//The validation of the die command should be improved.
|
||||
if (isset($aData["APP_DATA"][$item . "_label"]) && !empty($aData["APP_DATA"][$item . "_label"])) {
|
||||
unset($aData["APP_DATA"][$item . "_label"]);
|
||||
$caseInstance->updateCase($appUid, $aData);
|
||||
}
|
||||
$message = $res->message;
|
||||
\G::SendMessageText($message, "ERROR");
|
||||
$backUrlObj = explode("sys" . SYS_SYS, $_SERVER['HTTP_REFERER']);
|
||||
|
||||
@@ -473,13 +473,15 @@ class EmailServer
|
||||
$arrayResult[$arrayMailTestName[1]] = $this->testConnectionByStep($arrayDataAux);
|
||||
$arrayResult[$arrayMailTestName[1]]["title"] = \G::LoadTranslation("ID_EMAIL_SERVER_TEST_CONNECTION_VERIFYING_MAIL");
|
||||
|
||||
if ((int)($arrayData["MESS_TRY_SEND_INMEDIATLY"]) == 1) {
|
||||
if ((int)($arrayData["MESS_TRY_SEND_INMEDIATLY"]) == 1 && $arrayData['MAIL_TO'] != '') {
|
||||
$arrayResult[$arrayMailTestName[2]] = $this->testConnectionByStep($arrayData);
|
||||
$arrayResult[$arrayMailTestName[2]]["title"] = \G::LoadTranslation("ID_EMAIL_SERVER_TEST_CONNECTION_SENDING_EMAIL", array($arrayData["MAIL_TO"]));
|
||||
}
|
||||
break;
|
||||
case "PHPMAILER":
|
||||
for ($step = 1; $step <= 5; $step++) {
|
||||
$numSteps = ($arrayData['MAIL_TO'] != '') ? count($arrayPhpMailerTestName) :
|
||||
count($arrayPhpMailerTestName) - 1;
|
||||
for ($step = 1; $step <= $numSteps; $step++) {
|
||||
$arrayResult[$arrayPhpMailerTestName[$step]] = $this->testConnectionByStep($arrayData, $step);
|
||||
|
||||
switch ($step) {
|
||||
|
||||
@@ -272,7 +272,6 @@ Ext.onReady(function(){
|
||||
|
||||
triggerStore = new Ext.data.GroupingStore({
|
||||
reader: reader,
|
||||
sortInfo:{field: 'name', direction: "ASC"},
|
||||
groupField:'execution_time',
|
||||
groupDir: 'DESC',
|
||||
proxy: new Ext.data.HttpProxy({url: 'debug_triggers?r='+Math.random()})
|
||||
|
||||
@@ -388,7 +388,13 @@ Ext.onReady(function(){
|
||||
exportImportProcessObjects('export');
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
listeners: {
|
||||
"click": function (obj, e)
|
||||
{
|
||||
obj.showMenu();
|
||||
}
|
||||
}
|
||||
};
|
||||
exportProcessOption = granularExportProcessOption;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user