PM-2576 "Support for Timer-Event (End-points and Backend)"

- Se han implementado los siguientes End-points:
    GET    /api/1.0/{workspace}/project/{prj_uid}/timer-events
    GET    /api/1.0/{workspace}/project/{prj_uid}/timer-event/{tmrevn_uid}
    GET    /api/1.0/{workspace}/project/{prj_uid}/timer-event/event/{evn_uid}
    POST   /api/1.0/{workspace}/project/{prj_uid}/timer-event
    PUT    /api/1.0/{workspace}/project/{prj_uid}/timer-event/{tmrevn_uid}
    DELETE /api/1.0/{workspace}/project/{prj_uid}/timer-event/{tmrevn_uid}
- Se han implementado la funcionalidad y los metodos necesarios para este nuevo elemento
  en el modulo "BPMN-DESIGNER Backend"
- Se han agregado las validaciones necesarias para filtrar los nuevos tipos de tasks en el
  listado del "New case"
- Se han agregado los metodos necesarios para este nuevo elemento en los modulos Export and Import
- Se han agregado los metodos necesarios para este nuevo elemento en el modulo "Delete process"
- Se a implementado la funcionalidad para este nuevo elemento en el modulo "Running case"
This commit is contained in:
Victor Saisa Lopez
2015-06-30 12:04:53 -04:00
parent a8deb38b4f
commit 8b21d386d2
21 changed files with 8907 additions and 5373 deletions

View File

@@ -249,7 +249,7 @@ class Cases
$rows[] = array('uid' => 'char', 'value' => 'char'); $rows[] = array('uid' => 'char', 'value' => 'char');
$tasks = array(); $tasks = array();
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT", "SCRIPT-TASK"); $arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT", "SCRIPT-TASK", "START-TIMER-EVENT", "INTERMEDIATE-CATCH-TIMER-EVENT");
$c = new Criteria(); $c = new Criteria();
$c->clearSelectColumns(); $c->clearSelectColumns();
@@ -7014,3 +7014,4 @@ class Cases
return $unserializedData; return $unserializedData;
} }
} }

View File

@@ -112,7 +112,7 @@ class Derivation
$arrayTaskData["NEXT_TASK"]["TAS_PARENT"] = ""; $arrayTaskData["NEXT_TASK"]["TAS_PARENT"] = "";
} }
$arrayTaskData["NEXT_TASK"]["USER_ASSIGNED"] = (!in_array($arrayTaskData["NEXT_TASK"]["TAS_TYPE"], array("GATEWAYTOGATEWAY", "END-MESSAGE-EVENT", "SCRIPT-TASK", "END-EMAIL-EVENT")))? $this->getNextAssignedUser($arrayTaskData) : array("USR_UID" => "", "USR_FULLNAME" => ""); $arrayTaskData["NEXT_TASK"]["USER_ASSIGNED"] = (!in_array($arrayTaskData["NEXT_TASK"]["TAS_TYPE"], array("GATEWAYTOGATEWAY", "END-MESSAGE-EVENT", "SCRIPT-TASK", "INTERMEDIATE-CATCH-TIMER-EVENT", "END-EMAIL-EVENT")))? $this->getNextAssignedUser($arrayTaskData) : array("USR_UID" => "", "USR_FULLNAME" => "");
} }
//Return //Return
@@ -237,7 +237,7 @@ class Derivation
} }
} else { } else {
if (in_array($arrayNextTaskData["TAS_TYPE"], array("END-MESSAGE-EVENT", "END-EMAIL-EVENT")) && if (in_array($arrayNextTaskData["TAS_TYPE"], array("END-MESSAGE-EVENT", "END-EMAIL-EVENT")) &&
$arrayNextTaskData["NEXT_TASK"]["TAS_UID"] == "-1" $arrayNextTaskData["NEXT_TASK"]["TAS_UID"] == "-1"
) { ) {
$arrayNextTaskData["NEXT_TASK"]["TAS_UID"] = $arrayNextTaskData["TAS_UID"] . "/" . $arrayNextTaskData["NEXT_TASK"]["TAS_UID"]; $arrayNextTaskData["NEXT_TASK"]["TAS_UID"] = $arrayNextTaskData["TAS_UID"] . "/" . $arrayNextTaskData["NEXT_TASK"]["TAS_UID"];
} }
@@ -593,13 +593,20 @@ class Derivation
//We close the current derivation, then we'll try to derivate to each defined route //We close the current derivation, then we'll try to derivate to each defined route
$this->case->CloseCurrentDelegation( $currentDelegation['APP_UID'], $currentDelegation['DEL_INDEX'] ); $this->case->CloseCurrentDelegation( $currentDelegation['APP_UID'], $currentDelegation['DEL_INDEX'] );
//Get data for current delegation (current Task)
$task = TaskPeer::retrieveByPK($currentDelegation["TAS_UID"]);
$currentDelegation["TAS_ASSIGN_TYPE"] = $task->getTasAssignType();
$currentDelegation["TAS_MI_COMPLETE_VARIABLE"] = $task->getTasMiCompleteVariable();
$currentDelegation["TAS_MI_INSTANCE_VARIABLE"] = $task->getTasMiInstanceVariable();
//Count how many tasks should be derivated. //Count how many tasks should be derivated.
//$countNextTask = count($nextDelegations); //$countNextTask = count($nextDelegations);
//$removeList = true; //$removeList = true;
foreach ($nextDelegations as $nextDel) { foreach ($nextDelegations as $nextDel) {
//BpmnEvent - END-MESSAGE-EVENT - Check and get unique id //BpmnEvent - END-MESSAGE-EVENT, END-EMAIL-EVENT
//BpmnEvent - END-EMAIL-EVENT - Check and get unique id //Check and get unique id
if (preg_match("/^(.{32})\/(\-1)$/", $nextDel["TAS_UID"], $arrayMatch)) { if (preg_match("/^(.{32})\/(\-1)$/", $nextDel["TAS_UID"], $arrayMatch)) {
$nextDel["TAS_UID"] = $arrayMatch[2]; $nextDel["TAS_UID"] = $arrayMatch[2];
$nextDel["TAS_UID_DUMMY"] = $arrayMatch[1]; $nextDel["TAS_UID_DUMMY"] = $arrayMatch[1];
@@ -624,12 +631,6 @@ class Derivation
continue; continue;
} }
} }
//get TAS_ASSIGN_TYPE for current Delegation
$oTask = new Task();
$aTask = $oTask->load( $currentDelegation['TAS_UID'] );
$currentDelegation['TAS_ASSIGN_TYPE'] = $aTask['TAS_ASSIGN_TYPE'];
$currentDelegation['TAS_MI_COMPLETE_VARIABLE'] = $aTask['TAS_MI_COMPLETE_VARIABLE'];
$currentDelegation['TAS_MI_INSTANCE_VARIABLE'] = $aTask['TAS_MI_INSTANCE_VARIABLE'];
//get open threads //get open threads
$openThreads = $this->case->GetOpenThreads( $currentDelegation['APP_UID'] ); $openThreads = $this->case->GetOpenThreads( $currentDelegation['APP_UID'] );
@@ -637,6 +638,9 @@ class Derivation
if (($nextDel['TAS_UID'] == TASK_FINISH_PROCESS) && (($openThreads + 1) > 1)) { if (($nextDel['TAS_UID'] == TASK_FINISH_PROCESS) && (($openThreads + 1) > 1)) {
$nextDel['TAS_UID'] = TASK_FINISH_TASK; $nextDel['TAS_UID'] = TASK_FINISH_TASK;
} }
$taskNextDel = TaskPeer::retrieveByPK($nextDel["TAS_UID"]); //Get data for next delegation (next Task)
switch ($nextDel['TAS_UID']) { switch ($nextDel['TAS_UID']) {
case TASK_FINISH_PROCESS: case TASK_FINISH_PROCESS:
/*Close all delegations of $currentDelegation['APP_UID'] */ /*Close all delegations of $currentDelegation['APP_UID'] */
@@ -644,29 +648,22 @@ class Derivation
$this->case->closeAllThreads( $currentDelegation['APP_UID'] ); $this->case->closeAllThreads( $currentDelegation['APP_UID'] );
//I think we need to change the APP_STATUS to completed, //I think we need to change the APP_STATUS to completed,
//BpmnEvent - END-MESSAGE-EVENT and END-EMAIL-EVENT //BpmnEvent - END-MESSAGE-EVENT, END-EMAIL-EVENT
if (isset($nextDel["TAS_UID_DUMMY"])) { if (isset($nextDel["TAS_UID_DUMMY"])) {
$taskDummy = TaskPeer::retrieveByPK($nextDel["TAS_UID_DUMMY"]); $taskDummy = TaskPeer::retrieveByPK($nextDel["TAS_UID_DUMMY"]);
switch ($taskDummy->getTasType()) { switch ($taskDummy->getTasType()) {
case "END-MESSAGE-EVENT": case "END-MESSAGE-EVENT":
//Throw Message-Events - BpmnEvent - END-MESSAGE-EVENT //Throw Message-Events - BpmnEvent - END-MESSAGE-EVENT
$case = new \ProcessMaker\BusinessModel\Cases(); $case = new \ProcessMaker\BusinessModel\Cases();
$case->throwMessageEventBetweenElementOriginAndElementDest( $case->throwMessageEventBetweenElementOriginAndElementDest($currentDelegation["TAS_UID"], $nextDel["TAS_UID_DUMMY"], $appFields);
$currentDelegation["TAS_UID"],
$nextDel["TAS_UID_DUMMY"],
$appFields
);
break; break;
case "END-EMAIL-EVENT": case "END-EMAIL-EVENT":
//Email Event //Email Event
$emailEvent = new \ProcessMaker\BusinessModel\EmailEvent(); $emailEvent = new \ProcessMaker\BusinessModel\EmailEvent();
$emailEvent->emailEventBetweenElementOriginAndElementDest( $emailEvent->emailEventBetweenElementOriginAndElementDest($currentDelegation["TAS_UID"], $nextDel["TAS_UID_DUMMY"], $appFields);
$currentDelegation["TAS_UID"],
$nextDel["TAS_UID_DUMMY"],
$appFields
);
break; break;
} }
} }
@@ -730,21 +727,15 @@ class Derivation
$case = new \ProcessMaker\BusinessModel\Cases(); $case = new \ProcessMaker\BusinessModel\Cases();
$case->throwMessageEventBetweenElementOriginAndElementDest($currentDelegation["TAS_UID"], $nextDel["TAS_UID"], $appFields); $case->throwMessageEventBetweenElementOriginAndElementDest($currentDelegation["TAS_UID"], $nextDel["TAS_UID"], $appFields);
//Email Event //Throw Email-Events
$emailEvent = new \ProcessMaker\BusinessModel\EmailEvent(); $emailEvent = new \ProcessMaker\BusinessModel\EmailEvent();
$emailEvent->emailEventBetweenElementOriginAndElementDest( $emailEvent->emailEventBetweenElementOriginAndElementDest($currentDelegation["TAS_UID"], $nextDel["TAS_UID"], $appFields);
$currentDelegation["TAS_UID"],
$nextDel["TAS_UID"],
$appFields
);
//Derivate //Derivate
$aSP = isset( $aSP ) ? $aSP : null; $aSP = isset( $aSP ) ? $aSP : null;
$taskNextDel = \TaskPeer::retrieveByPK($nextDel["TAS_UID"]);
$iNewDelIndex = $this->doDerivation( $currentDelegation, $nextDel, $appFields, $aSP ); $iNewDelIndex = $this->doDerivation( $currentDelegation, $nextDel, $appFields, $aSP );
//Execute Script-Task //Execute Script-Task
@@ -753,12 +744,11 @@ class Derivation
$appFields["APP_DATA"] = $scriptTask->execScriptByActivityUid($nextDel["TAS_UID"], $appFields); $appFields["APP_DATA"] = $scriptTask->execScriptByActivityUid($nextDel["TAS_UID"], $appFields);
//Create record in table APP_ASSIGN_SELF_SERVICE_VALUE //Create record in table APP_ASSIGN_SELF_SERVICE_VALUE
$task = new Task(); $arrayTaskTypeToExclude = array("SCRIPT-TASK");
$arrayNextTaskData = $task->load($nextDel["TAS_UID"]);
if (!in_array($arrayNextTaskData["TAS_TYPE"], array("SCRIPT-TASK"))) { if (!in_array($taskNextDel->getTasType(), $arrayTaskTypeToExclude)) {
if ($arrayNextTaskData["TAS_ASSIGN_TYPE"] == "SELF_SERVICE" && trim($arrayNextTaskData["TAS_GROUP_VARIABLE"]) != "") { if ($taskNextDel->getTasAssignType() == "SELF_SERVICE" && trim($taskNextDel->getTasGroupVariable()) != "") {
$nextTaskGroupVariable = trim($arrayNextTaskData["TAS_GROUP_VARIABLE"], " @#"); $nextTaskGroupVariable = trim($taskNextDel->getTasGroupVariable(), " @#");
if (isset($appFields["APP_DATA"][$nextTaskGroupVariable]) && trim($appFields["APP_DATA"][$nextTaskGroupVariable]) != "") { if (isset($appFields["APP_DATA"][$nextTaskGroupVariable]) && trim($appFields["APP_DATA"][$nextTaskGroupVariable]) != "") {
$appAssignSelfServiceValue = new AppAssignSelfServiceValue(); $appAssignSelfServiceValue = new AppAssignSelfServiceValue();
@@ -768,8 +758,8 @@ class Derivation
} }
} }
//Check if $nextDel["TAS_UID"] is Script-Task //Check if $taskNextDel is Script-Task
if (!is_null($taskNextDel) && $taskNextDel->getTasType() == "SCRIPT-TASK") { if ($taskNextDel->getTasType() == "SCRIPT-TASK") {
$this->case->CloseCurrentDelegation($currentDelegation["APP_UID"], $iNewDelIndex); $this->case->CloseCurrentDelegation($currentDelegation["APP_UID"], $iNewDelIndex);
//Get for $nextDel["TAS_UID"] your next Task //Get for $nextDel["TAS_UID"] your next Task
@@ -823,12 +813,9 @@ class Derivation
$users->refreshTotal($appFields['CURRENT_USER_UID'], 'remove', 'inbox'); $users->refreshTotal($appFields['CURRENT_USER_UID'], 'remove', 'inbox');
} }
} elseif ($nextDel['TAS_UID'] != '-1') { } elseif ($nextDel['TAS_UID'] != '-1') {
$taskNex = TaskPeer::retrieveByPK($nextDel['TAS_UID']); $arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT", "SCRIPT-TASK", "INTERMEDIATE-CATCH-TIMER-EVENT");
$aTask = $taskNex->toArray( BasePeer::TYPE_FIELDNAME );
$arrayTaskTypeToExclude = array("WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT", "SCRIPT-TASK"); if (!in_array($taskNextDel->getTasType(), $arrayTaskTypeToExclude)) {
if (!in_array($aTask['TAS_TYPE'], $arrayTaskTypeToExclude)) {
if (!empty($iNewDelIndex) && empty($aSP)) { if (!empty($iNewDelIndex) && empty($aSP)) {
$oAppDel = AppDelegationPeer::retrieveByPK( $appFields['APP_UID'], $iNewDelIndex ); $oAppDel = AppDelegationPeer::retrieveByPK( $appFields['APP_UID'], $iNewDelIndex );
$aFields = $oAppDel->toArray( BasePeer::TYPE_FIELDNAME ); $aFields = $oAppDel->toArray( BasePeer::TYPE_FIELDNAME );
@@ -854,7 +841,9 @@ class Derivation
} }
} }
} else { } else {
if (!in_array($aTask['TAS_TYPE'], array("SCRIPT-TASK"))) { $arrayTaskTypeToExclude = array("SCRIPT-TASK");
if ($removeList && !in_array($taskNextDel->getTasType(), $arrayTaskTypeToExclude)) {
$oRow = ApplicationPeer::retrieveByPK($appFields["APP_UID"]); $oRow = ApplicationPeer::retrieveByPK($appFields["APP_UID"]);
$aFields = $oRow->toArray( BasePeer::TYPE_FIELDNAME ); $aFields = $oRow->toArray( BasePeer::TYPE_FIELDNAME );
@@ -869,6 +858,7 @@ class Derivation
} }
} }
/*----------------------------------********---------------------------------*/ /*----------------------------------********---------------------------------*/
unset( $aSP ); unset( $aSP );
$removeList = false; $removeList = false;
@@ -977,19 +967,19 @@ class Derivation
// set the initial date to null the time its created // set the initial date to null the time its created
$aNewCase = $this->case->startCase( $aSP['TAS_UID'], $aSP['USR_UID'], true, $appFields); $aNewCase = $this->case->startCase( $aSP['TAS_UID'], $aSP['USR_UID'], true, $appFields);
$taskNextDel = TaskPeer::retrieveByPK($aSP["TAS_UID"]); //Sub-Process
//Create record in table APP_ASSIGN_SELF_SERVICE_VALUE //Create record in table APP_ASSIGN_SELF_SERVICE_VALUE
$taskSub = new Task(); if ($taskNextDel->getTasAssignType() == "SELF_SERVICE" && trim($taskNextDel->getTasGroupVariable()) != "") {
$arrayNextTaskData = $taskSub->load($aSP["TAS_UID"]); $nextTaskGroupVariable = trim($taskNextDel->getTasGroupVariable(), " @#");
if ($arrayNextTaskData["TAS_ASSIGN_TYPE"] == "SELF_SERVICE" && trim($arrayNextTaskData["TAS_GROUP_VARIABLE"]) != "") {
$nextTaskGroupVariable = trim($arrayNextTaskData["TAS_GROUP_VARIABLE"], " @#");
if (isset($appFields["APP_DATA"][$nextTaskGroupVariable]) && trim($appFields["APP_DATA"][$nextTaskGroupVariable]) != "") { if (isset($appFields["APP_DATA"][$nextTaskGroupVariable]) && trim($appFields["APP_DATA"][$nextTaskGroupVariable]) != "") {
$appAssignSelfServiceValue = new AppAssignSelfServiceValue(); $appAssignSelfServiceValue = new AppAssignSelfServiceValue();
$appAssignSelfServiceValue->create($aNewCase['APPLICATION'], $aNewCase['INDEX'], array("PRO_UID" => $aNewCase['PROCESS'], "TAS_UID" => $aSP["TAS_UID"], "GRP_UID" => trim($appFields["APP_DATA"][$nextTaskGroupVariable]))); $appAssignSelfServiceValue->create($aNewCase["APPLICATION"], $aNewCase["INDEX"], array("PRO_UID" => $aNewCase["PROCESS"], "TAS_UID" => $aSP["TAS_UID"], "GRP_UID" => trim($appFields["APP_DATA"][$nextTaskGroupVariable])));
} }
} }
//Copy case variables to sub-process case //Copy case variables to sub-process case
$aFields = unserialize( $aSP['SP_VARIABLES_OUT'] ); $aFields = unserialize( $aSP['SP_VARIABLES_OUT'] );
$aNewFields = array (); $aNewFields = array ();
@@ -1284,3 +1274,4 @@ class Derivation
} }
} }
} }

