HOR-1749
Al derivar de un script task y end email no envía el correoMerge remote-tracking branch 'upstream/3.1' into HOR-1749-A
This commit is contained in:
@@ -940,13 +940,14 @@ class Derivation
|
||||
break;
|
||||
case TASK_FINISH_TASK:
|
||||
$iAppThreadIndex = $appFields['DEL_THREAD'];
|
||||
$this->case->closeAppThread( $currentDelegation['APP_UID'], $iAppThreadIndex );
|
||||
$this->case->closeAppThread($currentDelegation['APP_UID'], $iAppThreadIndex);
|
||||
if (isset($nextDel["TAS_UID_DUMMY"]) && !$flagTaskAssignTypeIsMultipleInstance) {
|
||||
$taskDummy = TaskPeer::retrieveByPK($nextDel["TAS_UID_DUMMY"]);
|
||||
if (preg_match("/^(?:END-MESSAGE-EVENT|END-EMAIL-EVENT)$/", $taskDummy->getTasType())) {
|
||||
$this->executeEvent($nextDel["TAS_UID_DUMMY"], $appFields, $flagFirstIteration, true);
|
||||
}
|
||||
}
|
||||
$this->case->closeAppThread($currentDelegation['APP_UID'], $iAppThreadIndex);
|
||||
break;
|
||||
default:
|
||||
//Get all siblingThreads
|
||||
|
||||
@@ -2004,13 +2004,14 @@ class Processes
|
||||
{
|
||||
$map = array();
|
||||
foreach ($oData->inputs as $key => $val) {
|
||||
$oldUid = $val['INP_DOC_UID'];
|
||||
$newGuid = $this->getUnusedInputGUID();
|
||||
$map[$val['INP_DOC_UID']] = $newGuid;
|
||||
$oData->inputFiles[$oData->inputs[$key]['INP_DOC_UID']] = $newGuid;
|
||||
$oData->inputs[$key]['INP_DOC_UID'] = $newGuid;
|
||||
$oData->inputs[$key]['INP_DOC_UID_OLD'] = $oldUid;
|
||||
}
|
||||
|
||||
$oData->uid["INPUT_DOCUMENT"] = $map;
|
||||
|
||||
if (!isset($oData->inputFiles)) {
|
||||
$oData->inputFiles = array();
|
||||
}
|
||||
|
||||
@@ -2008,50 +2008,60 @@ class workspaceTools
|
||||
* @param string $workSpace Workspace
|
||||
* @param bool $flagReinsert Flag that specifies the re-insertion
|
||||
*
|
||||
* return all LIST TABLES with data
|
||||
* @return void
|
||||
*/
|
||||
public function migrateList($workSpace, $flagReinsert = false, $lang='en')
|
||||
{
|
||||
$this->initPropel(true);
|
||||
|
||||
G::LoadClass("case");
|
||||
$flagListAll = $this->listFirstExecution('check');
|
||||
$flagListUnassigned = $this->listFirstExecution('check', 'unassigned');
|
||||
|
||||
if (!$flagReinsert && $this->listFirstExecution("check")) {
|
||||
return 1;
|
||||
if (!$flagReinsert && $flagListAll && $flagListUnassigned) {
|
||||
return;
|
||||
}
|
||||
|
||||
$arrayTable1 = ['ListInbox', 'ListMyInbox', 'ListCanceled', 'ListParticipatedLast', 'ListParticipatedHistory', 'ListPaused', 'ListCompleted'];
|
||||
$arrayTable2 = ['ListUnassigned', 'ListUnassignedGroup'];
|
||||
$arrayTable = array_merge($arrayTable1, $arrayTable2);
|
||||
|
||||
if ($flagReinsert) {
|
||||
//Delete all records
|
||||
$arrayTable = array("ListInbox", "ListMyInbox", "ListCanceled", "ListParticipatedLast", "ListParticipatedHistory", "ListPaused", "ListCompleted", "ListUnassigned", "ListUnassignedGroup");
|
||||
|
||||
foreach ($arrayTable as $value) {
|
||||
$tableName = $value . "Peer";
|
||||
$tableName = $value . 'Peer';
|
||||
$list = new $tableName();
|
||||
$list->doDeleteAll();
|
||||
}
|
||||
}
|
||||
|
||||
if (!$flagReinsert && !$flagListAll) {
|
||||
foreach ($arrayTable1 as $value) {
|
||||
$tableName = $value . 'Peer';
|
||||
$list = new $tableName();
|
||||
|
||||
if ((int)($list->doCount(new Criteria())) > 0) {
|
||||
$flagListAll = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($flagReinsert || !$flagListAll) {
|
||||
$this->regenerateListCompleted($lang);
|
||||
$this->regenerateListCanceled($lang);
|
||||
$this->regenerateListMyInbox(); // this list require no translation
|
||||
$this->regenerateListInbox(); // this list require no translation
|
||||
$this->regenerateListParticipatedHistory(); // this list require no translation
|
||||
$this->regenerateListParticipatedLast(); // this list require no translation
|
||||
$this->regenerateListPaused(); // this list require no translation
|
||||
$this->regenerateListUnassigned(); // this list require no translation
|
||||
}
|
||||
if (!$flagReinsert) {
|
||||
$this->listFirstExecution("insert");
|
||||
$this->listFirstExecution('insert', 'unassigned');
|
||||
$this->regenerateListMyInbox(); //This list require no translation
|
||||
$this->regenerateListInbox(); //This list require no translation
|
||||
$this->regenerateListParticipatedHistory(); //This list require no translation
|
||||
$this->regenerateListParticipatedLast(); //This list require no translation
|
||||
$this->regenerateListPaused(); //This list require no translation
|
||||
}
|
||||
|
||||
//Check for the List Unassigned
|
||||
if(!$this->listFirstExecution('check','unassigned')){
|
||||
$this->regenerateListUnassigned(); // this list require no translation
|
||||
$this->listFirstExecution('insert', 'unassigned');
|
||||
if ($flagReinsert || !$flagListUnassigned) {
|
||||
$this->regenerateListUnassigned(); //This list require no translation
|
||||
}
|
||||
|
||||
//Return
|
||||
return true;
|
||||
$this->listFirstExecution('insert');
|
||||
$this->listFirstExecution('insert', 'unassigned');
|
||||
}
|
||||
|
||||
public function regenerateListCanceled($lang = 'en')
|
||||
|
||||
Reference in New Issue
Block a user