Merged in victorsl/processmaker/PM-939 (pull request #1521)
PM-939 "Support for Message-Event (Running case & Message-Event CRON)"
This commit is contained in:
139
workflow/engine/bin/messageeventcron.php
Normal file
139
workflow/engine/bin/messageeventcron.php
Normal file
@@ -0,0 +1,139 @@
|
||||
<?php
|
||||
try {
|
||||
//Set variables
|
||||
$osIsLinux = strtoupper(substr(PHP_OS, 0, 3)) != "WIN";
|
||||
|
||||
//Defines constants
|
||||
define("PATH_SEP", ($osIsLinux)? "/" : "\\");
|
||||
|
||||
$arrayPathToCron = array();
|
||||
$flagPathToCron = false;
|
||||
|
||||
//Path to CRON by __FILE__
|
||||
$arrayAux = explode(PATH_SEP, str_replace("engine" . PATH_SEP . "bin", "", dirname(__FILE__)));
|
||||
|
||||
array_pop($arrayAux);
|
||||
|
||||
if (count($arrayAux) > 0 && $arrayAux[count($arrayAux) - 1] == "workflow") {
|
||||
$arrayPathToCron = $arrayAux;
|
||||
$flagPathToCron = true;
|
||||
}
|
||||
|
||||
if (!$flagPathToCron) {
|
||||
throw new Exception("Error: Unable to execute the Message-Event CRON, the path is incorrect");
|
||||
}
|
||||
|
||||
$pathHome = implode(PATH_SEP, $arrayPathToCron) . PATH_SEP;
|
||||
|
||||
array_pop($arrayPathToCron);
|
||||
|
||||
$pathTrunk = implode(PATH_SEP, $arrayPathToCron) . PATH_SEP;
|
||||
|
||||
array_pop($arrayPathToCron);
|
||||
|
||||
$pathOutTrunk = implode(PATH_SEP, $arrayPathToCron) . PATH_SEP;
|
||||
|
||||
define("PATH_HOME", $pathHome);
|
||||
define("PATH_TRUNK", $pathTrunk);
|
||||
define("PATH_OUTTRUNK", $pathOutTrunk);
|
||||
|
||||
//Include files
|
||||
require_once(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths.php");
|
||||
|
||||
G::LoadClass("system");
|
||||
|
||||
$config = System::getSystemConfiguration();
|
||||
|
||||
ini_set("date.timezone", $config["time_zone"]);
|
||||
|
||||
//CRON command options
|
||||
$arrayCommandOption = array(
|
||||
"force" => "+force"
|
||||
);
|
||||
|
||||
//CRON status
|
||||
$flagIsRunning = false;
|
||||
$lastExecution = "";
|
||||
$processcTimeProcess = 0;
|
||||
$processcTimeStart = 0;
|
||||
|
||||
$force = in_array($arrayCommandOption["force"], $argv);
|
||||
|
||||
if (!$force && file_exists(PATH_DATA . "messageeventcron")) {
|
||||
//Windows flag
|
||||
//Get data of CRON file
|
||||
$arrayCron = unserialize(trim(file_get_contents(PATH_DATA . "messageeventcron")));
|
||||
|
||||
$flagIsRunning = (boolean)($arrayCron["flagIsRunning"]);
|
||||
$lastExecution = $arrayCron["lastExecution"];
|
||||
$processcTimeProcess = (isset($arrayCron["processcTimeProcess"]))? (int)($arrayCron["processcTimeProcess"]) : 10; //Minutes
|
||||
$processcTimeStart = (isset($arrayCron["processcTimeStart"]))? $arrayCron["processcTimeStart"] : 0;
|
||||
}
|
||||
|
||||
if (!$force && $osIsLinux) {
|
||||
//Linux flag
|
||||
//Check if CRON it's running
|
||||
exec("ps -fea | grep messageeventcron.php | grep -v grep", $arrayOutput);
|
||||
|
||||
if (count($arrayOutput) > 1) {
|
||||
$flagIsRunning = true;
|
||||
}
|
||||
}
|
||||
|
||||
if ($force || !$flagIsRunning) {
|
||||
//Start CRON
|
||||
$arrayCron = array("flagIsRunning" => "1", "lastExecution" => date("Y-m-d H:i:s"));
|
||||
file_put_contents(PATH_DATA . "messageeventcron", serialize($arrayCron));
|
||||
|
||||
try {
|
||||
$messageEventCronSinglePath = PATH_CORE . "bin" . PATH_SEP . "messageeventcron_single.php";
|
||||
|
||||
$workspace = "";
|
||||
|
||||
for ($i = 1; $i <= count($argv) - 1; $i++) {
|
||||
if (preg_match("/^\+w(.+)$/", $argv[$i], $arrayMatch)) {
|
||||
$workspace = $arrayMatch[1];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$countw = 0;
|
||||
|
||||
if ($workspace == "") {
|
||||
$d = dir(PATH_DB);
|
||||
|
||||
while (($entry = $d->read()) !== false) {
|
||||
if ($entry != "" && $entry != "." && $entry != "..") {
|
||||
if (is_dir(PATH_DB . $entry)) {
|
||||
if (file_exists(PATH_DB . $entry . PATH_SEP . "db.php")) {
|
||||
$countw++;
|
||||
|
||||
passthru("php -f \"$messageEventCronSinglePath\" $entry \"" . base64_encode(PATH_HOME) . "\" \"" . base64_encode(PATH_TRUNK) . "\" \"" . base64_encode(PATH_OUTTRUNK) . "\"");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$countw++;
|
||||
|
||||
passthru("php -f \"$messageEventCronSinglePath\" $workspace \"" . base64_encode(PATH_HOME) . "\" \"" . base64_encode(PATH_TRUNK) . "\" \"" . base64_encode(PATH_OUTTRUNK) . "\"");
|
||||
}
|
||||
|
||||
eprintln("Finished $countw workspaces processed");
|
||||
} catch (Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
|
||||
//End CRON
|
||||
$arrayCron = array("flagIsRunning" => "0", "lastExecution" => date("Y-m-d H:i:s"));
|
||||
file_put_contents(PATH_DATA . "messageeventcron", serialize($arrayCron));
|
||||
} else {
|
||||
eprintln("The Message-Event CRON is running, please wait for it to finish\nStarted in $lastExecution");
|
||||
eprintln("If do you want force the execution use the option \"" . $arrayCommandOption["force"] . "\", example: php -f messageeventcron.php +wworkflow " . $arrayCommandOption["force"] ,"green");
|
||||
}
|
||||
|
||||
echo "Done!\n";
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
}
|
||||
|
||||
222
workflow/engine/bin/messageeventcron_single.php
Normal file
222
workflow/engine/bin/messageeventcron_single.php
Normal file
@@ -0,0 +1,222 @@
|
||||
<?php
|
||||
ini_set("memory_limit", "512M");
|
||||
|
||||
try {
|
||||
//Verify data
|
||||
if (count($argv) != 5) {
|
||||
throw new Exception("Error: Invalid number of arguments");
|
||||
}
|
||||
|
||||
for ($i = 2; $i <= count($argv) - 1; $i++) {
|
||||
$argv[$i] = base64_decode($argv[$i]);
|
||||
|
||||
if (!is_dir($argv[$i])) {
|
||||
throw new Exception("Error: The path \"" . $argv[$i] . "\" is invalid");
|
||||
}
|
||||
}
|
||||
|
||||
//Set variables
|
||||
$osIsLinux = strtoupper(substr(PHP_OS, 0, 3)) != "WIN";
|
||||
|
||||
$pathHome = $argv[2];
|
||||
$pathTrunk = $argv[3];
|
||||
$pathOutTrunk = $argv[4];
|
||||
|
||||
//Defines constants
|
||||
define("PATH_SEP", ($osIsLinux)? "/" : "\\");
|
||||
|
||||
define("PATH_HOME", $pathHome);
|
||||
define("PATH_TRUNK", $pathTrunk);
|
||||
define("PATH_OUTTRUNK", $pathOutTrunk);
|
||||
|
||||
define("PATH_CLASSES", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP);
|
||||
|
||||
define("SYS_LANG", "en");
|
||||
|
||||
require_once(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths.php");
|
||||
require_once(PATH_TRUNK . "framework" . PATH_SEP . "src" . PATH_SEP . "Maveriks" . PATH_SEP . "Util" . PATH_SEP . "ClassLoader.php");
|
||||
|
||||
//Class loader - /ProcessMaker/BusinessModel
|
||||
$classLoader = \Maveriks\Util\ClassLoader::getInstance();
|
||||
$classLoader->add(PATH_TRUNK . "framework" . PATH_SEP . "src" . PATH_SEP, "Maveriks");
|
||||
$classLoader->add(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "src" . PATH_SEP, "ProcessMaker");
|
||||
$classLoader->add(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "src" . PATH_SEP);
|
||||
|
||||
//Add vendors to autoloader
|
||||
//$classLoader->add(PATH_TRUNK . "vendor" . PATH_SEP . "luracast" . PATH_SEP . "restler" . PATH_SEP . "vendor", "Luracast");
|
||||
//$classLoader->add(PATH_TRUNK . "vendor" . PATH_SEP . "bshaffer" . PATH_SEP . "oauth2-server-php" . PATH_SEP . "src" . PATH_SEP, "OAuth2");
|
||||
$classLoader->addClass("Bootstrap", PATH_TRUNK . "gulliver" . PATH_SEP . "system" . PATH_SEP . "class.bootstrap.php");
|
||||
|
||||
$classLoader->addModelClassPath(PATH_TRUNK . "workflow" . PATH_SEP . "engine" . PATH_SEP . "classes" . PATH_SEP . "model" . PATH_SEP);
|
||||
|
||||
//Load classes
|
||||
G::LoadThirdParty("pear/json", "class.json");
|
||||
G::LoadThirdParty("smarty/libs", "Smarty.class");
|
||||
G::LoadSystem("error");
|
||||
G::LoadSystem("dbconnection");
|
||||
G::LoadSystem("dbsession");
|
||||
G::LoadSystem("dbrecordset");
|
||||
G::LoadSystem("dbtable");
|
||||
G::LoadSystem("rbac" );
|
||||
G::LoadSystem("publisher");
|
||||
G::LoadSystem("templatePower");
|
||||
G::LoadSystem("xmlDocument");
|
||||
G::LoadSystem("xmlform");
|
||||
G::LoadSystem("xmlformExtension");
|
||||
G::LoadSystem("form");
|
||||
G::LoadSystem("menu");
|
||||
G::LoadSystem("xmlMenu");
|
||||
G::LoadSystem("dvEditor");
|
||||
G::LoadSystem("table");
|
||||
G::LoadSystem("pagedTable");
|
||||
G::LoadClass("system");
|
||||
|
||||
require_once("propel/Propel.php");
|
||||
require_once("creole/Creole.php");
|
||||
|
||||
$config = System::getSystemConfiguration();
|
||||
|
||||
$e_all = (defined("E_DEPRECATED"))? E_ALL & ~E_DEPRECATED : E_ALL;
|
||||
$e_all = (defined("E_STRICT"))? $e_all & ~E_STRICT : $e_all;
|
||||
$e_all = ($config["debug"])? $e_all : $e_all & ~E_NOTICE;
|
||||
|
||||
//Do not change any of these settings directly, use env.ini instead
|
||||
ini_set("display_errors", $config["debug"]);
|
||||
ini_set("error_reporting", $e_all);
|
||||
ini_set("short_open_tag", "On");
|
||||
ini_set("default_charset", "UTF-8");
|
||||
//ini_set("memory_limit", $config["memory_limit"]);
|
||||
ini_set("soap.wsdl_cache_enabled", $config["wsdl_cache"]);
|
||||
ini_set("date.timezone", $config["time_zone"]);
|
||||
|
||||
define("DEBUG_SQL_LOG", $config["debug_sql"]);
|
||||
define("DEBUG_TIME_LOG", $config["debug_time"]);
|
||||
define("DEBUG_CALENDAR_LOG", $config["debug_calendar"]);
|
||||
define("MEMCACHED_ENABLED", $config["memcached"]);
|
||||
define("MEMCACHED_SERVER", $config["memcached_server"]);
|
||||
define("TIME_ZONE", $config["time_zone"]);
|
||||
|
||||
//require_once(PATH_GULLIVER . PATH_SEP . "class.bootstrap.php");
|
||||
//define("PATH_GULLIVER_HOME", PATH_TRUNK . "gulliver" . PATH_SEP);
|
||||
|
||||
spl_autoload_register(array("Bootstrap", "autoloadClass"));
|
||||
|
||||
//DATABASE propel classes used in "Cases" Options
|
||||
Bootstrap::registerClass("PMLicensedFeatures", PATH_CLASSES . "class.licensedFeatures.php");
|
||||
Bootstrap::registerClass("calendar", PATH_CLASSES . "class.calendar.php");
|
||||
|
||||
Bootstrap::registerClass("wsResponse", PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.wsResponse.php");
|
||||
|
||||
G::LoadClass("processes");
|
||||
G::LoadClass("dates"); //Load Criteria
|
||||
|
||||
//Workflow
|
||||
$workflow = $argv[1];
|
||||
|
||||
if (is_dir(PATH_DB . $workflow) && file_exists(PATH_DB . $workflow . PATH_SEP . "db.php")) {
|
||||
define("SYS_SYS", $workflow);
|
||||
|
||||
include_once(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths_installed.php");
|
||||
include_once(PATH_HOME . "engine" . PATH_SEP . "config" . PATH_SEP . "paths.php");
|
||||
|
||||
//PM Paths DATA
|
||||
define("PATH_DATA_SITE", PATH_DATA . "sites/" . SYS_SYS . "/");
|
||||
define("PATH_DOCUMENT", PATH_DATA_SITE . "files/");
|
||||
define("PATH_DATA_MAILTEMPLATES", PATH_DATA_SITE . "mailTemplates/");
|
||||
define("PATH_DATA_PUBLIC", PATH_DATA_SITE . "public/");
|
||||
define("PATH_DATA_REPORTS", PATH_DATA_SITE . "reports/");
|
||||
define("PATH_DYNAFORM", PATH_DATA_SITE . "xmlForms/");
|
||||
define("PATH_IMAGES_ENVIRONMENT_FILES", PATH_DATA_SITE . "usersFiles" . PATH_SEP);
|
||||
define("PATH_IMAGES_ENVIRONMENT_USERS", PATH_DATA_SITE . "usersPhotographies" . PATH_SEP);
|
||||
|
||||
if (is_file(PATH_DATA_SITE.PATH_SEP . ".server_info")) {
|
||||
$SERVER_INFO = file_get_contents(PATH_DATA_SITE.PATH_SEP.".server_info");
|
||||
$SERVER_INFO = unserialize($SERVER_INFO);
|
||||
|
||||
define("SERVER_NAME", $SERVER_INFO ["SERVER_NAME"]);
|
||||
define("SERVER_PORT", $SERVER_INFO ["SERVER_PORT"]);
|
||||
} else {
|
||||
eprintln("WARNING! No server info found!", "red");
|
||||
}
|
||||
|
||||
//DB
|
||||
$phpCode = "";
|
||||
|
||||
$fileDb = fopen(PATH_DB . $workflow . PATH_SEP . "db.php", "r");
|
||||
|
||||
if ($fileDb) {
|
||||
while (!feof($fileDb)) {
|
||||
$buffer = fgets($fileDb, 4096); //Read a line
|
||||
|
||||
$phpCode .= preg_replace("/define\s*\(\s*[\x22\x27](.*)[\x22\x27]\s*,\s*(\x22.*\x22|\x27.*\x27)\s*\)\s*;/i", "\$$1 = $2;", $buffer);
|
||||
}
|
||||
|
||||
fclose($fileDb);
|
||||
}
|
||||
|
||||
$phpCode = str_replace(array("<?php", "<?", "?>"), array("", "", ""), $phpCode);
|
||||
|
||||
eval($phpCode);
|
||||
|
||||
$dsn = $DB_ADAPTER . "://" . $DB_USER . ":" . $DB_PASS . "@" . $DB_HOST . "/" . $DB_NAME;
|
||||
$dsnRbac = $DB_ADAPTER . "://" . $DB_RBAC_USER . ":" . $DB_RBAC_PASS . "@" . $DB_RBAC_HOST . "/" . $DB_RBAC_NAME;
|
||||
$dsnRp = $DB_ADAPTER . "://" . $DB_REPORT_USER . ":" . $DB_REPORT_PASS . "@" . $DB_REPORT_HOST . "/" . $DB_REPORT_NAME;
|
||||
|
||||
switch ($DB_ADAPTER) {
|
||||
case "mysql":
|
||||
$dsn .= "?encoding=utf8";
|
||||
$dsnRbac .= "?encoding=utf8";
|
||||
break;
|
||||
case "mssql":
|
||||
//$dsn .= "?sendStringAsUnicode=false";
|
||||
//$dsnRbac .= "?sendStringAsUnicode=false";
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
$pro = array();
|
||||
$pro["datasources"]["workflow"]["connection"] = $dsn;
|
||||
$pro["datasources"]["workflow"]["adapter"] = $DB_ADAPTER;
|
||||
$pro["datasources"]["rbac"]["connection"] = $dsnRbac;
|
||||
$pro["datasources"]["rbac"]["adapter"] = $DB_ADAPTER;
|
||||
$pro["datasources"]["rp"]["connection"] = $dsnRp;
|
||||
$pro["datasources"]["rp"]["adapter"] = $DB_ADAPTER;
|
||||
//$pro["datasources"]["dbarray"]["connection"] = "dbarray://user:pass@localhost/pm_os";
|
||||
//$pro["datasources"]["dbarray"]["adapter"] = "dbarray";
|
||||
|
||||
$oFile = fopen(PATH_CORE . "config" . PATH_SEP . "_databases_.php", "w");
|
||||
fwrite($oFile, "<?php global \$pro; return \$pro; ?>");
|
||||
fclose($oFile);
|
||||
|
||||
Propel::init(PATH_CORE . "config" . PATH_SEP . "_databases_.php");
|
||||
//Creole::registerDriver("dbarray", "creole.contrib.DBArrayConnection");
|
||||
|
||||
//Enable RBAC
|
||||
Bootstrap::LoadSystem("rbac");
|
||||
|
||||
$rbac = &RBAC::getSingleton(PATH_DATA, session_id());
|
||||
$rbac->sSystem = "PROCESSMAKER";
|
||||
|
||||
eprintln("Processing workspace: " . $workflow, "green");
|
||||
|
||||
try {
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
|
||||
$case->catchMessageEvent(true);
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
|
||||
eprintln("Problem in workspace: " . $workflow . " it was omitted.", "red");
|
||||
}
|
||||
|
||||
eprintln();
|
||||
}
|
||||
|
||||
if (file_exists(PATH_CORE . "config" . PATH_SEP . "_databases_.php")) {
|
||||
unlink(PATH_CORE . "config" . PATH_SEP . "_databases_.php");
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
echo $e->getMessage() . "\n";
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ class Derivation
|
||||
$arrayTaskData["NEXT_TASK"]["TAS_PARENT"] = "";
|
||||
}
|
||||
|
||||
$arrayTaskData["NEXT_TASK"]["USER_ASSIGNED"] = ($arrayTaskData["NEXT_TASK"]["TAS_TYPE"] != "GATEWAYTOGATEWAY")? $this->getNextAssignedUser($arrayTaskData) : array("USR_UID" => "");
|
||||
$arrayTaskData["NEXT_TASK"]["USER_ASSIGNED"] = (!in_array($arrayTaskData["NEXT_TASK"]["TAS_TYPE"], array("GATEWAYTOGATEWAY", "END-MESSAGE-EVENT")))? $this->getNextAssignedUser($arrayTaskData) : array("USR_UID" => "");
|
||||
}
|
||||
|
||||
//Return
|
||||
@@ -221,21 +221,29 @@ class Derivation
|
||||
$arrayNextTask[++$i] = $this->prepareInformationTask($arrayNextTaskDefault);
|
||||
}
|
||||
|
||||
//Check Task GATEWAYTOGATEWAY
|
||||
$arrayNextTaskBk = $arrayNextTask;
|
||||
//Check Task GATEWAYTOGATEWAY or END-MESSAGE-EVENT
|
||||
$arrayNextTaskBackup = $arrayNextTask;
|
||||
$arrayNextTask = array();
|
||||
$i = 0;
|
||||
|
||||
foreach ($arrayNextTaskBk as $value) {
|
||||
foreach ($arrayNextTaskBackup as $value) {
|
||||
$arrayNextTaskData = $value;
|
||||
|
||||
if ($arrayNextTaskData["NEXT_TASK"]["TAS_UID"] != "-1" && $arrayNextTaskData["NEXT_TASK"]["TAS_TYPE"] == "GATEWAYTOGATEWAY") {
|
||||
if ($arrayNextTaskData["NEXT_TASK"]["TAS_UID"] != "-1" &&
|
||||
in_array($arrayNextTaskData["NEXT_TASK"]["TAS_TYPE"], array("GATEWAYTOGATEWAY", "END-MESSAGE-EVENT"))
|
||||
) {
|
||||
$arrayAux = $this->prepareInformation($arrayData, $arrayNextTaskData["NEXT_TASK"]["TAS_UID"]);
|
||||
|
||||
foreach ($arrayAux as $value2) {
|
||||
$arrayNextTask[++$i] = $value2;
|
||||
}
|
||||
} else {
|
||||
if ($arrayNextTaskData["TAS_TYPE"] == "END-MESSAGE-EVENT" &&
|
||||
$arrayNextTaskData["NEXT_TASK"]["TAS_UID"] == "-1"
|
||||
) {
|
||||
$arrayNextTaskData["NEXT_TASK"]["TAS_UID"] = $arrayNextTaskData["TAS_UID"] . "/" . $arrayNextTaskData["NEXT_TASK"]["TAS_UID"];
|
||||
}
|
||||
|
||||
$arrayNextTask[++$i] = $arrayNextTaskData;
|
||||
}
|
||||
}
|
||||
@@ -247,8 +255,8 @@ class Derivation
|
||||
if(isset($oProcessFieds['PRO_BPMN']) && $oProcessFieds['PRO_BPMN'] == 1){
|
||||
throw new Exception(G::LoadTranslation("ID_NO_DERIVATION_BPMN_RULE"));
|
||||
}else{
|
||||
throw new Exception(G::LoadTranslation("ID_NO_DERIVATION_RULE"));
|
||||
}
|
||||
throw new Exception(G::LoadTranslation("ID_NO_DERIVATION_RULE"));
|
||||
}
|
||||
}
|
||||
|
||||
//Return
|
||||
@@ -588,6 +596,12 @@ class Derivation
|
||||
//Count how many tasks should be derivated.
|
||||
//$countNextTask = count($nextDelegations);
|
||||
foreach ($nextDelegations as $nextDel) {
|
||||
//BpmnEvent - END-MESSAGE-EVENT - Check and get unique id
|
||||
if (preg_match("/^(.{32})\/(\-1)$/", $nextDel["TAS_UID"], $arrayMatch)) {
|
||||
$nextDel["TAS_UID"] = $arrayMatch[2];
|
||||
$nextDel["TAS_UID_DUMMY"] = $arrayMatch[1];
|
||||
}
|
||||
|
||||
//subprocesses??
|
||||
if ($nextDel['TAS_PARENT'] != '') {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
@@ -626,6 +640,17 @@ class Derivation
|
||||
$this->case->closeAllDelegations( $currentDelegation['APP_UID'] );
|
||||
$this->case->closeAllThreads( $currentDelegation['APP_UID'] );
|
||||
//I think we need to change the APP_STATUS to completed,
|
||||
|
||||
//Throw Message-Events - BpmnEvent - END-MESSAGE-EVENT
|
||||
if (isset($nextDel["TAS_UID_DUMMY"])) {
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
|
||||
$case->throwMessageEventBetweenElementOriginAndElementDest(
|
||||
$currentDelegation["TAS_UID"],
|
||||
$nextDel["TAS_UID_DUMMY"],
|
||||
$appFields
|
||||
);
|
||||
}
|
||||
break;
|
||||
case TASK_FINISH_TASK:
|
||||
$iAppThreadIndex = $appFields['DEL_THREAD'];
|
||||
@@ -681,11 +706,19 @@ class Derivation
|
||||
}
|
||||
} //end switch
|
||||
|
||||
|
||||
if ($canDerivate) {
|
||||
$aSP = isset( $aSP ) ? $aSP : null;
|
||||
$iNewDelIndex = $this->doDerivation( $currentDelegation, $nextDel, $appFields, $aSP );
|
||||
|
||||
//Throw Message-Events
|
||||
$case = new \ProcessMaker\BusinessModel\Cases();
|
||||
|
||||
$case->throwMessageEventBetweenElementOriginAndElementDest(
|
||||
$currentDelegation["TAS_UID"],
|
||||
$nextDel["TAS_UID"],
|
||||
$appFields
|
||||
);
|
||||
|
||||
//Create record in table APP_ASSIGN_SELF_SERVICE_VALUE
|
||||
$task = new Task();
|
||||
$arrayNextTaskData = $task->load($nextDel["TAS_UID"]);
|
||||
|
||||
@@ -6,7 +6,7 @@ require_once 'classes/model/om/BaseBpmnFlow.php';
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'BPMN_FLOW' table.
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* You should add additional methods to this class to meet the
|
||||
* application requirements. This class will only be generated as
|
||||
@@ -58,7 +58,11 @@ class BpmnFlow extends BaseBpmnFlow
|
||||
$c = new Criteria('workflow');
|
||||
|
||||
foreach ($field as $key => $value) {
|
||||
$c->add($key, $value, Criteria::EQUAL);
|
||||
if (is_array($value)) {
|
||||
$c->add($key, $value[0], $value[1]);
|
||||
} else {
|
||||
$c->add($key, $value, Criteria::EQUAL);
|
||||
}
|
||||
}
|
||||
|
||||
return BpmnFlowPeer::doSelect($c);
|
||||
@@ -145,3 +149,4 @@ class BpmnFlow extends BaseBpmnFlow
|
||||
}*/
|
||||
|
||||
} // BpmnFlow
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ class TaskMapBuilder
|
||||
|
||||
$tMap->addColumn('TAS_SELFSERVICE_EXECUTION', 'TasSelfserviceExecution', 'string', CreoleTypes::VARCHAR, false, 15);
|
||||
|
||||
$tMap->addValidator('TAS_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'NORMAL|ADHOC|SUBPROCESS|HIDDEN|GATEWAYTOGATEWAY|WEBENTRYEVENT|START-MESSAGE-EVENT|END-MESSAGE-EVENT|INTERMEDIATE-START-MESSAGE-EVENT|INTERMEDIATE-END-MESSAGE-EVENT', 'Please enter a valid value for TAS_TYPE');
|
||||
$tMap->addValidator('TAS_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'NORMAL|ADHOC|SUBPROCESS|HIDDEN|GATEWAYTOGATEWAY|WEBENTRYEVENT|END-MESSAGE-EVENT|START-MESSAGE-EVENT|INTERMEDIATE-THROW-MESSAGE-EVENT|INTERMEDIATE-CATCH-MESSAGE-EVENT', 'Please enter a valid value for TAS_TYPE');
|
||||
|
||||
$tMap->addValidator('TAS_TIMEUNIT', 'validValues', 'propel.validator.ValidValuesValidator', 'MINUTES|HOURS|DAYS|WEEKS|MONTHS', 'Please select a valid value for TAS_TIMEUNIT.');
|
||||
|
||||
|
||||
@@ -1248,7 +1248,7 @@
|
||||
<column name="TAS_SELFSERVICE_EXECUTION" type="VARCHAR" size="15" default="EVERY_TIME"/>
|
||||
|
||||
<validator column="TAS_TYPE">
|
||||
<rule name="validValues" value="NORMAL|ADHOC|SUBPROCESS|HIDDEN|GATEWAYTOGATEWAY|WEBENTRYEVENT|START-MESSAGE-EVENT|END-MESSAGE-EVENT|INTERMEDIATE-START-MESSAGE-EVENT|INTERMEDIATE-END-MESSAGE-EVENT" message="Please enter a valid value for TAS_TYPE"/>
|
||||
<rule name="validValues" value="NORMAL|ADHOC|SUBPROCESS|HIDDEN|GATEWAYTOGATEWAY|WEBENTRYEVENT|END-MESSAGE-EVENT|START-MESSAGE-EVENT|INTERMEDIATE-THROW-MESSAGE-EVENT|INTERMEDIATE-CATCH-MESSAGE-EVENT" message="Please enter a valid value for TAS_TYPE"/>
|
||||
</validator>
|
||||
<validator column="TAS_TIMEUNIT">
|
||||
<rule name="validValues" value="MINUTES|HOURS|DAYS|WEEKS|MONTHS" message="Please select a valid value for TAS_TIMEUNIT."/>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
require_once 'classes/model/AppDelegation.php';
|
||||
$delegation = new AppDelegation();
|
||||
if( $delegation->alreadyRouted($_SESSION['APPLICATION'],$_SESSION['INDEX']) ) {
|
||||
if( $delegation->alreadyRouted($_SESSION['APPLICATION'],$_SESSION['INDEX']) ) {
|
||||
G::header('location: ../cases/casesListExtJs');
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
if (!isset($_SESSION['USER_LOGGED'])) {
|
||||
G::SendTemporalMessage( 'ID_LOGIN_AGAIN', 'warning', 'labels' );
|
||||
@@ -959,6 +959,12 @@ try {
|
||||
$title = htmlentities($aFields['TASK'][$sKey]['NEXT_TASK']['TAS_TITLE'], ENT_QUOTES, 'UTF-8');
|
||||
$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_TITLE'] = $title;
|
||||
|
||||
if (!preg_match("/\-1$/", $aFields["TASK"][$sKey]["NEXT_TASK"]["TAS_UID"]) &&
|
||||
$aFields["TASK"][$sKey]["NEXT_TASK"]["TAS_TYPE"] == "INTERMEDIATE-CATCH-MESSAGE-EVENT"
|
||||
) {
|
||||
$aFields["TASK"][$sKey]["NEXT_TASK"]["TAS_TITLE"] = G::LoadTranslation("ID_ROUTE_TO_TASK_INTERMEDIATE_CATCH_MESSAGE_EVENT");
|
||||
}
|
||||
|
||||
$G_PUBLISH->AddContent( 'smarty', $tplFile, '', '', $aFields );
|
||||
/*
|
||||
if (isset( $aFields['TASK'][1]['NEXT_TASK']['USER_ASSIGNED'])){
|
||||
@@ -1026,13 +1032,13 @@ try {
|
||||
}
|
||||
//Add content content step - End
|
||||
} catch (Exception $e) {
|
||||
//Check if the process is BPMN
|
||||
//Check if the process is BPMN
|
||||
if(isset($oProcessFieds['PRO_BPMN']) && $oProcessFieds['PRO_BPMN'] == 1){
|
||||
G::SendTemporalMessage( G::LoadTranslation( 'ID_BPMN_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 );
|
||||
G::SendTemporalMessage( G::LoadTranslation( 'ID_BPMN_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 );
|
||||
}else{
|
||||
G::SendTemporalMessage( G::LoadTranslation( 'ID_PROCESS_DEF_PROBLEM' ), 'error', 'string', 3, 100 );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$aMessage = array ();
|
||||
$aMessage['MESSAGE'] = $e->getMessage();
|
||||
$G_PUBLISH = new Publisher();
|
||||
|
||||
@@ -1970,4 +1970,130 @@ class Cases
|
||||
|
||||
return $aField;
|
||||
}
|
||||
|
||||
/**
|
||||
* Throw Message-Events for the Case
|
||||
*
|
||||
* @param string $elementOriginUid Unique id of Element Origin (unique id of Task)
|
||||
* @param string $elementDestUid Unique id of Element Dest (unique id of Task)
|
||||
* @param array $arrayApplicationData Case data
|
||||
*
|
||||
* return void
|
||||
*/
|
||||
public function throwMessageEventBetweenElementOriginAndElementDest($elementOriginUid, $elementDestUid, array $arrayApplicationData)
|
||||
{
|
||||
try {
|
||||
//Element origin and dest
|
||||
$messageEventTaskRelation = new \ProcessMaker\BusinessModel\MessageEventTaskRelation();
|
||||
|
||||
$arrayElement = array(
|
||||
"elementOrigin" => array("uid" => $elementOriginUid, "type" => "bpmnActivity"),
|
||||
"elementDest" => array("uid" => $elementDestUid, "type" => "bpmnActivity")
|
||||
);
|
||||
|
||||
foreach ($arrayElement as $key => $value) {
|
||||
$arrayMessageEventTaskRelationData = $messageEventTaskRelation->getMessageEventTaskRelationWhere(
|
||||
array(
|
||||
\MessageEventTaskRelationPeer::PRJ_UID => $arrayApplicationData["PRO_UID"],
|
||||
\MessageEventTaskRelationPeer::TAS_UID => $arrayElement[$key]["uid"]
|
||||
),
|
||||
true
|
||||
);
|
||||
|
||||
if (!is_null($arrayMessageEventTaskRelationData)) {
|
||||
$arrayElement[$key]["uid"] = $arrayMessageEventTaskRelationData["EVN_UID"];
|
||||
$arrayElement[$key]["type"] = "bpmnEvent";
|
||||
}
|
||||
}
|
||||
|
||||
$elementOriginUid = $arrayElement["elementOrigin"]["uid"];
|
||||
$elementOriginType = $arrayElement["elementOrigin"]["type"];
|
||||
$elementDestUid = $arrayElement["elementDest"]["uid"];
|
||||
$elementDestType = $arrayElement["elementDest"]["type"];
|
||||
|
||||
//Get Message-Events of throw type
|
||||
$bpmn = new \ProcessMaker\Project\Bpmn();
|
||||
|
||||
$arrayEvent = $bpmn->getMessageEventsOfThrowTypeBetweenElementOriginAndElementDest(
|
||||
$elementOriginUid,
|
||||
$elementOriginType,
|
||||
$elementDestUid,
|
||||
$elementDestType
|
||||
);
|
||||
|
||||
//Throw Message-Events
|
||||
$messageApplication = new \ProcessMaker\BusinessModel\MessageApplication();
|
||||
|
||||
foreach ($arrayEvent as $value) {
|
||||
//Message-Application throw
|
||||
$result = $messageApplication->create($arrayApplicationData["APP_UID"], $arrayApplicationData["PRO_UID"], $value[0], $arrayApplicationData);
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Catch Message-Events for the Cases
|
||||
*
|
||||
* @param bool $frontEnd Flag to represent progress bar
|
||||
*
|
||||
* return void
|
||||
*/
|
||||
public function catchMessageEvent($frontEnd = false)
|
||||
{
|
||||
try {
|
||||
\G::LoadClass("wsBase");
|
||||
|
||||
//Set variables
|
||||
$ws = new \wsBase();
|
||||
|
||||
//Get data
|
||||
$messageApplication = new \ProcessMaker\BusinessModel\MessageApplication();
|
||||
|
||||
$arrayMessageApplicationUnread = $messageApplication->getMessageApplications(array("messageApplicationStatus" => "UNREAD"));
|
||||
|
||||
foreach ($arrayMessageApplicationUnread["data"] as $value) {
|
||||
$arrayMessageApplicationData = $value;
|
||||
|
||||
$processUid = $arrayMessageApplicationData["PRJ_UID"];
|
||||
$taskUid = $arrayMessageApplicationData["TAS_UID"];
|
||||
|
||||
$messageApplicationUid = $arrayMessageApplicationData["MSGAPP_UID"];
|
||||
$messageApplicationCorrelation = $arrayMessageApplicationData["MSGAPP_CORRELATION"];
|
||||
|
||||
$messageEventDefinitionUserUid = $arrayMessageApplicationData["MSGED_USR_UID"];
|
||||
$messageEventDefinitionVariables = $arrayMessageApplicationData["MSGED_VARIABLES"];
|
||||
$messageEventDefinitionCorrelation = $arrayMessageApplicationData["MSGED_CORRELATION"];
|
||||
|
||||
switch ($arrayMessageApplicationData["EVN_TYPE"]) {
|
||||
case "START":
|
||||
if ($messageApplicationCorrelation == $messageEventDefinitionCorrelation &&
|
||||
$messageEventDefinitionUserUid != ""
|
||||
) {
|
||||
//Start and derivate new Case
|
||||
//$result = $ws->newCase($processUid, $messageEventDefinitionUserUid, $taskUid, array("NAME1" => "value1"));
|
||||
$result = $ws->newCase($processUid, $messageEventDefinitionUserUid, $taskUid, array());
|
||||
|
||||
$arrayResult = json_decode(json_encode($result), true);
|
||||
|
||||
if ($arrayResult["status_code"] == 0) {
|
||||
$applicationUid = $arrayResult["caseId"];
|
||||
|
||||
$result = $ws->derivateCase($messageEventDefinitionUserUid, $applicationUid, 1);
|
||||
|
||||
//Message-Application catch
|
||||
$result = $messageApplication->update($messageApplicationUid, array("MSGAPP_STATUS" => "READ"));
|
||||
}
|
||||
}
|
||||
break;
|
||||
case "INTERMEDIATE":
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,328 @@
|
||||
<?php
|
||||
namespace ProcessMaker\BusinessModel;
|
||||
|
||||
class MessageApplication
|
||||
{
|
||||
private $arrayFieldNameForException = array(
|
||||
"start" => "START",
|
||||
"limit" => "LIMIT"
|
||||
);
|
||||
|
||||
/**
|
||||
* Verify if exists the Message-Application
|
||||
*
|
||||
* @param string $messageApplicationUid Unique id of Message-Application
|
||||
*
|
||||
* return bool Return true if exists the Message-Application, false otherwise
|
||||
*/
|
||||
public function exists($messageApplicationUid)
|
||||
{
|
||||
try {
|
||||
$obj = \MessageApplicationPeer::retrieveByPK($messageApplicationUid);
|
||||
|
||||
return (!is_null($obj))? true : false;
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Message-Application for the Case
|
||||
*
|
||||
* @param string $applicationUid Unique id of Case
|
||||
* @param string $projectUid Unique id of Project
|
||||
* @param string $eventUidThrow Unique id of Event (throw)
|
||||
* @param array $arrayApplicationData Case data
|
||||
*
|
||||
* return bool Return true if been created, false otherwise
|
||||
*/
|
||||
public function create($applicationUid, $projectUid, $eventUidThrow, array $arrayApplicationData)
|
||||
{
|
||||
try {
|
||||
$flagCreate = true;
|
||||
|
||||
//Set data
|
||||
//Message-Event-Relation - Get unique id of Event (catch)
|
||||
$messageEventRelation = new \ProcessMaker\BusinessModel\MessageEventRelation();
|
||||
|
||||
$arrayMessageEventRelationData = $messageEventRelation->getMessageEventRelationWhere(
|
||||
array(
|
||||
\MessageEventRelationPeer::PRJ_UID => $projectUid,
|
||||
\MessageEventRelationPeer::EVN_UID_THROW => $eventUidThrow
|
||||
),
|
||||
true
|
||||
);
|
||||
|
||||
if (!is_null($arrayMessageEventRelationData)) {
|
||||
$eventUidCatch = $arrayMessageEventRelationData["EVN_UID_CATCH"];
|
||||
} else {
|
||||
$flagCreate = false;
|
||||
}
|
||||
|
||||
//Message-Application - Get data ($eventUidThrow)
|
||||
$messageEventDefinition = new \ProcessMaker\BusinessModel\MessageEventDefinition();
|
||||
|
||||
if ($messageEventDefinition->existsEvent($projectUid, $eventUidThrow)) {
|
||||
$arrayMessageEventDefinitionData = $messageEventDefinition->getMessageEventDefinitionByEvent($projectUid, $eventUidThrow, true);
|
||||
|
||||
$arrayMessageApplicationVariables = $arrayMessageEventDefinitionData["MSGED_VARIABLES"];
|
||||
$messageApplicationCorrelation = \G::replaceDataField($arrayMessageEventDefinitionData["MSGED_CORRELATION"], $arrayApplicationData["APP_DATA"]);
|
||||
|
||||
foreach ($arrayMessageApplicationVariables as $key => $value) {
|
||||
$arrayMessageApplicationVariables[$key] = \G::replaceDataField($value, $arrayApplicationData["APP_DATA"]);
|
||||
}
|
||||
} else {
|
||||
$flagCreate = false;
|
||||
}
|
||||
|
||||
if (!$flagCreate) {
|
||||
//Return
|
||||
return false;
|
||||
}
|
||||
|
||||
//Create
|
||||
$cnn = \Propel::getConnection("workflow");
|
||||
|
||||
try {
|
||||
$messageApplication = new \MessageApplication();
|
||||
|
||||
$messageApplicationUid = \ProcessMaker\Util\Common::generateUID();
|
||||
|
||||
$messageApplication->setMsgappUid($messageApplicationUid);
|
||||
$messageApplication->setAppUid($applicationUid);
|
||||
$messageApplication->setPrjUid($projectUid);
|
||||
$messageApplication->setEvnUidThrow($eventUidThrow);
|
||||
$messageApplication->setEvnUidCatch($eventUidCatch);
|
||||
$messageApplication->setMsgappVariables(serialize($arrayMessageApplicationVariables));
|
||||
$messageApplication->setMsgappCorrelation($messageApplicationCorrelation);
|
||||
$messageApplication->setMsgappThrowDate("now");
|
||||
|
||||
if ($messageApplication->validate()) {
|
||||
$cnn->begin();
|
||||
|
||||
$result = $messageApplication->save();
|
||||
|
||||
$cnn->commit();
|
||||
|
||||
//Return
|
||||
return true;
|
||||
} else {
|
||||
$msg = "";
|
||||
|
||||
foreach ($messageApplication->getValidationFailures() as $validationFailure) {
|
||||
$msg = $msg . (($msg != "")? "\n" : "") . $validationFailure->getMessage();
|
||||
}
|
||||
|
||||
throw new \Exception(\G::LoadTranslation("ID_RECORD_CANNOT_BE_CREATED") . (($msg != "")? "\n" . $msg : ""));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$cnn->rollback();
|
||||
|
||||
throw $e;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update Message-Application
|
||||
*
|
||||
* @param string $messageApplicationUid Unique id of Message-Application
|
||||
* @param array $arrayData Data
|
||||
*
|
||||
* return bool Return true if been updated, false otherwise
|
||||
*/
|
||||
public function update($messageApplicationUid, array $arrayData)
|
||||
{
|
||||
try {
|
||||
//Verify data
|
||||
if (!$this->exists($messageApplicationUid)) {
|
||||
//Return
|
||||
return false;
|
||||
}
|
||||
|
||||
//Update
|
||||
$cnn = \Propel::getConnection("workflow");
|
||||
|
||||
try {
|
||||
$messageApplication = \MessageApplicationPeer::retrieveByPK($messageApplicationUid);
|
||||
|
||||
$messageApplication->fromArray($arrayData, \BasePeer::TYPE_FIELDNAME);
|
||||
|
||||
$messageApplication->setMsgappCatchDate("now");
|
||||
|
||||
if ($messageApplication->validate()) {
|
||||
$cnn->begin();
|
||||
|
||||
$result = $messageApplication->save();
|
||||
|
||||
$cnn->commit();
|
||||
|
||||
//Return
|
||||
return true;
|
||||
} else {
|
||||
$msg = "";
|
||||
|
||||
foreach ($messageApplication->getValidationFailures() as $validationFailure) {
|
||||
$msg = $msg . (($msg != "")? "\n" : "") . $validationFailure->getMessage();
|
||||
}
|
||||
|
||||
throw new \Exception(\G::LoadTranslation("ID_REGISTRY_CANNOT_BE_UPDATED") . (($msg != "")? "\n" . $msg : ""));
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
$cnn->rollback();
|
||||
|
||||
throw $e;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get criteria for Message-Application
|
||||
*
|
||||
* return object
|
||||
*/
|
||||
public function getMessageApplicationCriteria()
|
||||
{
|
||||
try {
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
$criteria->addSelectColumn(\MessageApplicationPeer::MSGAPP_UID);
|
||||
$criteria->addSelectColumn(\MessageApplicationPeer::APP_UID);
|
||||
$criteria->addSelectColumn(\MessageApplicationPeer::PRJ_UID);
|
||||
$criteria->addSelectColumn(\MessageApplicationPeer::EVN_UID_THROW);
|
||||
$criteria->addSelectColumn(\MessageApplicationPeer::EVN_UID_CATCH);
|
||||
$criteria->addSelectColumn(\MessageApplicationPeer::MSGAPP_VARIABLES);
|
||||
$criteria->addSelectColumn(\MessageApplicationPeer::MSGAPP_CORRELATION);
|
||||
$criteria->addSelectColumn(\MessageApplicationPeer::MSGAPP_THROW_DATE);
|
||||
$criteria->addSelectColumn(\MessageApplicationPeer::MSGAPP_CATCH_DATE);
|
||||
$criteria->addSelectColumn(\MessageApplicationPeer::MSGAPP_STATUS);
|
||||
|
||||
return $criteria;
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get all Message-Applications
|
||||
*
|
||||
* @param array $arrayFilterData Data of the filters
|
||||
* @param string $sortField Field name to sort
|
||||
* @param string $sortDir Direction of sorting (ASC, DESC)
|
||||
* @param int $start Start
|
||||
* @param int $limit Limit
|
||||
*
|
||||
* return array Return an array with all Message-Applications
|
||||
*/
|
||||
public function getMessageApplications($arrayFilterData = null, $sortField = null, $sortDir = null, $start = null, $limit = null)
|
||||
{
|
||||
try {
|
||||
$arrayMessageApplication = array();
|
||||
|
||||
//Verify data
|
||||
$process = new \ProcessMaker\BusinessModel\Process();
|
||||
|
||||
$process->throwExceptionIfDataNotMetPagerVarDefinition(array("start" => $start, "limit" => $limit), $this->arrayFieldNameForException);
|
||||
|
||||
//Get data
|
||||
if (!is_null($limit) && $limit . "" == "0") {
|
||||
return $arrayMessageApplication;
|
||||
}
|
||||
|
||||
//SQL
|
||||
$criteria = $this->getMessageApplicationCriteria();
|
||||
|
||||
$criteria->addSelectColumn(\BpmnEventPeer::EVN_UID);
|
||||
$criteria->addSelectColumn(\BpmnEventPeer::EVN_TYPE);
|
||||
$criteria->addSelectColumn(\BpmnEventPeer::EVN_MARKER);
|
||||
$criteria->addSelectColumn(\MessageEventDefinitionPeer::MSGED_USR_UID);
|
||||
$criteria->addSelectColumn(\MessageEventDefinitionPeer::MSGED_VARIABLES);
|
||||
$criteria->addSelectColumn(\MessageEventDefinitionPeer::MSGED_CORRELATION);
|
||||
$criteria->addSelectColumn(\MessageEventTaskRelationPeer::TAS_UID);
|
||||
|
||||
$arrayEventType = array("START", "INTERMEDIATE");
|
||||
$arrayEventMarker = array("MESSAGECATCH");
|
||||
|
||||
$criteria->addJoin(\MessageApplicationPeer::EVN_UID_CATCH, \BpmnEventPeer::EVN_UID, \Criteria::INNER_JOIN);
|
||||
$criteria->add(\BpmnEventPeer::EVN_TYPE, $arrayEventType, \Criteria::IN);
|
||||
$criteria->add(\BpmnEventPeer::EVN_MARKER, $arrayEventMarker, \Criteria::IN);
|
||||
|
||||
$criteria->addJoin(\MessageApplicationPeer::EVN_UID_CATCH, \MessageEventDefinitionPeer::EVN_UID, \Criteria::INNER_JOIN);
|
||||
|
||||
$criteria->addJoin(\MessageApplicationPeer::EVN_UID_CATCH, \MessageEventTaskRelationPeer::EVN_UID, \Criteria::INNER_JOIN);
|
||||
|
||||
if (!is_null($arrayFilterData) && is_array($arrayFilterData) && isset($arrayFilterData["messageApplicationStatus"]) && trim($arrayFilterData["messageApplicationStatus"]) != "") {
|
||||
$criteria->add(\MessageApplicationPeer::MSGAPP_STATUS, $arrayFilterData["messageApplicationStatus"], \Criteria::EQUAL);
|
||||
}
|
||||
|
||||
//Number records total
|
||||
$criteriaCount = clone $criteria;
|
||||
|
||||
$criteriaCount->clearSelectColumns();
|
||||
$criteriaCount->addSelectColumn("COUNT(" . \MessageApplicationPeer::MSGAPP_UID . ") AS NUM_REC");
|
||||
|
||||
$rsCriteriaCount = \MessageApplicationPeer::doSelectRS($criteriaCount);
|
||||
$rsCriteriaCount->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$rsCriteriaCount->next();
|
||||
$row = $rsCriteriaCount->getRow();
|
||||
|
||||
$numRecTotal = $row["NUM_REC"];
|
||||
|
||||
//SQL
|
||||
if (!is_null($sortField) && trim($sortField) != "") {
|
||||
$sortField = strtoupper($sortField);
|
||||
|
||||
if (in_array($sortField, array("MSGAPP_THROW_DATE", "MSGAPP_CATCH_DATE", "MSGAPP_STATUS"))) {
|
||||
$sortField = \MessageApplicationPeer::TABLE_NAME . "." . $sortField;
|
||||
} else {
|
||||
$sortField = \MessageApplicationPeer::MSGAPP_THROW_DATE;
|
||||
}
|
||||
} else {
|
||||
$sortField = \MessageApplicationPeer::MSGAPP_THROW_DATE;
|
||||
}
|
||||
|
||||
if (!is_null($sortDir) && trim($sortDir) != "" && strtoupper($sortDir) == "DESC") {
|
||||
$criteria->addDescendingOrderByColumn($sortField);
|
||||
} else {
|
||||
$criteria->addAscendingOrderByColumn($sortField);
|
||||
}
|
||||
|
||||
if (!is_null($start)) {
|
||||
$criteria->setOffset((int)($start));
|
||||
}
|
||||
|
||||
if (!is_null($limit)) {
|
||||
$criteria->setLimit((int)($limit));
|
||||
}
|
||||
|
||||
$rsCriteria = \MessageApplicationPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
while ($rsCriteria->next()) {
|
||||
$row = $rsCriteria->getRow();
|
||||
|
||||
$row["MSGAPP_VARIABLES"] = unserialize($row["MSGAPP_VARIABLES"]);
|
||||
$row["MSGED_VARIABLES"] = unserialize($row["MSGED_VARIABLES"]);
|
||||
|
||||
$arrayMessageApplication[] = $row;
|
||||
}
|
||||
|
||||
//Return
|
||||
return array(
|
||||
"total" => $numRecTotal,
|
||||
"start" => (int)((!is_null($start))? $start : 0),
|
||||
"limit" => (int)((!is_null($limit))? $limit : 0),
|
||||
"filter" => (!is_null($arrayFilterData) && is_array($arrayFilterData) && isset($arrayFilterData["messageApplicationStatus"]))? $arrayFilterData["messageApplicationStatus"] : "",
|
||||
"data" => $arrayMessageApplication
|
||||
);
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -220,9 +220,7 @@ class MessageEventDefinition
|
||||
}
|
||||
|
||||
if (isset($arrayData["MSGT_UID"]) && $arrayData["MSGT_UID"] . "" != "") {
|
||||
if (!$messageType->exists($arrayData["MSGT_UID"])) {
|
||||
throw new \Exception(\G::LoadTranslation("ID_MESSAGE_TYPE_NOT_EXIST", array($this->arrayFieldNameForException["messageTypeUid"], $arrayData["MSGT_UID"])));
|
||||
}
|
||||
$messageType->throwExceptionIfNotExistsMessageType($arrayData["MSGT_UID"], $this->arrayFieldNameForException["messageTypeUid"]);
|
||||
}
|
||||
|
||||
$flagCheckData = false;
|
||||
@@ -335,7 +333,7 @@ class MessageEventDefinition
|
||||
$bpmnEvent = \BpmnEventPeer::retrieveByPK($arrayData["EVN_UID"]);
|
||||
|
||||
//Event - START-MESSAGE-EVENT
|
||||
if (is_null($bpmnEvent) && $bpmnEvent->getEvnType() == "START" && $bpmnEvent->getEvnMarker() == "MESSAGECATCH") {
|
||||
if (!is_null($bpmnEvent) && $bpmnEvent->getEvnType() == "START" && $bpmnEvent->getEvnMarker() == "MESSAGECATCH") {
|
||||
//Message-Event-Task-Relation - Get Task
|
||||
$messageEventTaskRelation = new \ProcessMaker\BusinessModel\MessageEventTaskRelation();
|
||||
|
||||
@@ -438,7 +436,7 @@ class MessageEventDefinition
|
||||
$bpmnEvent = \BpmnEventPeer::retrieveByPK($arrayMessageEventDefinitionData["EVN_UID"]);
|
||||
|
||||
//Event - START-MESSAGE-EVENT
|
||||
if (is_null($bpmnEvent) && $bpmnEvent->getEvnType() == "START" && $bpmnEvent->getEvnMarker() == "MESSAGECATCH") {
|
||||
if (!is_null($bpmnEvent) && $bpmnEvent->getEvnType() == "START" && $bpmnEvent->getEvnMarker() == "MESSAGECATCH") {
|
||||
//Message-Event-Task-Relation - Get Task
|
||||
$messageEventTaskRelation = new \ProcessMaker\BusinessModel\MessageEventTaskRelation();
|
||||
|
||||
|
||||
@@ -322,7 +322,11 @@ class MessageEventRelation
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
foreach ($arrayCondition as $key => $value) {
|
||||
$criteria->add($key, $value, \Criteria::EQUAL);
|
||||
if (is_array($value)) {
|
||||
$criteria->add($key, $value[0], $value[1]);
|
||||
} else {
|
||||
$criteria->add($key, $value, \Criteria::EQUAL);
|
||||
}
|
||||
}
|
||||
|
||||
$result = \MessageEventRelationPeer::doDelete($criteria);
|
||||
@@ -404,5 +408,44 @@ class MessageEventRelation
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get data of a Message-Event-Relation
|
||||
*
|
||||
* @param array $arrayCondition Conditions
|
||||
* @param bool $flagGetRecord Value that set the getting
|
||||
*
|
||||
* return array Return an array with data of a Message-Event-Relation, otherwise null
|
||||
*/
|
||||
public function getMessageEventRelationWhere(array $arrayCondition, $flagGetRecord = false)
|
||||
{
|
||||
try {
|
||||
//Get data
|
||||
$criteria = $this->getMessageEventRelationCriteria();
|
||||
|
||||
foreach ($arrayCondition as $key => $value) {
|
||||
if (is_array($value)) {
|
||||
$criteria->add($key, $value[0], $value[1]);
|
||||
} else {
|
||||
$criteria->add($key, $value, \Criteria::EQUAL);
|
||||
}
|
||||
}
|
||||
|
||||
$rsCriteria = \MessageEventRelationPeer::doSelectRS($criteria);
|
||||
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
if ($rsCriteria->next()) {
|
||||
$row = $rsCriteria->getRow();
|
||||
|
||||
//Return
|
||||
return (!$flagGetRecord)? $this->getMessageEventRelationDataFromRecord($row) : $row;
|
||||
} else {
|
||||
//Return
|
||||
return null;
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -231,7 +231,11 @@ class MessageEventTaskRelation
|
||||
$criteria = new \Criteria("workflow");
|
||||
|
||||
foreach ($arrayCondition as $key => $value) {
|
||||
$criteria->add($key, $value, \Criteria::EQUAL);
|
||||
if (is_array($value)) {
|
||||
$criteria->add($key, $value[0], $value[1]);
|
||||
} else {
|
||||
$criteria->add($key, $value, \Criteria::EQUAL);
|
||||
}
|
||||
}
|
||||
|
||||
$result = \MessageEventTaskRelationPeer::doDelete($criteria);
|
||||
@@ -320,7 +324,7 @@ class MessageEventTaskRelation
|
||||
* @param array $arrayCondition Conditions
|
||||
* @param bool $flagGetRecord Value that set the getting
|
||||
*
|
||||
* return array Return an array with data of a Message-Event-Task-Relation
|
||||
* return array Return an array with data of a Message-Event-Task-Relation, otherwise null
|
||||
*/
|
||||
public function getMessageEventTaskRelationWhere(array $arrayCondition, $flagGetRecord = false)
|
||||
{
|
||||
@@ -329,7 +333,11 @@ class MessageEventTaskRelation
|
||||
$criteria = $this->getMessageEventTaskRelationCriteria();
|
||||
|
||||
foreach ($arrayCondition as $key => $value) {
|
||||
$criteria->add($key, $value, \Criteria::EQUAL);
|
||||
if (is_array($value)) {
|
||||
$criteria->add($key, $value[0], $value[1]);
|
||||
} else {
|
||||
$criteria->add($key, $value, \Criteria::EQUAL);
|
||||
}
|
||||
}
|
||||
|
||||
$rsCriteria = \MessageEventTaskRelationPeer::doSelectRS($criteria);
|
||||
|
||||
@@ -24,10 +24,10 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
|
||||
private $arrayTaskAttribute = array(
|
||||
"gateway-to-gateway" => array("type" => "GATEWAYTOGATEWAY", "prefix" => "gtg-"),
|
||||
"start-message-event" => array("type" => "START-MESSAGE-EVENT", "prefix" => "sme-"),
|
||||
"end-message-event" => array("type" => "END-MESSAGE-EVENT", "prefix" => "eme-"),
|
||||
"intermediate-start-message-event" => array("type" => "INTERMEDIATE-START-MESSAGE-EVENT", "prefix" => "isme-"),
|
||||
"intermediate-end-message-event" => array("type" => "INTERMEDIATE-END-MESSAGE-EVENT", "prefix" => "ieme-")
|
||||
"start-message-event" => array("type" => "START-MESSAGE-EVENT", "prefix" => "sme-"),
|
||||
"intermediate-throw-message-event" => array("type" => "INTERMEDIATE-THROW-MESSAGE-EVENT", "prefix" => "itme-"),
|
||||
"intermediate-catch-message-event" => array("type" => "INTERMEDIATE-CATCH-MESSAGE-EVENT", "prefix" => "icme-")
|
||||
);
|
||||
|
||||
private $arrayMessageEventTaskRelation = array();
|
||||
@@ -599,9 +599,9 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
));
|
||||
|
||||
if ($elementType == "bpmnEvent" &&
|
||||
in_array($key, array("start-message-event", "end-message-event", "intermediate-start-message-event"))
|
||||
in_array($key, array("end-message-event", "start-message-event", "intermediate-catch-message-event"))
|
||||
) {
|
||||
if ($key == "intermediate-start-message-event") {
|
||||
if ($key == "intermediate-catch-message-event") {
|
||||
//Task - User
|
||||
//Assign to admin
|
||||
$task = new \Tasks();
|
||||
@@ -681,6 +681,7 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
|
||||
//Flows
|
||||
$arrayFlow = \BpmnFlow::findAllBy(array(
|
||||
\BpmnFlowPeer::FLO_TYPE => array("MESSAGE", \Criteria::NOT_EQUAL),
|
||||
\BpmnFlowPeer::FLO_ELEMENT_ORIGIN => $gatewayUid,
|
||||
\BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE => "bpmnGateway"
|
||||
));
|
||||
@@ -770,21 +771,26 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
if (!is_null($arrayEventData) &&
|
||||
in_array($arrayEventData["EVN_TYPE"], $arrayEventType) && in_array($arrayEventData["EVN_MARKER"], $arrayEventMarker)
|
||||
) {
|
||||
//Event - INTERMEDIATE-START-MESSAGE-EVENT
|
||||
//Event - INTERMEDIATE-CATCH-MESSAGE-EVENT
|
||||
if ($arrayEventData["EVN_TYPE"] == "INTERMEDIATE" && $arrayEventData["EVN_MARKER"] == "MESSAGECATCH") {
|
||||
$taskUid = $this->createTaskByElement(
|
||||
$eventUid,
|
||||
"bpmnEvent",
|
||||
"intermediate-start-message-event"
|
||||
"intermediate-catch-message-event"
|
||||
);
|
||||
|
||||
$result = $this->wp->addRoute($activityUid, $taskUid, $routeType, $routeCondition, $routeDefault);
|
||||
|
||||
$activityUid = $taskUid;
|
||||
|
||||
$routeType = "SEQUENTIAL";
|
||||
$routeCondition = "";
|
||||
$routeDefault = 0;
|
||||
}
|
||||
|
||||
//Flows
|
||||
$arrayFlow = \BpmnFlow::findAllBy(array(
|
||||
\BpmnFlowPeer::FLO_TYPE => array("MESSAGE", \Criteria::NOT_EQUAL),
|
||||
\BpmnFlowPeer::FLO_ELEMENT_ORIGIN => $eventUid,
|
||||
\BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE => "bpmnEvent"
|
||||
));
|
||||
@@ -795,7 +801,7 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
switch ($arrayFlowData["FLO_ELEMENT_DEST_TYPE"]) {
|
||||
case "bpmnActivity":
|
||||
//Event ----> Activity
|
||||
$result = $this->wp->addRoute($activityUid, $arrayFlowData["FLO_ELEMENT_DEST"], "SEQUENTIAL");
|
||||
$result = $this->wp->addRoute($activityUid, $arrayFlowData["FLO_ELEMENT_DEST"], $routeType, $routeCondition, $routeDefault);
|
||||
break;
|
||||
case "bpmnGateway":
|
||||
//Event ----> Gateway
|
||||
@@ -814,7 +820,7 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
//$event->getEvnMarker(): EMPTY or MESSAGETHROW
|
||||
switch ($event->getEvnMarker()) {
|
||||
case "EMPTY":
|
||||
$result = $this->wp->addRoute($activityUid, -1, "SEQUENTIAL");
|
||||
$result = $this->wp->addRoute($activityUid, -1, $routeType, $routeCondition, $routeDefault);
|
||||
break;
|
||||
case "MESSAGETHROW":
|
||||
$taskUid = $this->createTaskByElement(
|
||||
@@ -823,13 +829,13 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
"end-message-event"
|
||||
);
|
||||
|
||||
$result = $this->wp->addRoute($activityUid, $taskUid, "SEQUENTIAL");
|
||||
$result = $this->wp->addRoute($activityUid, $taskUid, $routeType, $routeCondition, $routeDefault);
|
||||
$result = $this->wp->addRoute($taskUid, -1, "SEQUENTIAL");
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case "INTERMEDIATE":
|
||||
$this->mapBpmnEventToWorkflowRoutes($activityUid, $arrayFlowData["FLO_ELEMENT_DEST"]);
|
||||
$this->mapBpmnEventToWorkflowRoutes($activityUid, $arrayFlowData["FLO_ELEMENT_DEST"], $routeType, $routeCondition, $routeDefault);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -865,6 +871,7 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
|
||||
//Flows
|
||||
$arrayFlow = \BpmnFlow::findAllBy(array(
|
||||
\BpmnFlowPeer::FLO_TYPE => array("MESSAGE", \Criteria::NOT_EQUAL),
|
||||
\BpmnFlowPeer::FLO_ELEMENT_ORIGIN => $activity["ACT_UID"],
|
||||
\BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE => "bpmnActivity"
|
||||
));
|
||||
@@ -926,9 +933,7 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
foreach ($this->getEvents() as $value) {
|
||||
$event = $value;
|
||||
|
||||
if (!isset($this->arrayMessageEventTaskRelation[$event["EVN_UID"]]) &&
|
||||
in_array($event["EVN_TYPE"], $arrayEventType) && in_array($event["EVN_MARKER"], $arrayEventMarker)
|
||||
) {
|
||||
if (in_array($event["EVN_TYPE"], $arrayEventType) && in_array($event["EVN_MARKER"], $arrayEventMarker)) {
|
||||
switch ($event["EVN_TYPE"]) {
|
||||
case "START":
|
||||
$taskUid = $this->createTaskByElement(
|
||||
@@ -1737,13 +1742,14 @@ class BpmnWorkflow extends Project\Bpmn
|
||||
public function createMessageEventRelationByBpmnFlow(\BpmnFlow $bpmnFlow)
|
||||
{
|
||||
try {
|
||||
$messageEventRelation = new \ProcessMaker\BusinessModel\MessageEventRelation();
|
||||
|
||||
$messageEventRelationUid = "";
|
||||
|
||||
if ($bpmnFlow->getFloType() == "MESSAGE" &&
|
||||
$bpmnFlow->getFloElementOriginType() == "bpmnEvent" && $bpmnFlow->getFloElementDestType() == "bpmnEvent"
|
||||
$bpmnFlow->getFloElementOriginType() == "bpmnEvent" && $bpmnFlow->getFloElementDestType() == "bpmnEvent" &&
|
||||
!$messageEventRelation->existsEventRelation($bpmnFlow->getPrjUid(), $bpmnFlow->getFloElementOrigin(), $bpmnFlow->getFloElementDest())
|
||||
) {
|
||||
$messageEventRelation = new \ProcessMaker\BusinessModel\MessageEventRelation();
|
||||
|
||||
$arrayResult = $messageEventRelation->create(
|
||||
$bpmnFlow->getPrjUid(),
|
||||
array(
|
||||
|
||||
@@ -1340,5 +1340,95 @@ class Bpmn extends Handler
|
||||
throw $oException;
|
||||
}
|
||||
}
|
||||
|
||||
public function getElementsBetweenElementOriginAndElementDest(
|
||||
$elementOriginUid,
|
||||
$elementOriginType,
|
||||
$elementDestUid,
|
||||
$elementDestType,
|
||||
$index
|
||||
) {
|
||||
try {
|
||||
if ($elementOriginType == $elementDestType && $elementOriginUid == $elementDestUid) {
|
||||
$arrayEvent = array();
|
||||
$arrayEvent[$index] = array($elementDestUid, $elementDestType);
|
||||
|
||||
//Return
|
||||
return $arrayEvent;
|
||||
} else {
|
||||
//Flows
|
||||
$arrayFlow = \BpmnFlow::findAllBy(array(
|
||||
\BpmnFlowPeer::FLO_TYPE => array("MESSAGE", \Criteria::NOT_EQUAL),
|
||||
\BpmnFlowPeer::FLO_ELEMENT_ORIGIN => $elementOriginUid,
|
||||
\BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE => $elementOriginType
|
||||
));
|
||||
|
||||
foreach ($arrayFlow as $value) {
|
||||
$arrayFlowData = $value->toArray();
|
||||
|
||||
$arrayEvent = $this->getElementsBetweenElementOriginAndElementDest(
|
||||
$arrayFlowData["FLO_ELEMENT_DEST"],
|
||||
$arrayFlowData["FLO_ELEMENT_DEST_TYPE"],
|
||||
$elementDestUid,
|
||||
$elementDestType,
|
||||
$index + 1
|
||||
);
|
||||
|
||||
if (count($arrayEvent) > 0) {
|
||||
$arrayEvent[$index] = array($elementOriginUid, $elementOriginType);
|
||||
|
||||
//Return
|
||||
return $arrayEvent;
|
||||
}
|
||||
}
|
||||
|
||||
//Return
|
||||
return array();
|
||||
}
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
public function getMessageEventsOfThrowTypeBetweenElementOriginAndElementDest(
|
||||
$elementOriginUid,
|
||||
$elementOriginType,
|
||||
$elementDestUid,
|
||||
$elementDestType
|
||||
) {
|
||||
try {
|
||||
$arrayEventType = array("END", "INTERMEDIATE");
|
||||
$arrayEventMarker = array("MESSAGETHROW");
|
||||
|
||||
$arrayEventAux = $this->getElementsBetweenElementOriginAndElementDest(
|
||||
$elementOriginUid,
|
||||
$elementOriginType,
|
||||
$elementDestUid,
|
||||
$elementDestType,
|
||||
0
|
||||
);
|
||||
|
||||
ksort($arrayEventAux);
|
||||
|
||||
$arrayEvent = array();
|
||||
|
||||
foreach ($arrayEventAux as $value) {
|
||||
if ($value[1] == "bpmnEvent") {
|
||||
$event = \BpmnEventPeer::retrieveByPK($value[0]);
|
||||
|
||||
if (!is_null($event) &&
|
||||
in_array($event->getEvnType(), $arrayEventType) && in_array($event->getEvnMarker(), $arrayEventMarker)
|
||||
) {
|
||||
$arrayEvent[] = $value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Return
|
||||
return $arrayEvent;
|
||||
} catch (\Exception $e) {
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -61,10 +61,17 @@
|
||||
</tr>
|
||||
{/if}
|
||||
{if $PROCESS.ERROR eq '' }
|
||||
<tr>
|
||||
<td class="FormLabel" width="100">{$NEXT_TASK_LABEL}:</td>
|
||||
<td class="FormFieldContent">{$data.NEXT_TASK.TAS_TITLE}{$data.NEXT_TASK.TAS_HIDDEN_FIELD}</td>
|
||||
</tr>
|
||||
{if $data.NEXT_TASK.TAS_TYPE != "INTERMEDIATE-CATCH-MESSAGE-EVENT"}
|
||||
<tr>
|
||||
<td class="FormLabel" width="100">{$NEXT_TASK_LABEL}:</td>
|
||||
<td class="FormFieldContent">{$data.NEXT_TASK.TAS_TITLE}{$data.NEXT_TASK.TAS_HIDDEN_FIELD}</td>
|
||||
</tr>
|
||||
{else}
|
||||
<tr>
|
||||
<td class="FormLabel" width="100"></td>
|
||||
<td class="FormFieldContent">{$data.NEXT_TASK.TAS_TITLE}{$data.NEXT_TASK.TAS_HIDDEN_FIELD}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
{if not $data.NEXT_TASK.ROU_FINISH_FLAG }
|
||||
{if $data.NEXT_TASK.TAS_NEXT eq 'STATIC_MI' || $data.NEXT_TASK.TAS_NEXT eq 'CANCEL_MI'}
|
||||
@@ -79,10 +86,17 @@
|
||||
{/if}
|
||||
{if $data.NEXT_TASK.TAS_NEXT eq ''}
|
||||
{if $data.NEXT_TASK.USR_UID neq ''}
|
||||
<tr>
|
||||
<td class="FormLabel" width="100">{$EMPLOYEE}:</td>
|
||||
<td class="FormFieldContent">{$data.NEXT_TASK.USR_UID}{$data.NEXT_TASK.USR_HIDDEN_FIELD}</td>
|
||||
</tr>
|
||||
{if $data.NEXT_TASK.TAS_TYPE != "INTERMEDIATE-CATCH-MESSAGE-EVENT"}
|
||||
<tr>
|
||||
<td class="FormLabel" width="100">{$EMPLOYEE}:</td>
|
||||
<td class="FormFieldContent">{$data.NEXT_TASK.USR_UID}{$data.NEXT_TASK.USR_HIDDEN_FIELD}</td>
|
||||
</tr>
|
||||
{else}
|
||||
<tr>
|
||||
<td class="FormLabel" width="100"></td>
|
||||
<td class="FormFieldContent">{$data.NEXT_TASK.USR_HIDDEN_FIELD}</td>
|
||||
</tr>
|
||||
{/if}
|
||||
{/if}
|
||||
{/if}
|
||||
{if $data.NEXT_TASK.TAS_TRANSFER_FLY eq 'true'}
|
||||
|
||||
Reference in New Issue
Block a user