View File

@@ -847,13 +847,13 @@ class Processes
$oData->messageType[$key]["PRJ_UID"] = $sNewProUid; $oData->messageType[$key]["PRJ_UID"] = $sNewProUid;
} }
} }
if (isset($oData->emailEvent)) { if (isset($oData->emailEvent)) {
foreach ($oData->emailEvent as $key => $value) { foreach ($oData->emailEvent as $key => $value) {
$oData->emailEvent[$key]["PRJ_UID"] = $sNewProUid; $oData->emailEvent[$key]["PRJ_UID"] = $sNewProUid;
} }
} }
if (isset($oData->filesManager)) { if (isset($oData->filesManager)) {
foreach ($oData->filesManager as $key => $value) { foreach ($oData->filesManager as $key => $value) {
$oData->filesManager[$key]["PRO_UID"] = $sNewProUid; $oData->filesManager[$key]["PRO_UID"] = $sNewProUid;
@@ -2401,7 +2401,7 @@ class Processes
throw $e; throw $e;
} }
} }
/** /**
* Renew the GUID's for all the Uids for all the elements * Renew the GUID's for all the Uids for all the elements
* *
@@ -3180,60 +3180,6 @@ class Processes
throw $e; throw $e;
} }
} }
public function getEmailEvent($processUid)
{
try {
$arrayEmailEvent = array();
$emailEvent = new \ProcessMaker\BusinessModel\EmailEvent();
$criteria = $emailEvent->getEmailEventCriteria();
//Get data
$criteria->add(EmailEventPeer::PRJ_UID, $processUid, Criteria::EQUAL);
$rsCriteria = EmailEventPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rsCriteria->next();
while ($aRow = $rsCriteria->getRow()) {
$arrayEmailEvent[] = $aRow;
$rsCriteria->next();
}
//Return
return $arrayEmailEvent;
} catch (Exception $e) {
throw $e;
}
}
public function getFilesManager($processUid)
{
try {
$arrayFilesManager = array();
//Get data
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_UID);
$criteria->addSelectColumn(\ProcessFilesPeer::PRO_UID);
$criteria->addSelectColumn(\ProcessFilesPeer::USR_UID);
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_UPDATE_USR_UID);
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_PATH);
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_TYPE);
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_EDITABLE);
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_CREATE_DATE);
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_UPDATE_DATE);
$criteria->add(ProcessFilesPeer::PRO_UID, $processUid, Criteria::EQUAL);
$rsCriteria = ProcessFilesPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rsCriteria->next();
while ($aRow = $rsCriteria->getRow()) {
$arrayFilesManager[] = $aRow;
$rsCriteria->next();
}
//Return
return $arrayFilesManager;
} catch (Exception $e) {
throw $e;
}
}
public function getScriptTasks($processUid) public function getScriptTasks($processUid)
{ {
@@ -3263,6 +3209,88 @@ class Processes
} }
} }
public function getTimerEvents($processUid)
{
try {
$arrayTimerEvent = array();
$timerEvent = new \ProcessMaker\BusinessModel\TimerEvent();
//Get data
$criteria = $timerEvent->getTimerEventCriteria();
$criteria->add(\TimerEventPeer::PRJ_UID, $processUid, \Criteria::EQUAL);
$rsCriteria = \TimerEventPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
while ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
$arrayTimerEvent[] = $row;
}
//Return
return $arrayTimerEvent;
} catch (Exception $e) {
throw $e;
}
}
public function getEmailEvent($processUid)
{
try {
$arrayEmailEvent = array();
$emailEvent = new \ProcessMaker\BusinessModel\EmailEvent();
$criteria = $emailEvent->getEmailEventCriteria();
//Get data
$criteria->add(EmailEventPeer::PRJ_UID, $processUid, Criteria::EQUAL);
$rsCriteria = EmailEventPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rsCriteria->next();
while ($aRow = $rsCriteria->getRow()) {
$arrayEmailEvent[] = $aRow;
$rsCriteria->next();
}
//Return
return $arrayEmailEvent;
} catch (Exception $e) {
throw $e;
}
}
public function getFilesManager($processUid)
{
try {
$arrayFilesManager = array();
//Get data
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_UID);
$criteria->addSelectColumn(\ProcessFilesPeer::PRO_UID);
$criteria->addSelectColumn(\ProcessFilesPeer::USR_UID);
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_UPDATE_USR_UID);
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_PATH);
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_TYPE);
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_EDITABLE);
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_CREATE_DATE);
$criteria->addSelectColumn(\ProcessFilesPeer::PRF_UPDATE_DATE);
$criteria->add(ProcessFilesPeer::PRO_UID, $processUid, Criteria::EQUAL);
$rsCriteria = ProcessFilesPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$rsCriteria->next();
while ($aRow = $rsCriteria->getRow()) {
$arrayFilesManager[] = $aRow;
$rsCriteria->next();
}
//Return
return $arrayFilesManager;
} catch (Exception $e) {
throw $e;
}
}
/** /**
* Get Task User Rows from an array of data * Get Task User Rows from an array of data
* *
@@ -3423,7 +3451,7 @@ class Processes
$arrayWebEntryData = $webEntry->create($processUid, $userUidCreator, $record); $arrayWebEntryData = $webEntry->create($processUid, $userUidCreator, $record);
} }
} catch (Exception $e) { } catch (Exception $e) {
//throw $e; throw $e;
} }
} }
@@ -3447,7 +3475,7 @@ class Processes
$arrayWebEntryEventData = $webEntryEvent->create($processUid, $userUidCreator, $record); $arrayWebEntryEventData = $webEntryEvent->create($processUid, $userUidCreator, $record);
} }
} catch (Exception $e) { } catch (Exception $e) {
//throw $e; throw $e;
} }
} }
@@ -3528,48 +3556,6 @@ class Processes
throw $e; throw $e;
} }
} }
/**
* Create Email-event records
*
* @param string $processUid Unique id of Process
* @param array $arrayData Data
*
* return void
*/
public function createEmailEvent($processUid, array $arrayData)
{
try {
$emailEvent = new \ProcessMaker\BusinessModel\EmailEvent();
foreach ($arrayData as $value) {
$emailEventData = $emailEvent->save($processUid, $value);
}
} catch (Exception $e) {
throw $e;
}
}
/**
* Create Files Manager records
*
* @param string $processUid Unique id of Process
* @param array $arrayData Data
*
* return void
*/
public function createFilesManager($processUid, array $arrayData)
{
try {
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
foreach ($arrayData as $value) {
$filesManager->addProcessFilesManagerInDb($value);
}
} catch (Exception $e) {
throw $e;
}
}
/** /**
* Create Script-Task records * Create Script-Task records
@@ -3590,7 +3576,72 @@ class Processes
$result = $scriptTask->create($processUid, $record); $result = $scriptTask->create($processUid, $record);
} }
} catch (Exception $e) { } catch (Exception $e) {
//throw $e; throw $e;
}
}
/**
* Create Timer-Event records
*
* @param string $processUid Unique id of Process
* @param array $arrayData Data
*
* return void
*/
public function createTimerEvent($processUid, array $arrayData)
{
try {
$timerEvent = new \ProcessMaker\BusinessModel\TimerEvent();
foreach ($arrayData as $value) {
$record = $value;
$result = $timerEvent->singleCreate($processUid, $record);
}
} catch (Exception $e) {
throw $e;
}
}
/**
* Create Email-Event records
*
* @param string $processUid Unique id of Process
* @param array $arrayData Data
*
* return void
*/
public function createEmailEvent($processUid, array $arrayData)
{
try {
$emailEvent = new \ProcessMaker\BusinessModel\EmailEvent();
foreach ($arrayData as $value) {
$emailEventData = $emailEvent->save($processUid, $value);
}
} catch (Exception $e) {
throw $e;
}
}
/**
* Create Files Manager records
*
* @param string $processUid Unique id of Process
* @param array $arrayData Data
*
* return void
*/
public function createFilesManager($processUid, array $arrayData)
{
try {
$filesManager = new \ProcessMaker\BusinessModel\FilesManager();
foreach ($arrayData as $value) {
$filesManager->addProcessFilesManagerInDb($value);
}
} catch (Exception $e) {
throw $e;
} }
} }
@@ -3784,8 +3835,9 @@ class Processes
$oData->messageTypeVariable = $this->getMessageTypeVariables($sProUid); $oData->messageTypeVariable = $this->getMessageTypeVariables($sProUid);
$oData->messageEventDefinition = $this->getMessageEventDefinitions($sProUid); $oData->messageEventDefinition = $this->getMessageEventDefinitions($sProUid);
$oData->scriptTask = $this->getScriptTasks($sProUid); $oData->scriptTask = $this->getScriptTasks($sProUid);
$oData->timerEvent = $this->getTimerEvents($sProUid);
$oData->emailEvent = $this->getEmailEvent($sProUid); $oData->emailEvent = $this->getEmailEvent($sProUid);
$oData->filesManager = $this->getFilesManager($sProUid); $oData->filesManager = $this->getFilesManager($sProUid);
$oData->groupwfs = $this->groupwfsMerge($oData->groupwfs, $oData->processUser, "USR_UID"); $oData->groupwfs = $this->groupwfsMerge($oData->groupwfs, $oData->processUser, "USR_UID");
$oData->process["PRO_TYPE_PROCESS"] = "PUBLIC"; $oData->process["PRO_TYPE_PROCESS"] = "PUBLIC";
@@ -4886,6 +4938,7 @@ class Processes
$this->createMessageTypeVariable((isset($oData->messageTypeVariable))? $oData->messageTypeVariable : array()); $this->createMessageTypeVariable((isset($oData->messageTypeVariable))? $oData->messageTypeVariable : array());
$this->createMessageEventDefinition($arrayProcessData["PRO_UID"], (isset($oData->messageEventDefinition))? $oData->messageEventDefinition : array()); $this->createMessageEventDefinition($arrayProcessData["PRO_UID"], (isset($oData->messageEventDefinition))? $oData->messageEventDefinition : array());
$this->createScriptTask($arrayProcessData["PRO_UID"], (isset($oData->scriptTask))? $oData->scriptTask : array()); $this->createScriptTask($arrayProcessData["PRO_UID"], (isset($oData->scriptTask))? $oData->scriptTask : array());
$this->createTimerEvent($arrayProcessData["PRO_UID"], (isset($oData->timerEvent))? $oData->timerEvent : array());
$this->createEmailEvent($arrayProcessData["PRO_UID"], (isset($oData->emailEvent))? $oData->emailEvent : array()); $this->createEmailEvent($arrayProcessData["PRO_UID"], (isset($oData->emailEvent))? $oData->emailEvent : array());
$this->createFilesManager($arrayProcessData["PRO_UID"], (isset($oData->filesManager))? $oData->filesManager : array()); $this->createFilesManager($arrayProcessData["PRO_UID"], (isset($oData->filesManager))? $oData->filesManager : array());
} }
@@ -5456,3 +5509,4 @@ class ObjectCellection
} }
} }
} }

