From cb2e834dc17ddb49f7daf80959294f20d0b39022 Mon Sep 17 00:00:00 2001 From: dheeyi Date: Thu, 5 Mar 2015 12:20:19 -0400 Subject: [PATCH 1/5] =?UTF-8?q?PM-1485=200016744:=20In=20the=20BPMN=20Desi?= =?UTF-8?q?gner,=20can=20not=20connect=20to=20Oracle=20(and=20probably=20M?= =?UTF-8?q?S=20SQL)=20databases=20because=20no=20"Encode"=20options.=20Cau?= =?UTF-8?q?sa:=20Solo=20exisitia=20en=20el=20dise=C3=B1r=20anterior.=20Sol?= =?UTF-8?q?icion:=20Se=20agrego=20esa=20funcionalidad=20al=20nuevo=20dise?= =?UTF-8?q?=C3=B1r.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/engine/classes/class.net.php | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/workflow/engine/classes/class.net.php b/workflow/engine/classes/class.net.php index 10dd46d50..78e3e2e0a 100755 --- a/workflow/engine/classes/class.net.php +++ b/workflow/engine/classes/class.net.php @@ -213,7 +213,15 @@ class NET } $stat = new Stat(); - $flagTns = (isset($arrayServerData["connectionType"]) && $arrayServerData["connectionType"] == "TNS")? 1 : 0; + if (array_key_exists("connectionType", $arrayServerData) || array_key_exists("DBS_TYPEORACLE", $arrayServerData)) { + if ($arrayServerData["connectionType"] == "TNS" || $arrayServerData["DBS_TYPEORACLE"] == "TNS") { + $flagTns=1; + }else{ + $flagTns=0; + } + }else{ + $flagTns=0; + } if (isset($this->db_user) && (isset($this->db_passwd) || $this->db_passwd == "") && (isset($this->db_sourcename) || $flagTns == 1)) { switch ($pDbDriver) { @@ -323,7 +331,15 @@ class NET set_time_limit( 0 ); $stat = new Stat(); - $flagTns = (isset($arrayServerData["connectionType"]) && $arrayServerData["connectionType"] == "TNS")? 1 : 0; + if (array_key_exists("connectionType", $arrayServerData) || array_key_exists("DBS_TYPEORACLE", $arrayServerData)) { + if ($arrayServerData["connectionType"] == "TNS" || $arrayServerData["DBS_TYPEORACLE"] == "TNS") { + $flagTns=1; + }else{ + $flagTns=0; + } + }else{ + $flagTns=0; + } if (isset($this->db_user) && (isset($this->db_passwd) || $this->db_passwd == "") && (isset($this->db_sourcename) || $flagTns == 1)) { switch ($pDbDriver) { From 8fe15e8ea5364c4d0abda2bd9d1430e05d117eb5 Mon Sep 17 00:00:00 2001 From: dheeyi Date: Thu, 5 Mar 2015 13:16:20 -0400 Subject: [PATCH 2/5] PM-878: Change description of the "processmaker change-password-hash-method" command in the help --- workflow/engine/bin/tasks/cliAddons.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/workflow/engine/bin/tasks/cliAddons.php b/workflow/engine/bin/tasks/cliAddons.php index 27af448db..1fdffd8cf 100644 --- a/workflow/engine/bin/tasks/cliAddons.php +++ b/workflow/engine/bin/tasks/cliAddons.php @@ -21,7 +21,7 @@ EOT /*----------------------------------********---------------------------------*/ CLI::taskName('change-password-hash-method'); CLI::taskDescription(<< Date: Thu, 5 Mar 2015 13:38:57 -0400 Subject: [PATCH 3/5] PM-1127 Change following text in the Trigger Wizard. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Causa: Textos definidos previamentes. SolucióEdicion de nuevos textos. --- workflow/engine/classes/class.pmFunctions.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/workflow/engine/classes/class.pmFunctions.php b/workflow/engine/classes/class.pmFunctions.php index f69f43390..78dd3f11f 100755 --- a/workflow/engine/classes/class.pmFunctions.php +++ b/workflow/engine/classes/class.pmFunctions.php @@ -885,7 +885,7 @@ function PMFSendMessage( if ($result->status_code == 0) { return 1; } else { - error_log($result->message); + error_log($result->message); return 0; } } @@ -1402,8 +1402,8 @@ function WSUnpauseCase ($caseUid, $delIndex, $userUid) * * Add a case note. * - * @name WSAddCaseNote - * @label WS Add case note + * @name WSAddACaseNote + * @label WS Add a case note * @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#WSAddCaseNote.28.29 * * @param string(32) | $caseUid | ID of the case | The unique ID of the case. @@ -1539,8 +1539,8 @@ function PMFUserList () //its test was successfull * * Add an Input Document. * - * @name PMFAddInputDocument - * @label PMF Add a input document + * @name PMFAddAnInputDocument + * @label PMF Add an input document * @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFAddInputDocument.28.29 * * @param string(32) | $inputDocumentUid | ID of the input document | The unique ID of the input document. @@ -2773,8 +2773,8 @@ function PMFUnpauseCase ($caseUid, $delIndex, $userUid) * * Add case note. * - * @name PMFAddCaseNote - * @label PMF Add case note + * @name PMFAddACaseNote + * @label PMF Add a case note * @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFAddCaseNote.28.29 * * @param string(32) | $caseUid | ID of the case | The unique ID of the case. From a441d6ff0c93deb500d5fb18a15fba8233c4ba93 Mon Sep 17 00:00:00 2001 From: Julio Cesar Laura Date: Thu, 5 Mar 2015 13:44:46 -0400 Subject: [PATCH 4/5] =?UTF-8?q?PM-1774=20No=20esta=20grabando=20el=20dise?= =?UTF-8?q?=C3=B1o=20de=20un=20parallel=20join=20en=20el=20dise=C3=B1ador?= =?UTF-8?q?=20SOLVED?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- workflow/engine/methods/processes/processes_Ajax.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/workflow/engine/methods/processes/processes_Ajax.php b/workflow/engine/methods/processes/processes_Ajax.php index bb3b3555a..01fe49f6e 100755 --- a/workflow/engine/methods/processes/processes_Ajax.php +++ b/workflow/engine/methods/processes/processes_Ajax.php @@ -462,6 +462,7 @@ try { break; case 5: $sType = 'SEC-JOIN'; + $oProcessNewPattern = new Process(); $taskProcess=$oProcessNewPattern->load($oData->pro_uid); $titleProcess=$taskProcess['PRO_TITLE']; $oTaskNewPattern = new Task(); @@ -478,6 +479,7 @@ try { break; case 8: $sType = 'DISCRIMINATOR'; + $oProcessNewPattern = new Process(); $taskProcess=$oProcessNewPattern->load($oData->pro_uid); $titleProcess=$taskProcess['PRO_TITLE']; $oTaskNewPattern = new Task(); From 09ec9b175d905de80b764b6feced263c30034e28 Mon Sep 17 00:00:00 2001 From: Victor Saisa Lopez Date: Thu, 5 Mar 2015 13:47:34 -0400 Subject: [PATCH 5/5] PM-1700 "Ocurre un error al importar y actualizar un proceso..." SOLVED MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue: Ocurre un error al importar y actualizar un proceso de tipo bpmn, despliega un error sin descripció el proceso se convierte en un proceso de tipo classic Cause: Mala definicion de variables para el "Add Audit Log" Solution: Se a suprimido las variables, ahora se utiliza el objeto para el seteo de variables --- workflow/engine/classes/class.processes.php | 28 +++++++----- .../src/ProcessMaker/Importer/Importer.php | 44 +++++++++++++------ 2 files changed, 47 insertions(+), 25 deletions(-) diff --git a/workflow/engine/classes/class.processes.php b/workflow/engine/classes/class.processes.php index 6725e8f66..3f0d72746 100755 --- a/workflow/engine/classes/class.processes.php +++ b/workflow/engine/classes/class.processes.php @@ -2290,14 +2290,16 @@ class Processes try { $map = array(); - foreach ($data->messageType as $key => $value) { - $record = $value; + if (isset($data->messageType)) { + foreach ($data->messageType as $key => $value) { + $record = $value; - if (isset($record["MSGT_UID"])) { - $newUid = $this->getUnusedMessageTypeUid(); + if (isset($record["MSGT_UID"])) { + $newUid = $this->getUnusedMessageTypeUid(); - $map[$record["MSGT_UID"]] = $newUid; - $data->messageType[$key]["MSGT_UID"] = $newUid; + $map[$record["MSGT_UID"]] = $newUid; + $data->messageType[$key]["MSGT_UID"] = $newUid; + } } } @@ -2344,14 +2346,16 @@ class Processes try { $map = array(); - foreach ($data->messageTypeVariable as $key => $value) { - $record = $value; + if (isset($data->messageTypeVariable)) { + foreach ($data->messageTypeVariable as $key => $value) { + $record = $value; - if (isset($record["MSGTV_UID"])) { - $newUid = $this->getUnusedMessageTypeVariableUid(); + if (isset($record["MSGTV_UID"])) { + $newUid = $this->getUnusedMessageTypeVariableUid(); - $map[$record["MSGTV_UID"]] = $newUid; - $data->messageTypeVariable[$key]["MSGTV_UID"] = $newUid; + $map[$record["MSGTV_UID"]] = $newUid; + $data->messageTypeVariable[$key]["MSGTV_UID"] = $newUid; + } } } diff --git a/workflow/engine/src/ProcessMaker/Importer/Importer.php b/workflow/engine/src/ProcessMaker/Importer/Importer.php index 1aef380dc..a240f90cd 100755 --- a/workflow/engine/src/ProcessMaker/Importer/Importer.php +++ b/workflow/engine/src/ProcessMaker/Importer/Importer.php @@ -73,8 +73,7 @@ abstract class Importer { $this->prepare(); - $name = $this->importData["tables"]["bpmn"]["project"][0]["prj_name"]; - + //Verify data switch ($option) { case self::IMPORT_OPTION_CREATE_NEW: if ($this->targetExists()) { @@ -94,23 +93,12 @@ abstract class Importer self::IMPORT_STAT_TARGET_ALREADY_EXISTS ); } - $generateUid = false; break; case self::IMPORT_OPTION_OVERWRITE: - $this->removeProject(); - // this option shouldn't generate new uid for all objects - $generateUid = false; break; case self::IMPORT_OPTION_DISABLE_AND_CREATE_NEW: - $this->disableProject(); - // this option should generate new uid for all objects - $generateUid = true; - $name = "New - " . $name . " - " . date("M d, H:i"); break; case self::IMPORT_OPTION_KEEP_WITHOUT_CHANGING_AND_CREATE_NEW: - // this option should generate new uid for all objects - $generateUid = true; - $name = \G::LoadTranslation("ID_COPY_OF") . " - " . $name . " - " . date("M d, H:i"); break; } @@ -149,6 +137,36 @@ abstract class Importer break; } + //Import + $name = $this->importData["tables"]["bpmn"]["project"][0]["prj_name"]; + + switch ($option) { + case self::IMPORT_OPTION_CREATE_NEW: + //Shouldn't generate new UID for all objects + $generateUid = false; + break; + case self::IMPORT_OPTION_OVERWRITE: + //Shouldn't generate new UID for all objects + $this->removeProject(); + + $generateUid = false; + break; + case self::IMPORT_OPTION_DISABLE_AND_CREATE_NEW: + //Should generate new UID for all objects + $this->disableProject(); + + $name = "New - " . $name . " - " . date("M d, H:i"); + + $generateUid = true; + break; + case self::IMPORT_OPTION_KEEP_WITHOUT_CHANGING_AND_CREATE_NEW: + //Should generate new UID for all objects + $name = \G::LoadTranslation("ID_COPY_OF") . " - " . $name . " - " . date("M d, H:i"); + + $generateUid = true; + break; + } + $this->importData["tables"]["bpmn"]["project"][0]["prj_name"] = $name; $this->importData["tables"]["bpmn"]["diagram"][0]["dia_name"] = $name; $this->importData["tables"]["bpmn"]["process"][0]["pro_name"] = $name;