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')
|
||||
|
||||
@@ -27,6 +27,11 @@ class PMXPublisher
|
||||
return $filename;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $outputFile
|
||||
* @param bool $dirName
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function truncateName($outputFile, $dirName = true)
|
||||
{
|
||||
$limit = 200;
|
||||
@@ -34,23 +39,27 @@ class PMXPublisher
|
||||
$limit = 150;
|
||||
}
|
||||
if ($dirName) {
|
||||
if (strlen(basename($outputFile)) >= $limit) {
|
||||
$lastPos = strrpos(basename($outputFile), '.');
|
||||
$fileName = substr(basename($outputFile), 0, $lastPos);
|
||||
$currentLocale = setlocale(LC_CTYPE, 0);
|
||||
setlocale(LC_CTYPE, 'en_US.UTF-8');
|
||||
$filename = basename($outputFile);
|
||||
if (strlen($filename) >= $limit) {
|
||||
$lastPos = strrpos($filename, '.');
|
||||
$fileName = substr($filename, 0, $lastPos);
|
||||
$newFileName = \G::inflect($fileName);
|
||||
$excess = strlen($newFileName) - $limit;
|
||||
$newFileName = substr($newFileName, 0, strlen($newFileName) - $excess);
|
||||
$newFileName = substr($newFileName, 0, strlen($newFileName) - $excess - 1);
|
||||
$newOutputFile = str_replace($fileName, $newFileName, $outputFile);
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
$newOutputFile = str_replace("/", DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, $newOutputFile);
|
||||
}
|
||||
$outputFile = $newOutputFile;
|
||||
}
|
||||
setlocale(LC_CTYPE, $currentLocale);
|
||||
} else {
|
||||
$outputFile = \G::inflect($outputFile);
|
||||
if (strlen($outputFile) >= $limit) {
|
||||
$excess = strlen($outputFile) - $limit;
|
||||
$newFileName = substr($outputFile, 0, strlen($outputFile) - $excess);
|
||||
$newFileName = substr($outputFile, 0, strlen($outputFile) - $excess - 1);
|
||||
$outputFile = $newFileName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -161,31 +161,40 @@ class XmlExporter extends Exporter
|
||||
return $this->dom->createCDATASection($value);
|
||||
}
|
||||
}
|
||||
|
||||
public function truncateName($outputFile,$dirName = true)
|
||||
|
||||
/**
|
||||
* @param $outputFile
|
||||
* @param bool $dirName
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function truncateName($outputFile, $dirName = true)
|
||||
{
|
||||
$limit = 200;
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
$limit = 150;
|
||||
}
|
||||
if($dirName) {
|
||||
if (strlen(basename($outputFile)) >= $limit) {
|
||||
$lastPos = strrpos(basename($outputFile),'.');
|
||||
$fileName = substr(basename($outputFile),0,$lastPos);
|
||||
if ($dirName) {
|
||||
$currentLocale = setlocale(LC_CTYPE, 0);
|
||||
setlocale(LC_CTYPE, 'en_US.UTF-8');
|
||||
$filename = basename($outputFile);
|
||||
if (strlen($filename) >= $limit) {
|
||||
$lastPos = strrpos($filename, '.');
|
||||
$fileName = substr($filename, 0, $lastPos);
|
||||
$newFileName = \G::inflect($fileName);
|
||||
$excess = strlen($newFileName) - $limit;
|
||||
$newFileName = substr($newFileName,0,strlen($newFileName)-$excess);
|
||||
$newOutputFile = str_replace($fileName,$newFileName,$outputFile);
|
||||
$newFileName = substr($newFileName, 0, strlen($newFileName) - $excess - 1);
|
||||
$newOutputFile = str_replace($fileName, $newFileName, $outputFile);
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
|
||||
$newOutputFile = str_replace("/", DIRECTORY_SEPARATOR.DIRECTORY_SEPARATOR, $newOutputFile);
|
||||
$newOutputFile = str_replace("/", DIRECTORY_SEPARATOR . DIRECTORY_SEPARATOR, $newOutputFile);
|
||||
}
|
||||
$outputFile = $newOutputFile;
|
||||
}
|
||||
}
|
||||
setlocale(LC_CTYPE, $currentLocale);
|
||||
} else {
|
||||
$outputFile = \G::inflect($outputFile);
|
||||
if (strlen($outputFile) >= $limit) {
|
||||
$excess = strlen($outputFile) - $limit;
|
||||
$newFileName = substr($outputFile,0,strlen($outputFile)-$excess);
|
||||
$newFileName = substr($outputFile, 0, strlen($outputFile) - $excess - 1);
|
||||
$outputFile = $newFileName;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1285,6 +1285,7 @@ class Workflow extends Handler
|
||||
|
||||
$arrayWorkflowData = (array)($workflowData);
|
||||
|
||||
//Synchronize dynaforms json.
|
||||
foreach ($arrayWorkflowData["dynaforms"] as $key => $value) {
|
||||
if ($arrayWorkflowData["dynaforms"][$key]["DYN_CONTENT"] != "") {
|
||||
$dynaFormContent = $arrayWorkflowData["dynaforms"][$key]["DYN_CONTENT"];
|
||||
@@ -1304,15 +1305,21 @@ class Workflow extends Handler
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($arrayWorkflowData["inputs"] as $keyin => $value) {
|
||||
$newUid = $value["INP_DOC_UID"];
|
||||
if(isset($value["INP_DOC_UID_OLD"])){
|
||||
foreach ($arrayWorkflowData["processVariables"] as $keypv => $vars) {
|
||||
if($vars['INP_DOC_UID'] === $value["INP_DOC_UID_OLD"]){
|
||||
$arrayWorkflowData["processVariables"][$keypv]["INP_DOC_UID"] = $newUid;
|
||||
//Synchronize caseTrackerObject with dynaforms, input documents, output documents.
|
||||
foreach ($arrayWorkflowData["caseTrackerObject"] as $key => $value) {
|
||||
if (isset($arrayWorkflowData["uid"]) &&
|
||||
isset($arrayWorkflowData["uid"][$value["CTO_TYPE_OBJ"]]) &&
|
||||
isset($arrayWorkflowData["uid"][$value["CTO_TYPE_OBJ"]][$value["CTO_UID_OBJ"]])) {
|
||||
$arrayWorkflowData["caseTrackerObject"][$key]["CTO_UID_OBJ"] = $arrayWorkflowData["uid"][$value["CTO_TYPE_OBJ"]][$value["CTO_UID_OBJ"]];
|
||||
}
|
||||
}
|
||||
unset($arrayWorkflowData["inputs"][$keyin]["INP_DOC_UID_OLD"]);
|
||||
|
||||
//Synchronize variables with process variables.
|
||||
foreach ($arrayWorkflowData["processVariables"] as $key => $value) {
|
||||
if (isset($arrayWorkflowData["uid"]) &&
|
||||
isset($arrayWorkflowData["uid"]["INPUT_DOCUMENT"]) &&
|
||||
isset($arrayWorkflowData["uid"]["INPUT_DOCUMENT"][$value["INP_DOC_UID"]])) {
|
||||
$arrayWorkflowData["processVariables"][$key]["INP_DOC_UID"] = $arrayWorkflowData["uid"]["INPUT_DOCUMENT"][$value["INP_DOC_UID"]];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -813,9 +813,11 @@ function newProcess(params)
|
||||
fieldLabel: _('ID_TITLE'),
|
||||
xtype:'textfield',
|
||||
width: 260,
|
||||
maxLength: 100,
|
||||
maskRe: /^(?!^(PRN|AUX|CLOCK\$|NUL|CON|COM\d|LPT\d|\...*)(\..+)?$)[^\x00-\x1f\\?*\";|/]+$/i,
|
||||
allowBlank: false,
|
||||
vtype: "textWithoutTags",
|
||||
autoCreate: {tag: 'input', type: 'text', size: '100', autocomplete: 'off', maxlength: '100'},
|
||||
listeners: {
|
||||
'focus' : function(value){
|
||||
document.getElementById("PRO_TITLE").onpaste = function() {
|
||||
|
||||
@@ -101,7 +101,11 @@ function ws_open() {
|
||||
global $client;
|
||||
$endpoint = WS_WSDL_URL;
|
||||
$sessionId = '';
|
||||
@$client = new SoapClient($endpoint);
|
||||
|
||||
$client = new SoapClient(
|
||||
$endpoint,
|
||||
['stream_context' => stream_context_create(['ssl' => ['verify_peer' => false, 'verify_peer_name' => false, 'allow_self_signed' => true]])]
|
||||
);
|
||||
|
||||
$user = WS_USER_ID;
|
||||
$pass = WS_USER_PASS;
|
||||
|
||||
Reference in New Issue
Block a user