View File

@@ -0,0 +1,5 @@
<?php
class TimerEvent extends BaseTimerEvent
{
}

View File

@@ -0,0 +1,5 @@
<?php
class TimerEventPeer extends BaseTimerEventPeer
{
}

View File

@@ -75,7 +75,7 @@ class ScriptTaskMapBuilder
$tMap->addColumn('SCRTAS_OBJ_UID', 'ScrtasObjUid', 'string', CreoleTypes::VARCHAR, true, 32); $tMap->addColumn('SCRTAS_OBJ_UID', 'ScrtasObjUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addValidator('SCRTAS_OBJ_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'TRIGGER', 'Please set a valid value for TMREVN_DEF_STATUS'); $tMap->addValidator('SCRTAS_OBJ_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'TRIGGER', 'Please set a valid value for SCRTAS_OBJ_TYPE');
} // doBuild() } // doBuild()

View File

@@ -159,13 +159,13 @@ class TaskMapBuilder
$tMap->addColumn('TAS_SELFSERVICE_EXECUTION', 'TasSelfserviceExecution', 'string', CreoleTypes::VARCHAR, false, 15); $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|END-MESSAGE-EVENT|START-MESSAGE-EVENT|INTERMEDIATE-THROW-MESSAGE-EVENT|INTERMEDIATE-CATCH-MESSAGE-EVENT|SCRIPT-TASK|END-EMAIL-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|SCRIPT-TASK|START-TIMER-EVENT|INTERMEDIATE-CATCH-TIMER-EVENT|END-EMAIL-EVENT', 'Please set 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.'); $tMap->addValidator('TAS_TIMEUNIT', 'validValues', 'propel.validator.ValidValuesValidator', 'MINUTES|HOURS|DAYS|WEEKS|MONTHS', 'Please select a valid value for TAS_TIMEUNIT.');
$tMap->addValidator('TAS_ALERT', 'validValues', 'propel.validator.ValidValuesValidator', 'TRUE|FALSE', 'Please select a valid value for TAS_ALERT.'); $tMap->addValidator('TAS_ALERT', 'validValues', 'propel.validator.ValidValuesValidator', 'TRUE|FALSE', 'Please select a valid value for TAS_ALERT.');
$tMap->addValidator('TAS_ASSIGN_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'BALANCED|MANUAL|EVALUATE|REPORT_TO|SELF_SERVICE|STATIC_MI|CANCEL_MI', 'Please select a valid value for TAS_ASSIGN_TYPE.'); $tMap->addValidator('TAS_ASSIGN_TYPE', 'validValues', 'propel.validator.ValidValuesValidator', 'BALANCED|MANUAL|EVALUATE|REPORT_TO|SELF_SERVICE|STATIC_MI|CANCEL_MI', 'Please select a valid value for TAS_ASSIGN_TYPE.');
$tMap->addValidator('TAS_ASSIGN_LOCATION', 'validValues', 'propel.validator.ValidValuesValidator', 'TRUE|FALSE', 'Please select a valid value for TAS_ASSIGN_LOCATION.'); $tMap->addValidator('TAS_ASSIGN_LOCATION', 'validValues', 'propel.validator.ValidValuesValidator', 'TRUE|FALSE', 'Please select a valid value for TAS_ASSIGN_LOCATION.');
@@ -199,4 +199,4 @@ class TaskMapBuilder
} // doBuild() } // doBuild()
} // TaskMapBuilder } // TaskMapBuilder

View File

@@ -0,0 +1,102 @@
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'TIMER_EVENT' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
*/
class TimerEventMapBuilder
{
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.TimerEventMapBuilder';
/**
* The database map.
*/
private $dbMap;
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
$tMap = $this->dbMap->addTable('TIMER_EVENT');
$tMap->setPhpName('TimerEvent');
$tMap->setUseIdGenerator(false);
$tMap->addPrimaryKey('TMREVN_UID', 'TmrevnUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('EVN_UID', 'EvnUid', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('TMREVN_OPTION', 'TmrevnOption', 'string', CreoleTypes::VARCHAR, true, 50);
$tMap->addColumn('TMREVN_START_DATE', 'TmrevnStartDate', 'int', CreoleTypes::DATE, false, null);
$tMap->addColumn('TMREVN_END_DATE', 'TmrevnEndDate', 'int', CreoleTypes::DATE, false, null);
$tMap->addColumn('TMREVN_DAY', 'TmrevnDay', 'string', CreoleTypes::VARCHAR, true, 2);
$tMap->addColumn('TMREVN_HOUR', 'TmrevnHour', 'string', CreoleTypes::VARCHAR, true, 2);
$tMap->addColumn('TMREVN_MINUTE', 'TmrevnMinute', 'string', CreoleTypes::VARCHAR, true, 2);
$tMap->addColumn('TMREVN_CONFIGURATION_DATA', 'TmrevnConfigurationData', 'string', CreoleTypes::LONGVARCHAR, true, null);
$tMap->addColumn('TMREVN_NEXT_RUN_DATE', 'TmrevnNextRunDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('TMREVN_LAST_RUN_DATE', 'TmrevnLastRunDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('TMREVN_LAST_EXECUTION_DATE', 'TmrevnLastExecutionDate', 'int', CreoleTypes::TIMESTAMP, false, null);
$tMap->addColumn('TMREVN_STATUS', 'TmrevnStatus', 'string', CreoleTypes::VARCHAR, true, 25);
$tMap->addValidator('TMREVN_OPTION', 'validValues', 'propel.validator.ValidValuesValidator', 'HOURLY|DAILY|MONTHLY|EVERY|ONE-DATE-TIME|WAIT-FOR|WAIT-UNTIL-SPECIFIED-DATE-TIME', 'Please set a valid value for TMREVN_OPTION');
$tMap->addValidator('TMREVN_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'ACTIVE|INACTIVE|PROCESSED', 'Please set a valid value for TMREVN_STATUS');
} // doBuild()
} // TimerEventMapBuilder

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,638 @@
<?php
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
// actual class may be a subclass -- as returned by TimerEventPeer::getOMClass()
include_once 'classes/model/TimerEvent.php';
/**
* Base static class for performing query and update operations on the 'TIMER_EVENT' table.
*
*
*
* @package workflow.classes.model.om
*/
abstract class BaseTimerEventPeer
{
/** the default database name for this class */
const DATABASE_NAME = 'workflow';
/** the table name for this class */
const TABLE_NAME = 'TIMER_EVENT';
/** A class that can be returned by this peer. */
const CLASS_DEFAULT = 'classes.model.TimerEvent';
/** The total number of columns. */
const NUM_COLUMNS = 14;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
/** the column name for the TMREVN_UID field */
const TMREVN_UID = 'TIMER_EVENT.TMREVN_UID';
/** the column name for the PRJ_UID field */
const PRJ_UID = 'TIMER_EVENT.PRJ_UID';
/** the column name for the EVN_UID field */
const EVN_UID = 'TIMER_EVENT.EVN_UID';
/** the column name for the TMREVN_OPTION field */
const TMREVN_OPTION = 'TIMER_EVENT.TMREVN_OPTION';
/** the column name for the TMREVN_START_DATE field */
const TMREVN_START_DATE = 'TIMER_EVENT.TMREVN_START_DATE';
/** the column name for the TMREVN_END_DATE field */
const TMREVN_END_DATE = 'TIMER_EVENT.TMREVN_END_DATE';
/** the column name for the TMREVN_DAY field */
const TMREVN_DAY = 'TIMER_EVENT.TMREVN_DAY';
/** the column name for the TMREVN_HOUR field */
const TMREVN_HOUR = 'TIMER_EVENT.TMREVN_HOUR';
/** the column name for the TMREVN_MINUTE field */
const TMREVN_MINUTE = 'TIMER_EVENT.TMREVN_MINUTE';
/** the column name for the TMREVN_CONFIGURATION_DATA field */
const TMREVN_CONFIGURATION_DATA = 'TIMER_EVENT.TMREVN_CONFIGURATION_DATA';
/** the column name for the TMREVN_NEXT_RUN_DATE field */
const TMREVN_NEXT_RUN_DATE = 'TIMER_EVENT.TMREVN_NEXT_RUN_DATE';
/** the column name for the TMREVN_LAST_RUN_DATE field */
const TMREVN_LAST_RUN_DATE = 'TIMER_EVENT.TMREVN_LAST_RUN_DATE';
/** the column name for the TMREVN_LAST_EXECUTION_DATE field */
const TMREVN_LAST_EXECUTION_DATE = 'TIMER_EVENT.TMREVN_LAST_EXECUTION_DATE';
/** the column name for the TMREVN_STATUS field */
const TMREVN_STATUS = 'TIMER_EVENT.TMREVN_STATUS';
/** The PHP to DB Name Mapping */
private static $phpNameMap = null;
/**
* holds an array of fieldnames
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('TmrevnUid', 'PrjUid', 'EvnUid', 'TmrevnOption', 'TmrevnStartDate', 'TmrevnEndDate', 'TmrevnDay', 'TmrevnHour', 'TmrevnMinute', 'TmrevnConfigurationData', 'TmrevnNextRunDate', 'TmrevnLastRunDate', 'TmrevnLastExecutionDate', 'TmrevnStatus', ),
BasePeer::TYPE_COLNAME => array (TimerEventPeer::TMREVN_UID, TimerEventPeer::PRJ_UID, TimerEventPeer::EVN_UID, TimerEventPeer::TMREVN_OPTION, TimerEventPeer::TMREVN_START_DATE, TimerEventPeer::TMREVN_END_DATE, TimerEventPeer::TMREVN_DAY, TimerEventPeer::TMREVN_HOUR, TimerEventPeer::TMREVN_MINUTE, TimerEventPeer::TMREVN_CONFIGURATION_DATA, TimerEventPeer::TMREVN_NEXT_RUN_DATE, TimerEventPeer::TMREVN_LAST_RUN_DATE, TimerEventPeer::TMREVN_LAST_EXECUTION_DATE, TimerEventPeer::TMREVN_STATUS, ),
BasePeer::TYPE_FIELDNAME => array ('TMREVN_UID', 'PRJ_UID', 'EVN_UID', 'TMREVN_OPTION', 'TMREVN_START_DATE', 'TMREVN_END_DATE', 'TMREVN_DAY', 'TMREVN_HOUR', 'TMREVN_MINUTE', 'TMREVN_CONFIGURATION_DATA', 'TMREVN_NEXT_RUN_DATE', 'TMREVN_LAST_RUN_DATE', 'TMREVN_LAST_EXECUTION_DATE', 'TMREVN_STATUS', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
);
/**
* holds an array of keys for quick access to the fieldnames array
*
* first dimension keys are the type constants
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('TmrevnUid' => 0, 'PrjUid' => 1, 'EvnUid' => 2, 'TmrevnOption' => 3, 'TmrevnStartDate' => 4, 'TmrevnEndDate' => 5, 'TmrevnDay' => 6, 'TmrevnHour' => 7, 'TmrevnMinute' => 8, 'TmrevnConfigurationData' => 9, 'TmrevnNextRunDate' => 10, 'TmrevnLastRunDate' => 11, 'TmrevnLastExecutionDate' => 12, 'TmrevnStatus' => 13, ),
BasePeer::TYPE_COLNAME => array (TimerEventPeer::TMREVN_UID => 0, TimerEventPeer::PRJ_UID => 1, TimerEventPeer::EVN_UID => 2, TimerEventPeer::TMREVN_OPTION => 3, TimerEventPeer::TMREVN_START_DATE => 4, TimerEventPeer::TMREVN_END_DATE => 5, TimerEventPeer::TMREVN_DAY => 6, TimerEventPeer::TMREVN_HOUR => 7, TimerEventPeer::TMREVN_MINUTE => 8, TimerEventPeer::TMREVN_CONFIGURATION_DATA => 9, TimerEventPeer::TMREVN_NEXT_RUN_DATE => 10, TimerEventPeer::TMREVN_LAST_RUN_DATE => 11, TimerEventPeer::TMREVN_LAST_EXECUTION_DATE => 12, TimerEventPeer::TMREVN_STATUS => 13, ),
BasePeer::TYPE_FIELDNAME => array ('TMREVN_UID' => 0, 'PRJ_UID' => 1, 'EVN_UID' => 2, 'TMREVN_OPTION' => 3, 'TMREVN_START_DATE' => 4, 'TMREVN_END_DATE' => 5, 'TMREVN_DAY' => 6, 'TMREVN_HOUR' => 7, 'TMREVN_MINUTE' => 8, 'TMREVN_CONFIGURATION_DATA' => 9, 'TMREVN_NEXT_RUN_DATE' => 10, 'TMREVN_LAST_RUN_DATE' => 11, 'TMREVN_LAST_EXECUTION_DATE' => 12, 'TMREVN_STATUS' => 13, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, )
);
/**
* @return MapBuilder the map builder for this peer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getMapBuilder()
{
include_once 'classes/model/map/TimerEventMapBuilder.php';
return BasePeer::getMapBuilder('classes.model.map.TimerEventMapBuilder');
}
/**
* Gets a map (hash) of PHP names to DB column names.
*
* @return array The PHP to DB name map for this peer
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @deprecated Use the getFieldNames() and translateFieldName() methods instead of this.
*/
public static function getPhpNameMap()
{
if (self::$phpNameMap === null) {
$map = TimerEventPeer::getTableMap();
$columns = $map->getColumns();
$nameMap = array();
foreach ($columns as $column) {
$nameMap[$column->getPhpName()] = $column->getColumnName();
}
self::$phpNameMap = $nameMap;
}
return self::$phpNameMap;
}
/**
* Translates a fieldname to another type
*
* @param string $name field name
* @param string $fromType One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @param string $toType One of the class type constants
* @return string translated name of the field.
*/
static public function translateFieldName($name, $fromType, $toType)
{
$toNames = self::getFieldNames($toType);
$key = isset(self::$fieldKeys[$fromType][$name]) ? self::$fieldKeys[$fromType][$name] : null;
if ($key === null) {
throw new PropelException("'$name' could not be found in the field names of type '$fromType'. These are: " . print_r(self::$fieldKeys[$fromType], true));
}
return $toNames[$key];
}
/**
* Returns an array of of field names.
*
* @param string $type The type of fieldnames to return:
* One of the class type constants TYPE_PHPNAME,
* TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM
* @return array A list of field names
*/
static public function getFieldNames($type = BasePeer::TYPE_PHPNAME)
{
if (!array_key_exists($type, self::$fieldNames)) {
throw new PropelException('Method getFieldNames() expects the parameter $type to be one of the class constants TYPE_PHPNAME, TYPE_COLNAME, TYPE_FIELDNAME, TYPE_NUM. ' . $type . ' was given.');
}
return self::$fieldNames[$type];
}
/**
* Convenience method which changes table.column to alias.column.
*
* Using this method you can maintain SQL abstraction while using column aliases.
* <code>
* $c->addAlias("alias1", TablePeer::TABLE_NAME);
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
* </code>
* @param string $alias The alias for the current table.
* @param string $column The column name for current table. (i.e. TimerEventPeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
return str_replace(TimerEventPeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
* Add all the columns needed to create a new object.
*
* Note: any columns that were marked with lazyLoad="true" in the
* XML schema will not be added to the select list and only loaded
* on demand.
*
* @param criteria object containing the columns to add.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function addSelectColumns(Criteria $criteria)
{
$criteria->addSelectColumn(TimerEventPeer::TMREVN_UID);
$criteria->addSelectColumn(TimerEventPeer::PRJ_UID);
$criteria->addSelectColumn(TimerEventPeer::EVN_UID);
$criteria->addSelectColumn(TimerEventPeer::TMREVN_OPTION);
$criteria->addSelectColumn(TimerEventPeer::TMREVN_START_DATE);
$criteria->addSelectColumn(TimerEventPeer::TMREVN_END_DATE);
$criteria->addSelectColumn(TimerEventPeer::TMREVN_DAY);
$criteria->addSelectColumn(TimerEventPeer::TMREVN_HOUR);
$criteria->addSelectColumn(TimerEventPeer::TMREVN_MINUTE);
$criteria->addSelectColumn(TimerEventPeer::TMREVN_CONFIGURATION_DATA);
$criteria->addSelectColumn(TimerEventPeer::TMREVN_NEXT_RUN_DATE);
$criteria->addSelectColumn(TimerEventPeer::TMREVN_LAST_RUN_DATE);
$criteria->addSelectColumn(TimerEventPeer::TMREVN_LAST_EXECUTION_DATE);
$criteria->addSelectColumn(TimerEventPeer::TMREVN_STATUS);
}
const COUNT = 'COUNT(TIMER_EVENT.TMREVN_UID)';
const COUNT_DISTINCT = 'COUNT(DISTINCT TIMER_EVENT.TMREVN_UID)';
/**
* Returns the number of rows matching criteria.
*
* @param Criteria $criteria
* @param boolean $distinct Whether to select only distinct columns (You can also set DISTINCT modifier in Criteria).
* @param Connection $con
* @return int Number of matching rows.
*/
public static function doCount(Criteria $criteria, $distinct = false, $con = null)
{
// we're going to modify criteria, so copy it first
$criteria = clone $criteria;
// clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
$criteria->addSelectColumn(TimerEventPeer::COUNT_DISTINCT);
} else {
$criteria->addSelectColumn(TimerEventPeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
foreach ($criteria->getGroupByColumns() as $column) {
$criteria->addSelectColumn($column);
}
$rs = TimerEventPeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
} else {
// no rows returned; we infer that means 0 matches.
return 0;
}
}
/**
* Method to select one object from the DB.
*
* @param Criteria $criteria object used to create the SELECT statement.
* @param Connection $con
* @return TimerEvent
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelectOne(Criteria $criteria, $con = null)
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
$objects = TimerEventPeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
return null;
}
/**
* Method to do selects.
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con
* @return array Array of selected Objects
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doSelect(Criteria $criteria, $con = null)
{
return TimerEventPeer::populateObjects(TimerEventPeer::doSelectRS($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect()
* method to get a ResultSet.
*
* Use this method directly if you want to just get the resultset
* (instead of an array of objects).
*
* @param Criteria $criteria The Criteria object used to build the SELECT statement.
* @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
* @return ResultSet The resultset object with numerically-indexed fields.
* @see BasePeer::doSelect()
*/
public static function doSelectRS(Criteria $criteria, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if (!$criteria->getSelectColumns()) {
$criteria = clone $criteria;
TimerEventPeer::addSelectColumns($criteria);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
// BasePeer returns a Creole ResultSet, set to return
// rows indexed numerically.
return BasePeer::doSelect($criteria, $con);
}
/**
* The returned array will contain objects of the default type or
* objects that inherit from the default.
*
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function populateObjects(ResultSet $rs)
{
$results = array();
// set the class once to avoid overhead in the loop
$cls = TimerEventPeer::getOMClass();
$cls = Propel::import($cls);
// populate the object(s)
while ($rs->next()) {
$obj = new $cls();
$obj->hydrate($rs);
$results[] = $obj;
}
return $results;
}
/**
* Returns the TableMap related to this peer.
* This method is not needed for general use but a specific application could have a need.
* @return TableMap
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function getTableMap()
{
return Propel::getDatabaseMap(self::DATABASE_NAME)->getTable(self::TABLE_NAME);
}
/**
* The class that the Peer will make instances of.
*
* This uses a dot-path notation which is tranalted into a path
* relative to a location on the PHP include_path.
* (e.g. path.to.MyClass -> 'path/to/MyClass.php')
*
* @return string path.to.ClassName
*/
public static function getOMClass()
{
return TimerEventPeer::CLASS_DEFAULT;
}
/**
* Method perform an INSERT on the database, given a TimerEvent or Criteria object.
*
* @param mixed $values Criteria or TimerEvent object containing data that is used to create the INSERT statement.
* @param Connection $con the connection to use
* @return mixed The new primary key.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doInsert($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} else {
$criteria = $values->buildCriteria(); // build Criteria from TimerEvent object
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
try {
// use transaction because $criteria could contain info
// for more than one table (I guess, conceivably)
$con->begin();
$pk = BasePeer::doInsert($criteria, $con);
$con->commit();
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
return $pk;
}
/**
* Method perform an UPDATE on the database, given a TimerEvent or Criteria object.
*
* @param mixed $values Criteria or TimerEvent object containing data create the UPDATE statement.
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
* @return int The number of affected rows (if supported by underlying database driver).
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doUpdate($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$selectCriteria = new Criteria(self::DATABASE_NAME);
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
$comparison = $criteria->getComparison(TimerEventPeer::TMREVN_UID);
$selectCriteria->add(TimerEventPeer::TMREVN_UID, $criteria->remove(TimerEventPeer::TMREVN_UID), $comparison);
} else {
$criteria = $values->buildCriteria(); // gets full criteria
$selectCriteria = $values->buildPkeyCriteria(); // gets criteria w/ primary key(s)
}
// set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
return BasePeer::doUpdate($selectCriteria, $criteria, $con);
}
/**
* Method to DELETE all rows from the TIMER_EVENT table.
*
* @return int The number of affected rows (if supported by underlying database driver).
*/
public static function doDeleteAll($con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDeleteAll(TimerEventPeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Method perform a DELETE on the database, given a TimerEvent or Criteria object OR a primary key value.
*
* @param mixed $values Criteria or TimerEvent object or primary key or array of primary keys
* which is used to create the DELETE statement
* @param Connection $con the connection to use
* @return int The number of affected rows (if supported by underlying database driver).
* This includes CASCADE-related rows
* if supported by native driver or if emulated using Propel.
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function doDelete($values, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(TimerEventPeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
} elseif ($values instanceof TimerEvent) {
$criteria = $values->buildPkeyCriteria();
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
$criteria->add(TimerEventPeer::TMREVN_UID, (array) $values, Criteria::IN);
}
// Set the correct dbName
$criteria->setDbName(self::DATABASE_NAME);
$affectedRows = 0; // initialize var to track total num of affected rows
try {
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
$affectedRows += BasePeer::doDelete($criteria, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
$con->rollback();
throw $e;
}
}
/**
* Validates all modified columns of given TimerEvent object.
* If parameter $columns is either a single column name or an array of column names
* than only those columns are validated.
*
* NOTICE: This does not apply to primary or foreign keys for now.
*
* @param TimerEvent $obj The object to validate.
* @param mixed $cols Column name or array of column names.
*
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
*/
public static function doValidate(TimerEvent $obj, $cols = null)
{
$columns = array();
if ($cols) {
$dbMap = Propel::getDatabaseMap(TimerEventPeer::DATABASE_NAME);
$tableMap = $dbMap->getTable(TimerEventPeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
}
foreach ($cols as $colName) {
if ($tableMap->containsColumn($colName)) {
$get = 'get' . $tableMap->getColumn($colName)->getPhpName();
$columns[$colName] = $obj->$get();
}
}
} else {
if ($obj->isNew() || $obj->isColumnModified(TimerEventPeer::TMREVN_OPTION))
$columns[TimerEventPeer::TMREVN_OPTION] = $obj->getTmrevnOption();
if ($obj->isNew() || $obj->isColumnModified(TimerEventPeer::TMREVN_STATUS))
$columns[TimerEventPeer::TMREVN_STATUS] = $obj->getTmrevnStatus();
}
return BasePeer::doValidate(TimerEventPeer::DATABASE_NAME, TimerEventPeer::TABLE_NAME, $columns);
}
/**
* Retrieve a single object by pkey.
*
* @param mixed $pk the primary key.
* @param Connection $con the connection to use
* @return TimerEvent
*/
public static function retrieveByPK($pk, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$criteria = new Criteria(TimerEventPeer::DATABASE_NAME);
$criteria->add(TimerEventPeer::TMREVN_UID, $pk);
$v = TimerEventPeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
/**
* Retrieve multiple objects by pkey.
*
* @param array $pks List of primary keys
* @param Connection $con the connection to use
* @throws PropelException Any exceptions caught during processing will be
* rethrown wrapped into a PropelException.
*/
public static function retrieveByPKs($pks, $con = null)
{
if ($con === null) {
$con = Propel::getConnection(self::DATABASE_NAME);
}
$objs = null;
if (empty($pks)) {
$objs = array();
} else {
$criteria = new Criteria();
$criteria->add(TimerEventPeer::TMREVN_UID, $pks, Criteria::IN);
$objs = TimerEventPeer::doSelect($criteria, $con);
}
return $objs;
}
}
// static code to register the map builder for this Peer with the main Propel class
if (Propel::isInit()) {
// the MapBuilder classes register themselves with Propel during initialization
// so we need to load them here.
try {
BaseTimerEventPeer::getMapBuilder();
} catch (Exception $e) {
Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
}
} else {
// even if Propel is not yet initialized, the map builder class can be registered
// now and then it will be loaded when Propel initializes.
require_once 'classes/model/map/TimerEventMapBuilder.php';
Propel::registerMapBuilder('classes.model.map.TimerEventMapBuilder');
}

File diff suppressed because it is too large Load Diff

View File

@@ -2833,7 +2833,9 @@ CREATE TABLE `CATALOG`
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- TABLE: SCRIPT_TASK #-- TABLE: SCRIPT_TASK
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
DROP TABLE IF EXISTS SCRIPT_TASK; DROP TABLE IF EXISTS SCRIPT_TASK;
CREATE TABLE SCRIPT_TASK CREATE TABLE SCRIPT_TASK
( (
SCRTAS_UID VARCHAR(32) NOT NULL, SCRTAS_UID VARCHAR(32) NOT NULL,
@@ -2845,6 +2847,32 @@ CREATE TABLE SCRIPT_TASK
PRIMARY KEY (SCRTAS_UID) PRIMARY KEY (SCRTAS_UID)
)ENGINE=InnoDB DEFAULT CHARSET='utf8'; )ENGINE=InnoDB DEFAULT CHARSET='utf8';
#-----------------------------------------------------------------------------
#-- TIMER_EVENT
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS TIMER_EVENT;
CREATE TABLE TIMER_EVENT
(
TMREVN_UID VARCHAR(32) NOT NULL,
PRJ_UID VARCHAR(32) NOT NULL,
EVN_UID VARCHAR(32) NOT NULL,
TMREVN_OPTION VARCHAR(50) default 'DAILY' NOT NULL,
TMREVN_START_DATE DATE,
TMREVN_END_DATE DATE,
TMREVN_DAY VARCHAR(2) default '' NOT NULL,
TMREVN_HOUR VARCHAR(2) default '' NOT NULL,
TMREVN_MINUTE VARCHAR(2) default '' NOT NULL,
TMREVN_CONFIGURATION_DATA MEDIUMTEXT default '' NOT NULL,
TMREVN_NEXT_RUN_DATE DATETIME,
TMREVN_LAST_RUN_DATE DATETIME,
TMREVN_LAST_EXECUTION_DATE DATETIME,
TMREVN_STATUS VARCHAR(25) default 'ACTIVE' NOT NULL,
PRIMARY KEY (TMREVN_UID)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
#-- EMAIL_EVENT #-- EMAIL_EVENT
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@@ -2860,7 +2888,8 @@ CREATE TABLE `EMAIL_EVENT`
`EMAIL_EVENT_SUBJECT` VARCHAR(150) default '' NOT NULL, `EMAIL_EVENT_SUBJECT` VARCHAR(150) default '' NOT NULL,
`PRF_UID` VARCHAR(32) default '' NOT NULL, `PRF_UID` VARCHAR(32) default '' NOT NULL,
PRIMARY KEY (`EMAIL_EVENT_UID`) PRIMARY KEY (`EMAIL_EVENT_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8'; )ENGINE=InnoDB DEFAULT CHARSET='utf8';
# This restores the fkey checks, after having unset them earlier # This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1; SET FOREIGN_KEY_CHECKS = 1;

View File

@@ -760,7 +760,7 @@ try {
} //set priority value } //set priority value
$sTask = $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_UID']; //$sTask = $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_UID'];
//TAS_UID has a hidden field to store the TAS_UID //TAS_UID has a hidden field to store the TAS_UID
$hiddenName = "form[TASKS][" . $sKey . "][TAS_UID]"; $hiddenName = "form[TASKS][" . $sKey . "][TAS_UID]";
$hiddenField = '<input type="hidden" name="' . $hiddenName . '" id="' . $hiddenName . '" value="' . $aValues['NEXT_TASK']['TAS_UID'] . '">'; $hiddenField = '<input type="hidden" name="' . $hiddenName . '" id="' . $hiddenName . '" value="' . $aValues['NEXT_TASK']['TAS_UID'] . '">';
@@ -893,7 +893,10 @@ try {
switch ($optionTaskType) { switch ($optionTaskType) {
case "SCRIPT-TASK": case "SCRIPT-TASK":
$aFields["TASK"][$sKey]["NEXT_TASK"]["USR_UID"] = G::LoadTranslation("ID_ROUTE_TO_TASK_SCRIPT_TASK");; $aFields["TASK"][$sKey]["NEXT_TASK"]["USR_UID"] = G::LoadTranslation("ID_ROUTE_TO_TASK_SCRIPT_TASK");
break;
case "INTERMEDIATE-CATCH-TIMER-EVENT":
$aFields["TASK"][$sKey]["NEXT_TASK"]["USR_UID"] = G::LoadTranslation("ID_ROUTE_TO_TASK_INTERMEDIATE_CATCH_TIMER_EVENT");
break; break;
} }
@@ -967,6 +970,7 @@ try {
$aFields['TASK'][$sKey]['NEXT_TASK']['TAS_PARENT'] = '<input type="hidden" name="' . $hiddenName . '[TAS_PARENT]" id="' . $hiddenName . '[TAS_PARENT]" value="' . $aValues['NEXT_TASK']['TAS_PARENT'] . '">'; $aFields['TASK'][$sKey]['NEXT_TASK']['TAS_PARENT'] = '<input type="hidden" name="' . $hiddenName . '[TAS_PARENT]" id="' . $hiddenName . '[TAS_PARENT]" value="' . $aValues['NEXT_TASK']['TAS_PARENT'] . '">';
} }
} }
$aFields['PROCESSING_MESSAGE'] = G::loadTranslation( 'ID_PROCESSING' ); $aFields['PROCESSING_MESSAGE'] = G::loadTranslation( 'ID_PROCESSING' );
/** /**
@@ -1107,3 +1111,4 @@ if ($_SESSION['TRIGGER_DEBUG']['ISSET']) {
showdebug(); showdebug();
}' ); }' );
} }

File diff suppressed because it is too large Load Diff

View File

@@ -391,7 +391,7 @@ abstract class Importer
foreach ($arrayWorkflowTables["tasks"] as $key => $value) { foreach ($arrayWorkflowTables["tasks"] as $key => $value) {
$arrayTaskData = $value; $arrayTaskData = $value;
if (!in_array($arrayTaskData["TAS_TYPE"], array("GATEWAYTOGATEWAY", "WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT", "END-EMAIL-EVENT", "INTERMEDIATE-EMAIL-EVENT"))) { if (!in_array($arrayTaskData["TAS_TYPE"], array("GATEWAYTOGATEWAY", "WEBENTRYEVENT", "END-MESSAGE-EVENT", "START-MESSAGE-EVENT", "INTERMEDIATE-THROW-MESSAGE-EVENT", "INTERMEDIATE-CATCH-MESSAGE-EVENT", "START-TIMER-EVENT", "INTERMEDIATE-CATCH-TIMER-EVENT", "END-EMAIL-EVENT", "INTERMEDIATE-EMAIL-EVENT"))) {
$result = $workflow->updateTask($arrayTaskData["TAS_UID"], $arrayTaskData); $result = $workflow->updateTask($arrayTaskData["TAS_UID"], $arrayTaskData);
} }
} }

View File

@@ -29,6 +29,8 @@ class BpmnWorkflow extends Project\Bpmn
"start-message-event" => array("type" => "START-MESSAGE-EVENT", "prefix" => "sme-"), "start-message-event" => array("type" => "START-MESSAGE-EVENT", "prefix" => "sme-"),
"intermediate-throw-message-event" => array("type" => "INTERMEDIATE-THROW-MESSAGE-EVENT", "prefix" => "itme-"), "intermediate-throw-message-event" => array("type" => "INTERMEDIATE-THROW-MESSAGE-EVENT", "prefix" => "itme-"),
"intermediate-catch-message-event" => array("type" => "INTERMEDIATE-CATCH-MESSAGE-EVENT", "prefix" => "icme-"), "intermediate-catch-message-event" => array("type" => "INTERMEDIATE-CATCH-MESSAGE-EVENT", "prefix" => "icme-"),
"start-timer-event" => array("type" => "START-TIMER-EVENT", "prefix" => "ste-"),
"intermediate-catch-timer-event" => array("type" => "INTERMEDIATE-CATCH-TIMER-EVENT", "prefix" => "icte-"),
"end-email-event" => array("type" => "END-EMAIL-EVENT", "prefix" => "eee-") "end-email-event" => array("type" => "END-EMAIL-EVENT", "prefix" => "eee-")
); );
@@ -323,7 +325,7 @@ class BpmnWorkflow extends Project\Bpmn
$this->wp->setStartTask($data["FLO_ELEMENT_DEST"]); $this->wp->setStartTask($data["FLO_ELEMENT_DEST"]);
} }
$this->updateEventStartObjects($data["FLO_ELEMENT_ORIGIN"], $data["FLO_ELEMENT_DEST"]); //$this->updateEventStartObjects($data["FLO_ELEMENT_ORIGIN"], $data["FLO_ELEMENT_DEST"]);
//WebEntry-Event - Update //WebEntry-Event - Update
$this->updateWebEntryEventByEvent($data["FLO_ELEMENT_ORIGIN"], array("ACT_UID" => $data["FLO_ELEMENT_DEST"])); $this->updateWebEntryEventByEvent($data["FLO_ELEMENT_ORIGIN"], array("ACT_UID" => $data["FLO_ELEMENT_DEST"]));
@@ -373,7 +375,7 @@ class BpmnWorkflow extends Project\Bpmn
//Setting as start Task //Setting as start Task
$this->wp->setStartTask($flowCurrent->getFloElementDest()); $this->wp->setStartTask($flowCurrent->getFloElementDest());
$this->updateEventStartObjects($flowCurrent->getFloElementOrigin(), $flowCurrent->getFloElementDest()); //$this->updateEventStartObjects($flowCurrent->getFloElementOrigin(), $flowCurrent->getFloElementDest());
//WebEntry-Event - Update //WebEntry-Event - Update
$this->updateWebEntryEventByEvent($flowCurrent->getFloElementOrigin(), array("ACT_UID" => $flowCurrent->getFloElementDest())); $this->updateWebEntryEventByEvent($flowCurrent->getFloElementOrigin(), array("ACT_UID" => $flowCurrent->getFloElementDest()));
@@ -471,7 +473,7 @@ class BpmnWorkflow extends Project\Bpmn
} }
} }
$this->updateEventStartObjects($flow->getFloElementOrigin(), ""); //$this->updateEventStartObjects($flow->getFloElementOrigin(), "");
//WebEntry-Event - Update //WebEntry-Event - Update
if (is_null($bpmnFlow)) { if (is_null($bpmnFlow)) {
@@ -559,15 +561,6 @@ class BpmnWorkflow extends Project\Bpmn
public function removeEventDefinition(\BpmnEvent $bpmnEvent) public function removeEventDefinition(\BpmnEvent $bpmnEvent)
{ {
try { try {
//Case-Scheduler - Delete
if ($bpmnEvent->getEvnType() == "START" && $bpmnEvent->getEvnMarker() == "TIMER") {
$caseScheduler = new \CaseScheduler();
if ($caseScheduler->Exists($bpmnEvent->getEvnUid())) {
$this->wp->removeCaseScheduler($bpmnEvent->getEvnUid());
}
}
//WebEntry-Event - Delete //WebEntry-Event - Delete
if ($bpmnEvent->getEvnType() == "START" && $bpmnEvent->getEvnMarker() == "EMPTY") { if ($bpmnEvent->getEvnType() == "START" && $bpmnEvent->getEvnMarker() == "EMPTY") {
$webEntryEvent = new \ProcessMaker\BusinessModel\WebEntryEvent(); $webEntryEvent = new \ProcessMaker\BusinessModel\WebEntryEvent();
@@ -593,6 +586,19 @@ class BpmnWorkflow extends Project\Bpmn
} }
} }
//Timer-Event - Delete
$arrayEventType = array("START", "INTERMEDIATE");
$arrayEventMarker = array("TIMER");
if (in_array($bpmnEvent->getEvnType(), $arrayEventType) && in_array($bpmnEvent->getEvnMarker(), $arrayEventMarker)) {
$timerEvent = new \ProcessMaker\BusinessModel\TimerEvent();
$timerEvent->deleteWhere(array(
\TimerEventPeer::PRJ_UID => array($bpmnEvent->getPrjUid(), \Criteria::EQUAL),
\TimerEventPeer::EVN_UID => array($bpmnEvent->getEvnUid(), \Criteria::EQUAL)
));
}
//Email-Event - Delete //Email-Event - Delete
$arrayEventType = array("END", "INTERMEDIATE"); $arrayEventType = array("END", "INTERMEDIATE");
$arrayEventMarker = array("EMAIL"); $arrayEventMarker = array("EMAIL");
@@ -623,15 +629,15 @@ class BpmnWorkflow extends Project\Bpmn
$eventUid = parent::addEvent($data); $eventUid = parent::addEvent($data);
$event = \BpmnEventPeer::retrieveByPK($eventUid); $event = \BpmnEventPeer::retrieveByPK($eventUid);
// create case scheduler //// create case scheduler
if ($event && $event->getEvnMarker() == "TIMER" && $event->getEvnType() == "START") { //if ($event && $event->getEvnMarker() == "TIMER" && $event->getEvnType() == "START") {
$this->wp->addCaseScheduler($eventUid); // $this->wp->addCaseScheduler($eventUid);
} //}
//
// create web entry //// create web entry
if ($event && $event->getEvnMarker() == "MESSAGE" && $event->getEvnType() == "START") { //if ($event && $event->getEvnMarker() == "MESSAGE" && $event->getEvnType() == "START") {
$this->wp->addWebEntry($eventUid); // $this->wp->addWebEntry($eventUid);
} //}
return $eventUid; return $eventUid;
} }
@@ -668,6 +674,7 @@ class BpmnWorkflow extends Project\Bpmn
} }
} }
/*
public function updateEventStartObjects($eventUid, $taskUid) public function updateEventStartObjects($eventUid, $taskUid)
{ {
$event = \BpmnEventPeer::retrieveByPK($eventUid); $event = \BpmnEventPeer::retrieveByPK($eventUid);
@@ -686,6 +693,7 @@ class BpmnWorkflow extends Project\Bpmn
// $this->wp->updateWebEntry($eventUid, array("TAS_UID" => $taskUid)); // $this->wp->updateWebEntry($eventUid, array("TAS_UID" => $taskUid));
//} //}
} }
*/
public function createTaskByElement($elementUid, $elementType, $key) public function createTaskByElement($elementUid, $elementType, $key)
{ {
@@ -917,12 +925,19 @@ class BpmnWorkflow extends Project\Bpmn
$arrayEventData = \BpmnEvent::findOneBy(\BpmnEventPeer::EVN_UID, $eventUid)->toArray(); $arrayEventData = \BpmnEvent::findOneBy(\BpmnEventPeer::EVN_UID, $eventUid)->toArray();
if (!is_null($arrayEventData)) { if (!is_null($arrayEventData)) {
//Event - INTERMEDIATE-CATCH-MESSAGE-EVENT $arrayEventType = array("INTERMEDIATE");
if ($arrayEventData["EVN_TYPE"] == "INTERMEDIATE" && $arrayEventData["EVN_MARKER"] == "MESSAGECATCH") { $arrayEventMarker = array("MESSAGECATCH", "TIMER");
if (in_array($arrayEventData["EVN_TYPE"], $arrayEventType) && in_array($arrayEventData["EVN_MARKER"], $arrayEventMarker)) {
$arrayKey = array(
"MESSAGECATCH" => "intermediate-catch-message-event",
"TIMER" => "intermediate-catch-timer-event"
);
$taskUid = $this->createTaskByElement( $taskUid = $this->createTaskByElement(
$eventUid, $eventUid,
"bpmnEvent", "bpmnEvent",
"intermediate-catch-message-event" $arrayKey[$arrayEventData["EVN_MARKER"]]
); );
$result = $this->wp->addRoute($activityUid, $taskUid, $routeType, $routeCondition, $routeDefault); $result = $this->wp->addRoute($activityUid, $taskUid, $routeType, $routeCondition, $routeDefault);
@@ -1113,6 +1128,17 @@ class BpmnWorkflow extends Project\Bpmn
$this->wp->setStartTask($taskUid); $this->wp->setStartTask($taskUid);
$this->mapBpmnEventToWorkflowRoutes($taskUid, $event["EVN_UID"]);
break;
case "TIMER":
$taskUid = $this->createTaskByElement(
$event["EVN_UID"],
"bpmnEvent",
"start-timer-event"
);
$this->wp->setStartTask($taskUid);
$this->mapBpmnEventToWorkflowRoutes($taskUid, $event["EVN_UID"]); $this->mapBpmnEventToWorkflowRoutes($taskUid, $event["EVN_UID"]);
break; break;
case "EMPTY": case "EMPTY":
@@ -1120,10 +1146,10 @@ class BpmnWorkflow extends Project\Bpmn
break; break;
} }
break; break;
case "END": //case "END":
break; // break;
case "INTERMEDIATE": //case "INTERMEDIATE":
break; // break;
} }
} }
} }
@@ -1329,7 +1355,6 @@ class BpmnWorkflow extends Project\Bpmn
* @param $projectData * @param $projectData
* @return array * @return array
*/ */
public static function updateFromStruct($prjUid, $projectData, $generateUid = true, $forceInsert = false) public static function updateFromStruct($prjUid, $projectData, $generateUid = true, $forceInsert = false)
{ {
$diagram = isset($projectData["diagrams"]) && isset($projectData["diagrams"][0]) ? $projectData["diagrams"][0] : array(); $diagram = isset($projectData["diagrams"]) && isset($projectData["diagrams"][0]) ? $projectData["diagrams"][0] : array();
@@ -1954,3 +1979,4 @@ class BpmnWorkflow extends Project\Bpmn
} }
} }
} }

View File

@@ -855,7 +855,17 @@ class Workflow extends Handler
$messageEventDefinition->delete($row["MSGED_UID"]); $messageEventDefinition->delete($row["MSGED_UID"]);
} }
//Delete Script-Task
$scriptTask = new \ProcessMaker\BusinessModel\ScriptTask();
$scriptTask->deleteWhere(array(\ScriptTaskPeer::PRJ_UID => array($sProcessUID, \Criteria::EQUAL)));
//Delete Timer-Event
$timerEvent = new \ProcessMaker\BusinessModel\TimerEvent();
$timerEvent->deleteWhere(array(\TimerEventPeer::PRJ_UID => array($sProcessUID, \Criteria::EQUAL)));
//Delete Email-Event //Delete Email-Event
$emailEvent = new \ProcessMaker\BusinessModel\EmailEvent(); $emailEvent = new \ProcessMaker\BusinessModel\EmailEvent();
$criteria = new \Criteria("workflow"); $criteria = new \Criteria("workflow");
@@ -868,7 +878,7 @@ class Workflow extends Handler
$row = $rsCriteria->getRow(); $row = $rsCriteria->getRow();
$emailEvent->delete($sProcessUID,$row["EMAIL_EVENT_UID"],false); $emailEvent->delete($sProcessUID,$row["EMAIL_EVENT_UID"],false);
} }
//Delete files Manager //Delete files Manager
$filesManager = new \ProcessMaker\BusinessModel\FilesManager(); $filesManager = new \ProcessMaker\BusinessModel\FilesManager();
$criteria = new \Criteria("workflow"); $criteria = new \Criteria("workflow");
@@ -882,23 +892,6 @@ class Workflow extends Handler
$filesManager->deleteProcessFilesManager($sProcessUID, $row["PRF_UID"]); $filesManager->deleteProcessFilesManager($sProcessUID, $row["PRF_UID"]);
} }
//Delete Script-Task
$scriptTask = new \ProcessMaker\BusinessModel\ScriptTask();
$criteria = new \Criteria("workflow");
$criteria->addSelectColumn(\ScriptTaskPeer::SCRTAS_UID);
$criteria->add(\ScriptTaskPeer::PRJ_UID, $sProcessUID, \Criteria::EQUAL);
$rsCriteria = \ScriptTaskPeer::doSelectRS($criteria);
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
while ($rsCriteria->next()) {
$row = $rsCriteria->getRow();
$scriptTask->delete($row["SCRTAS_UID"]);
}
//Delete the process //Delete the process
try { try {
$oProcess->remove($sProcessUID); $oProcess->remove($sProcessUID);
@@ -1238,80 +1231,33 @@ class Workflow extends Handler
$processUidOld = $arrayUid[0]["old_uid"]; $processUidOld = $arrayUid[0]["old_uid"];
$processUid = $arrayUid[0]["new_uid"]; $processUid = $arrayUid[0]["new_uid"];
//Update TASK.TAS_UID //Update Table.Field
foreach ($arrayWorkflowData["tasks"] as $key => $value) { $arrayUpdateTableField = array(
$taskUid = $arrayWorkflowData["tasks"][$key]["TAS_UID"]; "tasks" => array("fieldname" => "TAS_UID", "oldFieldname" => "TAS_UID_OLD"), //Update TASK.TAS_UID
"webEntryEvent" => array("fieldname" => "EVN_UID", "oldFieldname" => "EVN_UID_OLD"), //Update WEB_ENTRY_EVENT.EVN_UID
"messageEventDefinition" => array("fieldname" => "EVN_UID", "oldFieldname" => "EVN_UID_OLD"), //Update MESSAGE_EVENT_DEFINITION.EVN_UID
"scriptTask" => array("fieldname" => "ACT_UID", "oldFieldname" => "ACT_UID_OLD"), //Update SCRIPT_TASK.ACT_UID
"timerEvent" => array("fieldname" => "EVN_UID", "oldFieldname" => "EVN_UID_OLD"), //Update TIMER_EVENT.EVN_UID
"emailEvent" => array("fieldname" => "EVN_UID", "oldFieldname" => "EVN_UID_OLD") //Update EMAIL_EVENT.EVN_UID
);
foreach ($arrayUid as $value2) { foreach ($arrayUpdateTableField as $key => $value) {
$arrayItem = $value2; $table = $key;
$fieldname = $value["fieldname"];
$oldFieldname = $value["oldFieldname"];
if ($arrayItem["old_uid"] == $taskUid) { if (isset($arrayWorkflowData[$table])) {
$arrayWorkflowData["tasks"][$key]["TAS_UID_OLD"] = $taskUid; foreach ($arrayWorkflowData[$table] as $key2 => $value2) {
$arrayWorkflowData["tasks"][$key]["TAS_UID"] = $arrayItem["new_uid"]; $uid = $arrayWorkflowData[$table][$key2][$fieldname];
break;
}
}
}
//Update WEB_ENTRY_EVENT.EVN_UID foreach ($arrayUid as $value3) {
if (isset($arrayWorkflowData["webEntryEvent"])) { $arrayItem = $value3;
foreach ($arrayWorkflowData["webEntryEvent"] as $key => $value) {
$webEntryEventEventUid = $arrayWorkflowData["webEntryEvent"][$key]["EVN_UID"];
foreach ($arrayUid as $value2) { if ($arrayItem["old_uid"] == $uid) {
$arrayItem = $value2; $arrayWorkflowData[$table][$key2][$fieldname] = $arrayItem["new_uid"];
$arrayWorkflowData[$table][$key2][$oldFieldname] = $uid;
if ($arrayItem["old_uid"] == $webEntryEventEventUid) { break;
$arrayWorkflowData["webEntryEvent"][$key]["EVN_UID"] = $arrayItem["new_uid"]; }
break;
}
}
}
}
//Update MESSAGE_EVENT_DEFINITION.EVN_UID
if (isset($arrayWorkflowData["messageEventDefinition"])) {
foreach ($arrayWorkflowData["messageEventDefinition"] as $key => $value) {
$messageEventDefinitionEventUid = $arrayWorkflowData["messageEventDefinition"][$key]["EVN_UID"];
foreach ($arrayUid as $value2) {
$arrayItem = $value2;
if ($arrayItem["old_uid"] == $messageEventDefinitionEventUid) {
$arrayWorkflowData["messageEventDefinition"][$key]["EVN_UID"] = $arrayItem["new_uid"];
break;
}
}
}
}
//Update EMAIL_EVENT.EVN_UID
if (isset($arrayWorkflowData["emailEvent"])) {
foreach ($arrayWorkflowData["emailEvent"] as $key => $value) {
$emailEventEventUid = $arrayWorkflowData["emailEvent"][$key]["EVN_UID"];
foreach ($arrayUid as $value2) {
$arrayItem = $value2;
if ($arrayItem["old_uid"] == $emailEventEventUid) {
$arrayWorkflowData["emailEvent"][$key]["EVN_UID"] = $arrayItem["new_uid"];
break;
}
}
}
}
//Update SCRIPT_TASK.ACT_UID
if (isset($arrayWorkflowData["scriptTask"])) {
foreach ($arrayWorkflowData["scriptTask"] as $key => $value) {
$scriptTaskActivityUid = $arrayWorkflowData["scriptTask"][$key]["ACT_UID"];
foreach ($arrayUid as $value2) {
$arrayItem = $value2;
if ($arrayItem["old_uid"] == $scriptTaskActivityUid) {
$arrayWorkflowData["scriptTask"][$key]["ACT_UID"] = $arrayItem["new_uid"];
break;
} }
} }
} }
@@ -1369,3 +1315,4 @@ class Workflow extends Handler
} }
} }
} }

View File

@@ -0,0 +1,134 @@
<?php
namespace ProcessMaker\Services\Api\Project;
use \ProcessMaker\Services\Api;
use \Luracast\Restler\RestException;
/**
* Project\TimerEvent Api Controller
*
* @protected
*/
class TimerEvent extends Api
{
private $timerEvent;
/**
* Constructor of the class
*
* return void
*/
public function __construct()
{
try {
$this->timerEvent = new \ProcessMaker\BusinessModel\TimerEvent();
$this->timerEvent->setFormatFieldNameInUppercase(false);
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}
}
/**
* @url GET /:prj_uid/timer-events
*
* @param string $prj_uid {@min 32}{@max 32}
*/
public function doGetTimerEvents($prj_uid)
{
try {
$response = $this->timerEvent->getTimerEvents($prj_uid);
return $response;
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}
}
/**
* @url GET /:prj_uid/timer-event/:tmrevn_uid
*
* @param string $prj_uid {@min 32}{@max 32}
* @param string $tmrevn_uid {@min 32}{@max 32}
*/
public function doGetTimerEvent($prj_uid, $tmrevn_uid)
{
try {
$response = $this->timerEvent->getTimerEvent($tmrevn_uid);
return $response;
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}
}
/**
* @url GET /:prj_uid/timer-event/event/:evn_uid
*
* @param string $prj_uid {@min 32}{@max 32}
* @param string $evn_uid {@min 32}{@max 32}
*/
public function doGetTimerEventEvent($prj_uid, $evn_uid)
{
try {
$response = $this->timerEvent->getTimerEventByEvent($prj_uid, $evn_uid);
return $response;
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}
}
/**
* @url POST /:prj_uid/timer-event
*
* @param string $prj_uid {@min 32}{@max 32}
* @param array $request_data
*
* @status 201
*/
public function doPostTimerEvent($prj_uid, array $request_data)
{
try {
$arrayData = $this->timerEvent->create($prj_uid, $request_data);
$response = $arrayData;
return $response;
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}
}
/**
* @url PUT /:prj_uid/timer-event/:tmrevn_uid
*
* @param string $prj_uid {@min 32}{@max 32}
* @param string $tmrevn_uid {@min 32}{@max 32}
* @param array $request_data
*/
public function doPutTimerEvent($prj_uid, $tmrevn_uid, array $request_data)
{
try {
$arrayData = $this->timerEvent->update($tmrevn_uid, $request_data);
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}
}
/**
* @url DELETE /:prj_uid/timer-event/:tmrevn_uid
*
* @param string $prj_uid {@min 32}{@max 32}
* @param string $tmrevn_uid {@min 32}{@max 32}
*/
public function doDeleteTimerEvent($prj_uid, $tmrevn_uid)
{
try {
$this->timerEvent->delete($tmrevn_uid);
} catch (\Exception $e) {
throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
}
}
}

View File

@@ -41,8 +41,9 @@ debug = 1
message-type-variable = "ProcessMaker\Services\Api\Project\MessageType\Variable" message-type-variable = "ProcessMaker\Services\Api\Project\MessageType\Variable"
web-entry-event = "ProcessMaker\Services\Api\Project\WebEntryEvent" web-entry-event = "ProcessMaker\Services\Api\Project\WebEntryEvent"
message-event-definition = "ProcessMaker\Services\Api\Project\MessageEventDefinition" message-event-definition = "ProcessMaker\Services\Api\Project\MessageEventDefinition"
script-task = "ProcessMaker\Services\Api\Project\ScriptTask" script-task = "ProcessMaker\Services\Api\Project\ScriptTask"
email-event = "ProcessMaker\Services\Api\Project\EmailEvent" timer-event = "ProcessMaker\Services\Api\Project\TimerEvent"
email-event = "ProcessMaker\Services\Api\Project\EmailEvent"
[alias: projects] [alias: projects]
project = "ProcessMaker\Services\Api\Project" project = "ProcessMaker\Services\Api\Project"
@@ -112,3 +113,4 @@ debug = 1
[alias: catalog] [alias: catalog]
dashboard = "ProcessMaker\Services\Api\Catalog" dashboard = "ProcessMaker\Services\Api\Catalog"

View File

@@ -3,6 +3,78 @@ namespace ProcessMaker\Util;
class Common extends \Maveriks\Util\Common class Common extends \Maveriks\Util\Common
{ {
private $frontEnd = false;
/**
* Set front-end flag (Terminal's front-end)
*
* @param bool $flag Flag
*
* return void
*/
public function setFrontEnd($flag)
{
try {
$this->frontEnd = $flag;
} catch (\Exception $e) {
throw $e;
}
}
/**
* Show front-end (Terminal's front-end)
*
* @param string $option Option
* @param string $data Data string
*
* return void
*/
public function frontEndShow($option, $data = "")
{
try {
if (!$this->frontEnd) {
return;
}
$numc = 100;
switch ($option) {
case "BAR":
echo "\r" . "| " . $data . str_repeat(" ", $numc - 2 - strlen($data));
break;
case "TEXT":
echo "\r" . "| " . $data . str_repeat(" ", $numc - 2 - strlen($data)) . "\n";
break;
default:
//START, END
echo "\r" . "+" . str_repeat("-", $numc - 2) . "+" . "\n";
break;
}
} catch (\Exception $e) {
throw $e;
}
}
/**
* Progress bar (Progress bar for terminal)
*
* @param int $total Total
* @param int $count Count
*
* return string Return a string that represent progress bar
*/
public function progressBar($total, $count)
{
try {
$p = (int)(($count * 100) / $total);
$n = (int)($p / 2);
return "[" . str_repeat("|", $n) . str_repeat(" ", 50 - $n) . "] $p%";
} catch (\Exception $e) {
throw $e;
}
}
/** /**
* Generate random number * Generate random number
* *
@@ -64,4 +136,5 @@ class Common extends \Maveriks\Util\Common
return $sCode; return $sCode;
} }
} }

View File

@@ -1,7 +1,7 @@
<div id="publisherContent[1]" style="margin: 0px;" align="center"> <div id="publisherContent[1]" style="margin: 0px;" align="center">
<form name="frmDerivation" id="frmDerivation" action="cases_Derivate" method="POST" class="formDefault" style="margin: 0px;"> <form name="frmDerivation" id="frmDerivation" action="cases_Derivate" method="POST" class="formDefault" style="margin: 0px;">
<input type="hidden" name="form[ROU_TYPE]" id="form[ROU_TYPE]" value="{$PROCESS.ROU_TYPE}"> <input type="hidden" name="form[ROU_TYPE]" id="form[ROU_TYPE]" value="{$PROCESS.ROU_TYPE}">
<div class="borderForm" style="width: 500px; padding-left: 0; padding-right: 0; border-width: 1;"> <div class="borderForm" style="width: 500px; padding-left: 0; padding-right: 0; border-width: 1px;">
<div class="boxTop"> <div class="boxTop">
<div class="a"></div> <div class="a"></div>
<div class="b"></div> <div class="b"></div>
@@ -16,7 +16,7 @@
<td colspan="2" class="withoutLabel"> <td colspan="2" class="withoutLabel">
<table width='100%' cellspacing="0" cellpadding="0"> <table width='100%' cellspacing="0" cellpadding="0">
<tr> <tr>
{if $PREVIOUS_PAGE} {if $PREVIOUS_PAGE}
<td valign='top' class='tableOption' width='33%' align="left"> <td valign='top' class='tableOption' width='33%' align="left">
<table cellspacing="0" cellpadding="0" width='100%'> <table cellspacing="0" cellpadding="0" width='100%'>
<tr> <tr>
@@ -61,14 +61,18 @@
</tr> </tr>
{/if} {/if}
{if $PROCESS.ERROR eq '' } {if $PROCESS.ERROR eq '' }
{if $data.NEXT_TASK.TAS_TYPE != "INTERMEDIATE-CATCH-MESSAGE-EVENT"} {if ($data.NEXT_TASK.TAS_TYPE == "INTERMEDIATE-CATCH-MESSAGE-EVENT")}
<tr> <tr>
<td class="FormLabel" width="100">{$NEXT_TASK_LABEL}:</td> <td class="FormFieldContent" colspan="2" style="text-align: center">{$data.NEXT_TASK.TAS_TITLE}{$data.NEXT_TASK.TAS_HIDDEN_FIELD}</td>
<td class="FormFieldContent">{$data.NEXT_TASK.TAS_TITLE}{$data.NEXT_TASK.TAS_HIDDEN_FIELD}</td> </tr>
{elseif ($data.NEXT_TASK.TAS_TYPE == "INTERMEDIATE-CATCH-TIMER-EVENT")}
<tr style="display: none;">
<td class="FormFieldContent" colspan="2">{$data.NEXT_TASK.TAS_HIDDEN_FIELD}</td>
</tr> </tr>
{else} {else}
<tr> <tr>
<td class="FormFieldContent" colspan="2" style="text-align: center">{$data.NEXT_TASK.TAS_TITLE}{$data.NEXT_TASK.TAS_HIDDEN_FIELD}</td> <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> </tr>
{/if} {/if}
{/if} {/if}
@@ -94,6 +98,11 @@
<td class="FormLabel" width="100"></td> <td class="FormLabel" width="100"></td>
<td class="FormFieldContent">{$data.NEXT_TASK.USR_UID}{$data.NEXT_TASK.USR_HIDDEN_FIELD}</td> <td class="FormFieldContent">{$data.NEXT_TASK.USR_UID}{$data.NEXT_TASK.USR_HIDDEN_FIELD}</td>
</tr> </tr>
{elseif ($data.NEXT_TASK.TAS_TYPE == "INTERMEDIATE-CATCH-TIMER-EVENT")}
<tr>
<td class="FormLabel" width="100">{$NEXT_TASK_LABEL}:</td>
<td class="FormFieldContent">{$data.NEXT_TASK.USR_UID}{$data.NEXT_TASK.USR_HIDDEN_FIELD}</td>
</tr>
{else} {else}
<tr> <tr>
<td class="FormLabel" width="100">{$EMPLOYEE}:</td> <td class="FormLabel" width="100">{$EMPLOYEE}:</td>