diff --git a/gulliver/system/class.bootstrap.php b/gulliver/system/class.bootstrap.php
index 2cb4ed477..60c1f651d 100644
--- a/gulliver/system/class.bootstrap.php
+++ b/gulliver/system/class.bootstrap.php
@@ -845,7 +845,10 @@ class Bootstrap
$skinEngine = new SkinEngine('publish', 'blank', '');
$skinEngine->dispatch();
} else {
- die($e->getMessage());
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
}
}
diff --git a/gulliver/system/class.dbMaintenance.php b/gulliver/system/class.dbMaintenance.php
index 71a005eeb..acae6a85f 100755
--- a/gulliver/system/class.dbMaintenance.php
+++ b/gulliver/system/class.dbMaintenance.php
@@ -266,7 +266,10 @@ class DataBaseMaintenance
// Commented that is not assigned to a variable.
// mysql_escape_string("';");
if (! @mysql_query( $sql )) {
- echo mysql_error() . "\n";
+ $ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
+ Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'mysql.log');
+ $varRes = mysql_error() . "\n";
+ G::outRes( $varRes );
return false;
}
return true;
@@ -284,7 +287,10 @@ class DataBaseMaintenance
$tableName = str_replace( '.dump', '', basename( $backupFile ) );
$sql = "LOAD DATA INFILE '$backupFile' INTO TABLE $tableName FIELDS TERMINATED BY '\t|\t' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\t\t\r\r\n'";
if (! @mysql_query( $sql )) {
- print mysql_error() . "\n";
+ $ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
+ Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'mysql.log');
+ $varRes = mysql_error() . "\n";
+ G::outRes( $varRes );
return false;
}
return true;
diff --git a/gulliver/system/class.g.php b/gulliver/system/class.g.php
index 69301c68f..92f93d7c2 100644
--- a/gulliver/system/class.g.php
+++ b/gulliver/system/class.g.php
@@ -5672,6 +5672,17 @@ class G
$clean = ($lowercase) ? (function_exists('mb_strtolower')) ? mb_strtolower($clean, 'UTF-8') : strtolower($clean) : $clean;
return $clean;
}
+ /**
+ * Out the result
+ *
+ * @param string $sVar
+ *
+ * @return showRes($string)
+ */
+ public function outRes ($sInfVar)
+ {
+ echo $sInfVar;
+ }
/**
* encryptOld
*
diff --git a/gulliver/system/class.pmException.php b/gulliver/system/class.pmException.php
index d5bb786de..d615f6b25 100755
--- a/gulliver/system/class.pmException.php
+++ b/gulliver/system/class.pmException.php
@@ -12,7 +12,6 @@ class PMException extends Exception
public function __construct ($message, $code = 0, $previous = null)
{
- //parent::__construct($message, 1, $previous);
parent::__construct( $message, 1 );
}
@@ -20,5 +19,10 @@ class PMException extends Exception
{
return __CLASS__ . ": [{$this->code}]: {$this->message}\n";
}
+
+ public function registerErrorLog($error, $token){
+ $ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
+ Bootstrap::registerMonolog('ExceptionCron', 400, $error->getMessage(), array('token'=>$token), $ws, 'exception.log');
+ }
}
diff --git a/gulliver/thirdparty/phing/Phing.php b/gulliver/thirdparty/phing/Phing.php
index 00e9dfb12..cde340012 100644
--- a/gulliver/thirdparty/phing/Phing.php
+++ b/gulliver/thirdparty/phing/Phing.php
@@ -873,7 +873,7 @@ class Phing {
// that isn't very compatible w/ other frontends (but
// there aren't any right now, so I'm not stressing)
print("Error importing $path\n");
- print($e->getTraceAsString()."\n");
+ error_log( $e->getTraceAsString()."\n" );
}
throw $e;
}
diff --git a/gulliver/thirdparty/phing/parser/TaskHandler.php b/gulliver/thirdparty/phing/parser/TaskHandler.php
index cf4f39417..8c6f104c1 100755
--- a/gulliver/thirdparty/phing/parser/TaskHandler.php
+++ b/gulliver/thirdparty/phing/parser/TaskHandler.php
@@ -135,7 +135,7 @@ class TaskHandler extends AbstractHandler {
} catch (BuildException $be) {
// swallow here, will be thrown again in
// UnknownElement->maybeConfigure if the problem persists.
- print("Swallowing exception: ".$be->getMessage() . "\n");
+ error_log( "Swallowing exception: ".$be->getMessage() . "\n" );
}
// the task is not known of bat, try to load it on thy fly
diff --git a/gulliver/thirdparty/propel-generator/classes/propel/engine/database/model/Column.php b/gulliver/thirdparty/propel-generator/classes/propel/engine/database/model/Column.php
index 7dd13db22..86b356f4e 100755
--- a/gulliver/thirdparty/propel-generator/classes/propel/engine/database/model/Column.php
+++ b/gulliver/thirdparty/propel-generator/classes/propel/engine/database/model/Column.php
@@ -255,8 +255,8 @@ class Column extends XMLElement {
try {
$this->phpName = NameFactory::generateName(NameFactory::PHP_GENERATOR, $inputs);
} catch (EngineException $e) {
- print $e->getMessage() . "\n";
- print $e->getTraceAsString();
+ error_log( $e->getMessage() . "\n" );
+ error_log( $e->getTraceAsString() );
}
}
return $this->phpName;
diff --git a/gulliver/thirdparty/propel-generator/classes/propel/engine/database/model/NameFactory.php b/gulliver/thirdparty/propel-generator/classes/propel/engine/database/model/NameFactory.php
index adea24379..85bd837df 100755
--- a/gulliver/thirdparty/propel-generator/classes/propel/engine/database/model/NameFactory.php
+++ b/gulliver/thirdparty/propel-generator/classes/propel/engine/database/model/NameFactory.php
@@ -88,8 +88,8 @@ class NameFactory {
}
$algorithm = new $name();
} catch (BuildException $e) {
- print $e->getMessage() . "\n";
- print $e->getTraceAsString();
+ error_log( $e->getMessage() . "\n" );
+ error_log( $e->getTraceAsString() );
}
$this->algorithms[$name] = $algorithm;
}
diff --git a/gulliver/thirdparty/propel-generator/classes/propel/engine/database/model/Table.php b/gulliver/thirdparty/propel-generator/classes/propel/engine/database/model/Table.php
index 2e80031bd..33d024a69 100755
--- a/gulliver/thirdparty/propel-generator/classes/propel/engine/database/model/Table.php
+++ b/gulliver/thirdparty/propel-generator/classes/propel/engine/database/model/Table.php
@@ -198,8 +198,8 @@ class Table extends XMLElement implements IDMethod {
$this->addIndex(new Index($this, array_slice($pk, $i, $size)));
}
} catch (EngineException $e) {
- print $e->getMessage() . "\n";
- print $e->getTraceAsString();
+ error_log( $e->getMessage() . "\n" );
+ error_log( $e->getTraceAsString() );
}
}
@@ -243,8 +243,8 @@ class Table extends XMLElement implements IDMethod {
// as test cases), so we'll assume that we needn't add an
// entry to the system name list for these.
} catch (EngineException $nameAlreadyInUse) {
- print $nameAlreadyInUse->getMessage() . "\n";
- print $nameAlreadyInUse->getTraceAsString();
+ error_log( $nameAlreadyInUse->getMessage() . "\n" );
+ error_log( $nameAlreadyInUse->getTraceAsString() );
}
}
@@ -596,8 +596,8 @@ class Table extends XMLElement implements IDMethod {
try {
$this->phpName = NameFactory::generateName(NameFactory::PHP_GENERATOR, $inputs);
} catch (EngineException $e) {
- print $e->getMessage() . "\n";
- print $e->getTraceAsString();
+ error_log( $e->getMessage() . "\n" );
+ error_log( $e->getTraceAsString() );
}
}
return $this->phpName;
diff --git a/gulliver/thirdparty/propel-generator/classes/propel/engine/database/transform/XmlToData.php b/gulliver/thirdparty/propel-generator/classes/propel/engine/database/transform/XmlToData.php
index 9b5fbffd9..cc845d850 100755
--- a/gulliver/thirdparty/propel-generator/classes/propel/engine/database/transform/XmlToData.php
+++ b/gulliver/thirdparty/propel-generator/classes/propel/engine/database/transform/XmlToData.php
@@ -84,13 +84,13 @@ class XmlToData extends AbstractHandler {
try {
$this->parser->parse();
} catch (Exception $e) {
- print $e->getMessage() . "\n";
+ error_log( $e->getMessage() . "\n" );
$br->close();
}
$br->close();
} catch (Exception $e) {
- print $e->getMessage() . "\n";
- print $e->getTraceAsString();
+ error_log( $e->getMessage() . "\n" );
+ error_log( $e->getTraceAsString() );
}
return $this->data;
diff --git a/rbac/engine/config/schema.xml b/rbac/engine/config/schema.xml
index 74a992a53..3198e8ebd 100755
--- a/rbac/engine/config/schema.xml
+++ b/rbac/engine/config/schema.xml
@@ -28,6 +28,9 @@
+
+
+
@@ -81,6 +84,10 @@
+
+
+
+
@@ -108,6 +115,9 @@
+
+
+
diff --git a/rbac/engine/data/mysql/schema.sql b/rbac/engine/data/mysql/schema.sql
index a4078ddac..5dababf24 100755
--- a/rbac/engine/data/mysql/schema.sql
+++ b/rbac/engine/data/mysql/schema.sql
@@ -4,7 +4,7 @@
SET FOREIGN_KEY_CHECKS = 0;
#-----------------------------------------------------------------------------
-#-- PERMISSIONS
+#-- RBAC_PERMISSIONS
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS `RBAC_PERMISSIONS`;
@@ -18,10 +18,11 @@ CREATE TABLE `RBAC_PERMISSIONS`
`PER_UPDATE_DATE` DATETIME,
`PER_STATUS` INTEGER default 1 NOT NULL,
`PER_SYSTEM` VARCHAR(32) default '00000000000000000000000000000002' NOT NULL,
- PRIMARY KEY (`PER_UID`)
+ PRIMARY KEY (`PER_UID`),
+ KEY `indexPermissionsCode`(`PER_CODE`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Permissions';
#-----------------------------------------------------------------------------
-#-- ROLES
+#-- RBAC_ROLES
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS `RBAC_ROLES`;
@@ -39,7 +40,7 @@ CREATE TABLE `RBAC_ROLES`
PRIMARY KEY (`ROL_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Roles';
#-----------------------------------------------------------------------------
-#-- ROLES_PERMISSIONS
+#-- RBAC_ROLES_PERMISSIONS
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS `RBAC_ROLES_PERMISSIONS`;
@@ -49,10 +50,11 @@ CREATE TABLE `RBAC_ROLES_PERMISSIONS`
(
`ROL_UID` VARCHAR(32) default '' NOT NULL,
`PER_UID` VARCHAR(32) default '' NOT NULL,
- PRIMARY KEY (`ROL_UID`,`PER_UID`)
+ PRIMARY KEY (`ROL_UID`,`PER_UID`),
+ KEY `indexRolesPermissions`(`ROL_UID`, `PER_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Permissions of the roles';
#-----------------------------------------------------------------------------
-#-- SYSTEMS
+#-- RBAC_SYSTEMS
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS `RBAC_SYSTEMS`;
@@ -65,10 +67,11 @@ CREATE TABLE `RBAC_SYSTEMS`
`SYS_CREATE_DATE` DATETIME,
`SYS_UPDATE_DATE` DATETIME,
`SYS_STATUS` INTEGER default 0 NOT NULL,
- PRIMARY KEY (`SYS_UID`)
+ PRIMARY KEY (`SYS_UID`),
+ KEY `indexSystemCode`(`SYS_CODE`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Systems';
#-----------------------------------------------------------------------------
-#-- USERS
+#-- RBAC_USERS
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS `RBAC_USERS`;
@@ -93,7 +96,7 @@ CREATE TABLE `RBAC_USERS`
PRIMARY KEY (`USR_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Users';
#-----------------------------------------------------------------------------
-#-- USERS_ROLES
+#-- RBAC_USERS_ROLES
#-----------------------------------------------------------------------------
DROP TABLE IF EXISTS `RBAC_USERS_ROLES`;
diff --git a/workflow/engine/bin/reindex_solr.php b/workflow/engine/bin/reindex_solr.php
index 21043b757..fc31dedf2 100644
--- a/workflow/engine/bin/reindex_solr.php
+++ b/workflow/engine/bin/reindex_solr.php
@@ -293,7 +293,9 @@ if (! defined ('SYS_SYS')) {
processWorkspace ();
}
catch (Exception $e) {
- echo $e->getMessage ();
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
eprintln ("Problem in workspace: " . $sObject . ' it was omitted.', 'red');
}
eprintln ();
diff --git a/workflow/engine/bin/tasks/cliAddons.php b/workflow/engine/bin/tasks/cliAddons.php
index 37a44d61c..78b8aa81b 100644
--- a/workflow/engine/bin/tasks/cliAddons.php
+++ b/workflow/engine/bin/tasks/cliAddons.php
@@ -133,7 +133,9 @@ function change_hash($command, $opts)
$workspace->close();
CLI::logging(pakeColor::colorize("Changed...", "ERROR") . "\n");
} catch (Exception $e) {
- echo "> Error: ".CLI::error(G::getErrorMessage($e)) . "\n";
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( "> Error: " . CLI::error(G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token))) . "\n" );
}
}
}
diff --git a/workflow/engine/classes/class.actionsByEmailCore.php b/workflow/engine/classes/class.actionsByEmailCore.php
index c24a0bf79..f6204643d 100644
--- a/workflow/engine/classes/class.actionsByEmailCore.php
+++ b/workflow/engine/classes/class.actionsByEmailCore.php
@@ -9,7 +9,7 @@ class actionsByEmailCoreClass extends PMPlugin
public function setup()
{
-
+
}
public function getFieldsForPageSetup()
@@ -66,7 +66,9 @@ class actionsByEmailCoreClass extends PMPlugin
error_log('The parameter $data->USR_UID is empty, the routed task may be a self-service type, actions by email does not work with self-service task types.', 0);
}
} catch(Exception $e) {
- echo $e->getMessage().' Please contact to your system administrator.';
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
die;
}
G::LoadClass('pmFunctions');
diff --git a/workflow/engine/classes/class.case.php b/workflow/engine/classes/class.case.php
index 116a76317..4cd495ec3 100755
--- a/workflow/engine/classes/class.case.php
+++ b/workflow/engine/classes/class.case.php
@@ -1168,6 +1168,9 @@ class Cases
$oCriteria = new Criteria('workflow');
$oCriteria->add(ListCompletedPeer::APP_UID, $sAppUid);
ListCompletedPeer::doDelete($oCriteria);
+ $oCriteria = new Criteria('workflow');
+ $oCriteria->add(ListUnassignedPeer::APP_UID, $sAppUid);
+ ListUnassignedPeer::doDelete($oCriteria);
/*----------------------------------********---------------------------------*/
return $result;
} catch (exception $e) {
diff --git a/workflow/engine/classes/class.processes.php b/workflow/engine/classes/class.processes.php
index cf015a66b..152f6e286 100755
--- a/workflow/engine/classes/class.processes.php
+++ b/workflow/engine/classes/class.processes.php
@@ -4126,7 +4126,11 @@ class Processes
foreach ($arrayData as $value) {
$record = $value;
- $result = $scriptTask->create($processUid, $record);
+ try {
+ $result = $scriptTask->create($processUid, $record);
+ } catch (Exception $e) {
+ Bootstrap::registerMonolog('DataError', 400, $e->getMessage(), $record, SYS_SYS, 'processImporter.log');
+ }
}
} catch (Exception $e) {
throw $e;
@@ -6114,4 +6118,3 @@ class ObjectCellection
}
}
}
-
diff --git a/workflow/engine/classes/model/AppEvent.php b/workflow/engine/classes/model/AppEvent.php
index 2f5b421c6..f35100b7e 100755
--- a/workflow/engine/classes/model/AppEvent.php
+++ b/workflow/engine/classes/model/AppEvent.php
@@ -322,7 +322,10 @@ class AppEvent extends BaseAppEvent
return $c;
} catch (Exception $oError) {
$log[] = ' Error execute event : ' . $oError->getMessage();
- die( $oError->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oError, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
return $oError->getMessage();
}
}
diff --git a/workflow/engine/classes/model/ListCanceled.php b/workflow/engine/classes/model/ListCanceled.php
index a581c1c1c..44771b420 100644
--- a/workflow/engine/classes/model/ListCanceled.php
+++ b/workflow/engine/classes/model/ListCanceled.php
@@ -306,5 +306,18 @@ class ListCanceled extends BaseListCanceled {
return $data;
}
+
+ /**
+ * Returns the number of cases of a user
+ * @param $usrUid
+ * @return int
+ */
+ public function getCountList($usrUid)
+ {
+ $criteria = new Criteria();
+ $criteria->add(ListCanceledPeer::USR_UID, $usrUid, Criteria::EQUAL);
+ $total = ListCanceledPeer::doCount($criteria);
+ return (int)$total;
+ }
} // ListCanceled
diff --git a/workflow/engine/classes/model/ListCompleted.php b/workflow/engine/classes/model/ListCompleted.php
index 4cf8c2afc..960a12d9b 100644
--- a/workflow/engine/classes/model/ListCompleted.php
+++ b/workflow/engine/classes/model/ListCompleted.php
@@ -320,5 +320,18 @@ class ListCompleted extends BaseListCompleted
return $data;
}
+
+ /**
+ * Returns the number of cases of a user
+ * @param $usrUid
+ * @return int
+ */
+ public function getCountList($usrUid)
+ {
+ $criteria = new Criteria();
+ $criteria->add(ListCompletedPeer::USR_UID, $usrUid, Criteria::EQUAL);
+ $total = ListCompletedPeer::doCount($criteria);
+ return (int)$total;
+ }
} // ListCompleted
diff --git a/workflow/engine/classes/model/ListInbox.php b/workflow/engine/classes/model/ListInbox.php
index f91f23c94..636b23a53 100644
--- a/workflow/engine/classes/model/ListInbox.php
+++ b/workflow/engine/classes/model/ListInbox.php
@@ -598,5 +598,24 @@ class ListInbox extends BaseListInbox
return isset($aRow[$fieldName]) ? $aRow[$fieldName] : NULL;
}
+ /**
+ * Returns the number of cases of a user
+ * @param $usrUid
+ * @param string $appStatus
+ * @return int
+ */
+ public function getCountList($usrUid, $appStatus = 'DRAFT')
+ {
+ $criteria = new Criteria();
+ $criteria->add(ListInboxPeer::USR_UID, $usrUid, Criteria::EQUAL);
+ if ($appStatus == 'TO_DO') {
+ $criteria->add(ListInboxPeer::APP_STATUS, 'TO_DO', Criteria::EQUAL);
+ } else {
+ $criteria->add(ListInboxPeer::APP_STATUS, 'DRAFT', Criteria::EQUAL);
+ }
+ $total = ListInboxPeer::doCount($criteria);
+ return (int)$total;
+ }
+
}
diff --git a/workflow/engine/classes/model/ListParticipatedLast.php b/workflow/engine/classes/model/ListParticipatedLast.php
index 067b9c421..276109129 100644
--- a/workflow/engine/classes/model/ListParticipatedLast.php
+++ b/workflow/engine/classes/model/ListParticipatedLast.php
@@ -405,5 +405,18 @@ class ListParticipatedLast extends BaseListParticipatedLast
}
BasePeer::doUpdate($criteriaWhere, $criteriaSet, $con);
}
+
+ /**
+ * Returns the number of cases of a user
+ * @param $usrUid
+ * @return int
+ */
+ public function getCountList($usrUid)
+ {
+ $criteria = new Criteria();
+ $criteria->add(ListParticipatedLastPeer::USR_UID, $usrUid, Criteria::EQUAL);
+ $total = ListParticipatedLastPeer::doCount($criteria);
+ return (int)$total;
+ }
}
diff --git a/workflow/engine/classes/model/ListPaused.php b/workflow/engine/classes/model/ListPaused.php
index d259d48e1..4f8d9bde0 100644
--- a/workflow/engine/classes/model/ListPaused.php
+++ b/workflow/engine/classes/model/ListPaused.php
@@ -328,5 +328,18 @@ class ListPaused extends BaseListPaused {
return $data;
}
+
+ /**
+ * Returns the number of cases of a user
+ * @param $usrUid
+ * @return int
+ */
+ public function getCountList($usrUid)
+ {
+ $criteria = new Criteria();
+ $criteria->add(ListPausedPeer::USR_UID, $usrUid, Criteria::EQUAL);
+ $total = ListPausedPeer::doCount($criteria);
+ return (int)$total;
+ }
} // ListPaused
diff --git a/workflow/engine/classes/model/ListUnassigned.php b/workflow/engine/classes/model/ListUnassigned.php
index 2a5f1a06e..912baa31c 100644
--- a/workflow/engine/classes/model/ListUnassigned.php
+++ b/workflow/engine/classes/model/ListUnassigned.php
@@ -460,5 +460,45 @@ class ListUnassigned extends BaseListUnassigned
return $tasks;
}
+
+ /**
+ * Returns the number of cases of a user
+ * @param $userUid
+ * @return int
+ */
+ public function getCountList($userUid)
+ {
+ $criteria = new Criteria('workflow');
+ $tasks = $this->getSelfServiceTasks($userUid);
+ $arrayAppAssignSelfServiceValueData = $this->getSelfServiceCasesByEvaluate($userUid);
+
+ if (!empty($arrayAppAssignSelfServiceValueData)) {
+ //Self Service Value Based Assignment
+ $criterionAux = null;
+
+ foreach ($arrayAppAssignSelfServiceValueData as $value) {
+ if (is_null($criterionAux)) {
+ $criterionAux = $criteria->getNewCriterion(ListUnassignedPeer::APP_UID, $value["APP_UID"], Criteria::EQUAL)->addAnd(
+ $criteria->getNewCriterion(ListUnassignedPeer::DEL_INDEX, $value["DEL_INDEX"], Criteria::EQUAL))->addAnd(
+ $criteria->getNewCriterion(ListUnassignedPeer::TAS_UID, $value["TAS_UID"], Criteria::EQUAL));
+ } else {
+ $criterionAux = $criteria->getNewCriterion(ListUnassignedPeer::APP_UID, $value["APP_UID"], Criteria::EQUAL)->addAnd(
+ $criteria->getNewCriterion(ListUnassignedPeer::DEL_INDEX, $value["DEL_INDEX"], Criteria::EQUAL))->addAnd(
+ $criteria->getNewCriterion(ListUnassignedPeer::TAS_UID, $value["TAS_UID"], Criteria::EQUAL))->addOr(
+ $criterionAux
+ );
+ }
+ }
+
+ $criteria->add(
+ $criterionAux->addOr($criteria->getNewCriterion(ListUnassignedPeer::TAS_UID, $tasks, Criteria::IN))
+ );
+ } else {
+ //Self Service
+ $criteria->add(ListUnassignedPeer::TAS_UID, $tasks, Criteria::IN);
+ }
+ $total = ListUnassignedPeer::doCount($criteria);
+ return (int)$total;
+ }
}
diff --git a/workflow/engine/classes/model/Translation.php b/workflow/engine/classes/model/Translation.php
index 970db5ba4..3a3dc25e0 100755
--- a/workflow/engine/classes/model/Translation.php
+++ b/workflow/engine/classes/model/Translation.php
@@ -192,7 +192,9 @@ class Translation extends BaseTranslation
$res['rowsJS'] = count( $translationJS );
return $res;
} catch (Exception $e) {
- echo $e->getMessage();
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
}
}
@@ -239,7 +241,9 @@ class Translation extends BaseTranslation
$res['rowsMafeJS'] = count( $translation );
return $res;
} catch (Exception $e) {
- echo $e->getMessage();
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
}
}
@@ -362,7 +366,9 @@ class Translation extends BaseTranslation
$res['rowsJS'] = count( $translationJS );
return $res;
} catch (Exception $e) {
- echo $e->getMessage();
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
}
}
diff --git a/workflow/engine/classes/model/om/BaseProcess.php b/workflow/engine/classes/model/om/BaseProcess.php
index 42e8131b9..00dfdd619 100755
--- a/workflow/engine/classes/model/om/BaseProcess.php
+++ b/workflow/engine/classes/model/om/BaseProcess.php
@@ -259,7 +259,7 @@ abstract class BaseProcess extends BaseObject implements Persistent
* The value for the pro_action_done field.
* @var string
*/
- protected $pro_action_done = '';
+ protected $pro_action_done;
/**
* Flag to prevent endless save loop, if this object is referenced
@@ -1599,7 +1599,7 @@ abstract class BaseProcess extends BaseObject implements Persistent
$v = (string) $v;
}
- if ($this->pro_action_done !== $v || $v === '') {
+ if ($this->pro_action_done !== $v) {
$this->pro_action_done = $v;
$this->modifiedColumns[] = ProcessPeer::PRO_ACTION_DONE;
}
diff --git a/workflow/engine/config/schema.xml b/workflow/engine/config/schema.xml
index 96e902bcc..9059483a1 100755
--- a/workflow/engine/config/schema.xml
+++ b/workflow/engine/config/schema.xml
@@ -913,7 +913,7 @@
-
+
@@ -1004,6 +1004,10 @@
+
+
+
+
@@ -2163,6 +2167,9 @@
+
+
+
@@ -2275,6 +2282,9 @@
+
+
+
@@ -2419,6 +2429,11 @@
+
+
+
+
+
@@ -4002,6 +4017,9 @@
+
+
+
@@ -4251,6 +4269,15 @@
+
+
+
+
+
+
+
+
+
@@ -4789,6 +4816,13 @@
+
+
+
+
+
+
+
diff --git a/workflow/engine/content/translations/english/processmaker.en.po b/workflow/engine/content/translations/english/processmaker.en.po
index 5d8313952..fcc4cad72 100644
--- a/workflow/engine/content/translations/english/processmaker.en.po
+++ b/workflow/engine/content/translations/english/processmaker.en.po
@@ -2,7 +2,7 @@ msgid ""
msgstr ""
"Project-Id-Version: ProcessMaker (Branch 3.1)\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2016-07-11 20:25:46\n"
+"PO-Revision-Date: 2016-07-29 18:36:34\n"
"Last-Translator: \n"
"Language-Team: Colosa Developers Team \n"
"MIME-Version: 1.0\n"
@@ -472,8 +472,8 @@ msgstr "Assign Screen"
# TRANSLATION
# LABEL/ID_ASSIGN_TASK
#: LABEL/ID_ASSIGN_TASK
-msgid "Assign Task"
-msgstr "Assign Task"
+msgid "Assign Task/Event"
+msgstr "Assign Task/Event"
# TRANSLATION
# LABEL/ID_UPLOAD
@@ -2602,8 +2602,8 @@ msgstr "Session"
# TRANSLATION
# LABEL/ID_NEXT_TASK
#: LABEL/ID_NEXT_TASK
-msgid "Next Task"
-msgstr "Next Task"
+msgid "Next Task/Event"
+msgstr "Next Task/Event"
# TRANSLATION
# LABEL/ID_PERMISSIONS_FOR_THE_ROL
@@ -17596,8 +17596,8 @@ msgstr "The process \"{0}\" has the following unwanted code (this code should be
# TRANSLATION
# LABEL/ID_LECA
#: LABEL/ID_LECA
-msgid "Your license has expired, please contact your administrator."
-msgstr "Your license has expired, please contact your administrator."
+msgid "Your license has expired. Please contact your administrator."
+msgstr "Your license has expired. Please contact your administrator."
# TRANSLATION
# LABEL/ID_NLIC
@@ -20752,7 +20752,7 @@ msgstr "There are no items."
# TRANSLATION
# LABEL/ID_MAFE_545106eebc5cfec4095c8903a3e5bea9
#: LABEL/ID_MAFE_545106eebc5cfec4095c8903a3e5bea9
-msgid "[LABEL/ID_MAFE_545106eebc5cfec4095c8903a3e5bea9] Next Task"
+msgid "Next Task"
msgstr "Next Task"
# TRANSLATION
@@ -27503,6 +27503,102 @@ msgstr "This is a Message of Error"
msgid "Can't connect start event to subprocess"
msgstr "Can't connect start event to subprocess"
+# TRANSLATION
+# LABEL/ID_EEPLUGIN_IMPORT_PLUGIN_NOT_IS_ENTERPRISE
+#: LABEL/ID_EEPLUGIN_IMPORT_PLUGIN_NOT_IS_ENTERPRISE
+msgid "The plugin \"{0}\" not is a Enterprise Edition Plugin"
+msgstr "The plugin \"{0}\" not is a Enterprise Edition Plugin"
+
+# TRANSLATION
+# LABEL/ID_PMPLUGIN_IMPORT_PLUGIN_IS_ENTERPRISE
+#: LABEL/ID_PMPLUGIN_IMPORT_PLUGIN_IS_ENTERPRISE
+msgid "The plugin \"{0}\" is a Enterprise Edition Plugin, please install the Enterprise Plugins Manager to use this plugin"
+msgstr "The plugin \"{0}\" is a Enterprise Edition Plugin, please install the Enterprise Plugins Manager to use this plugin"
+
+# TRANSLATION
+# LABEL/ID_USER_GROUP_NOT_CORRESPOND
+#: LABEL/ID_USER_GROUP_NOT_CORRESPOND
+msgid "This id: {0} not correspond to a {1}"
+msgstr "This id: {0} not correspond to a {1}"
+
+# TRANSLATION
+# LABEL/ID_PROCESS_CANNOT_BE_UPDATED_THERE_ARE_TASKS_WITH_ACTIVE_CASES
+#: LABEL/ID_PROCESS_CANNOT_BE_UPDATED_THERE_ARE_TASKS_WITH_ACTIVE_CASES
+msgid "The process cannot be updated because there are tasks with active cases which are not presented in the new definition of the process, please verify that there are not active cases in those tasks before trying to import the process again."
+msgstr "The process cannot be updated because there are tasks with active cases which are not presented in the new definition of the process, please verify that there are not active cases in those tasks before trying to import the process again."
+
+# TRANSLATION
+# LABEL/ID_MILLISECONDS
+#: LABEL/ID_MILLISECONDS
+msgid "Milliseconds"
+msgstr "Milliseconds"
+
+# TRANSLATION
+# LABEL/ID_FIELD_NOT_FOUND
+#: LABEL/ID_FIELD_NOT_FOUND
+msgid "Field not found"
+msgstr "Field not found"
+
+# TRANSLATION
+# LABEL/ID_OUTPUT_DOCUMENT_INVALID_EXTENSION
+#: LABEL/ID_OUTPUT_DOCUMENT_INVALID_EXTENSION
+msgid "Invalid extension"
+msgstr "Invalid extension"
+
+# TRANSLATION
+# LABEL/ID_OUTPUT_DOCUMENT_CONFIG_NOT_SUPPORT_EXTENSION
+#: LABEL/ID_OUTPUT_DOCUMENT_CONFIG_NOT_SUPPORT_EXTENSION
+msgid "The document in its configuration does not support this extension"
+msgstr "The document in its configuration does not support this extension"
+
+# TRANSLATION
+# LABEL/ID_NOT_EXISTS_FILE
+#: LABEL/ID_NOT_EXISTS_FILE
+msgid "File does not exists"
+msgstr "File does not exists"
+
+# TRANSLATION
+# LABEL/ID_EXCEPTION_LOG_INTERFAZ
+#: LABEL/ID_EXCEPTION_LOG_INTERFAZ
+msgid "An internal error occurred #{0}. Please contact your system administrator for more information."
+msgstr "An internal error occurred #{0}. Please contact your system administrator for more information."
+
+# TRANSLATION
+# LABEL/ID_CASE_OUTPUT_DOCUMENT_DOES_NOT_EXIST
+#: LABEL/ID_CASE_OUTPUT_DOCUMENT_DOES_NOT_EXIST
+msgid "This output document with {0}: {1} does not exist."
+msgstr "This output document with {0}: {1} does not exist."
+
+# TRANSLATION
+# LABEL/ID_MAFE_a9f2bfaa472c55e0975d15c0ba59d24d
+#: LABEL/ID_MAFE_a9f2bfaa472c55e0975d15c0ba59d24d
+msgid "Before Output Document"
+msgstr "Before Output Document"
+
+# TRANSLATION
+# LABEL/ID_MAFE_41e80c3ce414de15ab19d996f7072429
+#: LABEL/ID_MAFE_41e80c3ce414de15ab19d996f7072429
+msgid "fileupload"
+msgstr "fileupload"
+
+# TRANSLATION
+# LABEL/ID_MAFE_c72d7ee8a23bae4c80e8cc4521f89f7a
+#: LABEL/ID_MAFE_c72d7ee8a23bae4c80e8cc4521f89f7a
+msgid "Steps for task"
+msgstr "Steps for task"
+
+# TRANSLATION
+# LABEL/ID_MAFE_d0aac4ce1ac97df2b4c6e456bbe3a061
+#: LABEL/ID_MAFE_d0aac4ce1ac97df2b4c6e456bbe3a061
+msgid "Expand all"
+msgstr "Expand all"
+
+# TRANSLATION
+# LABEL/ID_MAFE_ab3cc3868af33a9eb61a93bd0adec2a0
+#: LABEL/ID_MAFE_ab3cc3868af33a9eb61a93bd0adec2a0
+msgid "Collapse all"
+msgstr "Collapse all"
+
# additionalTables/additionalTablesData.xml?ADD_TAB_NAME
# additionalTables/additionalTablesData.xml
#: text - ADD_TAB_NAME
diff --git a/workflow/engine/controllers/adminProxy.php b/workflow/engine/controllers/adminProxy.php
index ee0433e04..f64274ce6 100644
--- a/workflow/engine/controllers/adminProxy.php
+++ b/workflow/engine/controllers/adminProxy.php
@@ -1235,7 +1235,10 @@ class adminProxy extends HttpProxyController
break;
}
} catch (Exception $oException) {
- die($oException->getMessage());
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
exit();
}
diff --git a/workflow/engine/data/mysql/schema.sql b/workflow/engine/data/mysql/schema.sql
index 4addde059..256ce325b 100755
--- a/workflow/engine/data/mysql/schema.sql
+++ b/workflow/engine/data/mysql/schema.sql
@@ -460,7 +460,7 @@ CREATE TABLE `PROCESS`
`PRO_COST` DECIMAL(7,2) default 0,
`PRO_UNIT_COST` VARCHAR(50) default '',
`PRO_ITEE` INTEGER default 0 NOT NULL,
- `PRO_ACTION_DONE` MEDIUMTEXT default '',
+ `PRO_ACTION_DONE` MEDIUMTEXT,
PRIMARY KEY (`PRO_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Store process Information';
#-----------------------------------------------------------------------------
@@ -493,7 +493,8 @@ CREATE TABLE `REPORT_TABLE`
`REP_TAB_CONNECTION` VARCHAR(32) default '' NOT NULL,
`REP_TAB_CREATE_DATE` DATETIME NOT NULL,
`REP_TAB_STATUS` CHAR(8) default 'ACTIVE' NOT NULL,
- PRIMARY KEY (`REP_TAB_UID`)
+ PRIMARY KEY (`REP_TAB_UID`),
+ KEY `indexProcessStatus`(`PRO_UID`, `REP_TAB_STATUS`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
#-----------------------------------------------------------------------------
#-- REPORT_VAR
@@ -1005,7 +1006,8 @@ CREATE TABLE `SUB_APPLICATION`
`SA_VALUES_IN` MEDIUMTEXT,
`SA_INIT_DATE` DATETIME,
`SA_FINISH_DATE` DATETIME,
- PRIMARY KEY (`APP_UID`,`APP_PARENT`,`DEL_INDEX_PARENT`,`DEL_THREAD_PARENT`)
+ PRIMARY KEY (`APP_UID`,`APP_PARENT`,`DEL_INDEX_PARENT`,`DEL_THREAD_PARENT`),
+ KEY `indexParent`(`APP_PARENT`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
#-----------------------------------------------------------------------------
#-- LOGIN_LOG
@@ -1067,7 +1069,8 @@ CREATE TABLE `ADDITIONAL_TABLES`
`ADD_TAB_TYPE` VARCHAR(32) default '',
`ADD_TAB_GRID` VARCHAR(256) default '',
`ADD_TAB_TAG` VARCHAR(256) default '',
- PRIMARY KEY (`ADD_TAB_UID`)
+ PRIMARY KEY (`ADD_TAB_UID`),
+ KEY `indexAdditionalProcess`(`PRO_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
#-----------------------------------------------------------------------------
#-- FIELDS
@@ -1145,7 +1148,8 @@ CREATE TABLE `EVENT`
`EVN_TYPE` VARCHAR(32) default '',
`TAS_EVN_UID` VARCHAR(32) default '',
PRIMARY KEY (`EVN_UID`),
- KEY `indexEventTable`(`EVN_UID`)
+ KEY `indexEventTable`(`EVN_UID`),
+ KEY `indexStatusActionProcess`(`EVN_STATUS`, `EVN_ACTION`, `PRO_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
#-----------------------------------------------------------------------------
#-- GATEWAY
@@ -2230,7 +2234,8 @@ CREATE TABLE `ADDONS_MANAGER`
`ADDON_DOWNLOAD_URL` VARCHAR(2048),
`ADDON_DOWNLOAD_PROGRESS` FLOAT,
`ADDON_DOWNLOAD_MD5` VARCHAR(32),
- PRIMARY KEY (`ADDON_ID`,`STORE_ID`)
+ PRIMARY KEY (`ADDON_ID`,`STORE_ID`),
+ KEY `indexAddonsType`(`ADDON_TYPE`)
)ENGINE=InnoDB ;
#-----------------------------------------------------------------------------
#-- LICENSE_MANAGER
@@ -2393,7 +2398,8 @@ CREATE TABLE `LIST_COMPLETED`
`DEL_CURRENT_USR_USERNAME` VARCHAR(100) default '',
`DEL_CURRENT_USR_FIRSTNAME` VARCHAR(50) default '',
`DEL_CURRENT_USR_LASTNAME` VARCHAR(50) default '',
- PRIMARY KEY (`APP_UID`)
+ PRIMARY KEY (`APP_UID`),
+ KEY `usrListCompleted`(`USR_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Completed list';
#-----------------------------------------------------------------------------
#-- LIST_PAUSED
@@ -2705,7 +2711,9 @@ CREATE TABLE `ABE_CONFIGURATION`
`ABE_SUBJECT_FIELD` VARCHAR(100) default '',
`ABE_MAILSERVER_OR_MAILCURRENT` INTEGER default 0,
`ABE_CUSTOM_GRID` MEDIUMTEXT,
- PRIMARY KEY (`ABE_UID`)
+ PRIMARY KEY (`ABE_UID`),
+ KEY `indexAbeProcess`(`PRO_UID`),
+ KEY `indexAbeProcessTask`(`PRO_UID`, `TAS_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='The plugin table for actionsByEmail';
#-----------------------------------------------------------------------------
#-- ABE_REQUESTS
diff --git a/workflow/engine/methods/authSources/authSources_Ajax.php b/workflow/engine/methods/authSources/authSources_Ajax.php
index 4ad8f7763..9b59ad831 100755
--- a/workflow/engine/methods/authSources/authSources_Ajax.php
+++ b/workflow/engine/methods/authSources/authSources_Ajax.php
@@ -136,7 +136,10 @@ try {
$response = isset( $aAuth[$authUID] ) ? 'false' : 'true';
echo '{success: ' . $response . '}';
} catch (Exception $ex) {
- echo '{success: false, error: ' . $ex->getMessage() . '}';
+ $token = strtotime("now");
+ PMException::registerErrorLog($ex, $token);
+ $varRes = '{success: false, error: ' . G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . '}';
+ G::outRes( $varRes );
}
break;
case 'deleteAuthSource':
@@ -145,7 +148,10 @@ try {
$RBAC->removeAuthSource( $_POST['auth_uid'] );
echo '{success: true}';
} catch (Exception $ex) {
- echo '{success: false, error: ' . $ex->getMessage() . '}';
+ $token = strtotime("now");
+ PMException::registerErrorLog($ex, $token);
+ $varRes = '{success: false, error: ' . G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . '}';
+ G::outRes( $varRes );
}
break;
case 'authSourcesNew':
diff --git a/workflow/engine/methods/cases/CaseSchedulerCreateUpdate.php b/workflow/engine/methods/cases/CaseSchedulerCreateUpdate.php
index 2a9c9da33..e84169d73 100644
--- a/workflow/engine/methods/cases/CaseSchedulerCreateUpdate.php
+++ b/workflow/engine/methods/cases/CaseSchedulerCreateUpdate.php
@@ -13,7 +13,9 @@ try {
G::header("Location: cases_Scheduler_List?PRO_UID=" . $prossesUid);
} catch (Exception $e) {
- echo $e->getMessage();
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
exit(0);
}
diff --git a/workflow/engine/methods/cases/cases_Delete.php b/workflow/engine/methods/cases/cases_Delete.php
index 9b8bef0ed..24cdb8939 100755
--- a/workflow/engine/methods/cases/cases_Delete.php
+++ b/workflow/engine/methods/cases/cases_Delete.php
@@ -53,6 +53,8 @@ try {
}
}
} catch (Exception $e) {
- echo $e->getMessage();
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
}
diff --git a/workflow/engine/methods/cases/cases_PrintView.php b/workflow/engine/methods/cases/cases_PrintView.php
index a49f7a4c8..64bf8356e 100755
--- a/workflow/engine/methods/cases/cases_PrintView.php
+++ b/workflow/engine/methods/cases/cases_PrintView.php
@@ -91,7 +91,10 @@ try {
$G_PUBLISH->AddContent( 'dynaform', 'xmlform', $aDyn['PRO_UID'] . '/' . $aDyn['DYN_UID'], '', $Fields['APP_DATA'], '', '', 'view' );
G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
?>
diff --git a/workflow/engine/methods/cases/cases_Reassign.php b/workflow/engine/methods/cases/cases_Reassign.php
index ca4ab3bd8..09ebd0fd7 100755
--- a/workflow/engine/methods/cases/cases_Reassign.php
+++ b/workflow/engine/methods/cases/cases_Reassign.php
@@ -117,6 +117,9 @@ try {
G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/cases/cases_ReassignByUser.php b/workflow/engine/methods/cases/cases_ReassignByUser.php
index 9f250cf37..f2990a598 100755
--- a/workflow/engine/methods/cases/cases_ReassignByUser.php
+++ b/workflow/engine/methods/cases/cases_ReassignByUser.php
@@ -143,7 +143,10 @@ try {
G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
?>
diff --git a/workflow/engine/methods/cases/cases_Reassign_save.php b/workflow/engine/methods/cases/cases_Reassign_save.php
index af4dbc61f..e10b7cd7d 100755
--- a/workflow/engine/methods/cases/cases_Reassign_save.php
+++ b/workflow/engine/methods/cases/cases_Reassign_save.php
@@ -70,6 +70,9 @@ try {
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/cases/cases_Scheduler_Edit.php b/workflow/engine/methods/cases/cases_Scheduler_Edit.php
index 5acc5a3e5..75252103d 100755
--- a/workflow/engine/methods/cases/cases_Scheduler_Edit.php
+++ b/workflow/engine/methods/cases/cases_Scheduler_Edit.php
@@ -136,6 +136,9 @@ try {
G::RenderPage( 'publishBlank', 'blank' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/cases/cases_Scheduler_Log_Detail.php b/workflow/engine/methods/cases/cases_Scheduler_Log_Detail.php
index 998fcf2b4..1a0015a3c 100755
--- a/workflow/engine/methods/cases/cases_Scheduler_Log_Detail.php
+++ b/workflow/engine/methods/cases/cases_Scheduler_Log_Detail.php
@@ -82,6 +82,9 @@ try {
G::RenderPage( 'publishBlank', 'blank' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/cases/cases_Scheduler_New.php b/workflow/engine/methods/cases/cases_Scheduler_New.php
index 4b5720d2e..2a734a164 100755
--- a/workflow/engine/methods/cases/cases_Scheduler_New.php
+++ b/workflow/engine/methods/cases/cases_Scheduler_New.php
@@ -95,6 +95,9 @@ try {
G::RenderPage( 'publishBlank', 'blank' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/cases/cases_UsersReassign.php b/workflow/engine/methods/cases/cases_UsersReassign.php
index d9e19dd20..4b8eeee34 100755
--- a/workflow/engine/methods/cases/cases_UsersReassign.php
+++ b/workflow/engine/methods/cases/cases_UsersReassign.php
@@ -69,6 +69,9 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'cases/cases_ReassignShowInfo', '', $aMessage );
G::RenderPage( 'publish' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/cases/proxyPMTablesFieldList.php b/workflow/engine/methods/cases/proxyPMTablesFieldList.php
index 0cc1756ea..17069ca65 100644
--- a/workflow/engine/methods/cases/proxyPMTablesFieldList.php
+++ b/workflow/engine/methods/cases/proxyPMTablesFieldList.php
@@ -722,7 +722,9 @@ try {
break;
}
} catch (Exception $e) {
- echo G::json_encode($e->getMessage());
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::json_encode( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) ) );
}
/**
diff --git a/workflow/engine/methods/cases/proxyPMTablesList.php b/workflow/engine/methods/cases/proxyPMTablesList.php
index 33b9d2142..32715c086 100644
--- a/workflow/engine/methods/cases/proxyPMTablesList.php
+++ b/workflow/engine/methods/cases/proxyPMTablesList.php
@@ -70,6 +70,8 @@ try {
$result['data'] = $rows;
print G::json_encode( $result );
} catch (Exception $e) {
- print G::json_encode ($e->getMessage());
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::json_encode( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) ) );
}
diff --git a/workflow/engine/methods/cases/saveForm.php b/workflow/engine/methods/cases/saveForm.php
index 086d1f61d..3187ad79c 100644
--- a/workflow/engine/methods/cases/saveForm.php
+++ b/workflow/engine/methods/cases/saveForm.php
@@ -136,5 +136,8 @@ try {
die('OK');
} catch (Exception $e) {
- die($e->getMessage());
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/dynaforms/conditionalShowHide_Ajax.php b/workflow/engine/methods/dynaforms/conditionalShowHide_Ajax.php
index f469227db..378ba1b46 100755
--- a/workflow/engine/methods/dynaforms/conditionalShowHide_Ajax.php
+++ b/workflow/engine/methods/dynaforms/conditionalShowHide_Ajax.php
@@ -121,9 +121,9 @@ try {
$enable = 'enable';
}else{
$enable = 'disable';
- }
+ }
G::auditLog("ConditionsEditorDynaform", "Dynaform Title: " .$aDYN['DYNAFORM_NAME']. ", Condition Editor: [Function: ".$_POST['function']. ", Fields: ".$_POST['fields_selected']. ", Conditions: ".$_POST['condition']. ", Events: ".$_POST['events']. ", Event Owner: ".$_POST['event_owner_selected']. ", Status: ".$enable."]");
-
+
break;
case 'delete':
require_once 'classes/model/FieldCondition.php';
@@ -134,7 +134,9 @@ try {
break;
}
} catch (Exception $e) {
- print ($e->getMessage()) ;
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
}
/*
diff --git a/workflow/engine/methods/enterprise/addonsStoreAction.php b/workflow/engine/methods/enterprise/addonsStoreAction.php
index 886c58b41..be71ac6a3 100644
--- a/workflow/engine/methods/enterprise/addonsStoreAction.php
+++ b/workflow/engine/methods/enterprise/addonsStoreAction.php
@@ -343,9 +343,16 @@ try {
} else {
$result["addons"] = array();
}
- echo G::json_encode($result);
+ G::outRes( G::json_encode($result) );
} catch (Exception $e) {
- echo G::json_encode(array("success" => false, "errors" => $e->getMessage()));
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes(
+ G::json_encode(array(
+ "success" => false,
+ "errors" => G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token))
+ ))
+ );
}
diff --git a/workflow/engine/methods/enterprise/pluginsImportFile.php b/workflow/engine/methods/enterprise/pluginsImportFile.php
index 4f4adae05..7077502f7 100644
--- a/workflow/engine/methods/enterprise/pluginsImportFile.php
+++ b/workflow/engine/methods/enterprise/pluginsImportFile.php
@@ -186,5 +186,5 @@ if ($status == 0) {
$response["success"] = false;
}
-echo G::json_encode($response);
+G::outRes( G::json_encode($response) );
diff --git a/workflow/engine/methods/inputdocs/inputdocs_Delete.php b/workflow/engine/methods/inputdocs/inputdocs_Delete.php
index 2955c2bc4..53e206aa8 100755
--- a/workflow/engine/methods/inputdocs/inputdocs_Delete.php
+++ b/workflow/engine/methods/inputdocs/inputdocs_Delete.php
@@ -104,6 +104,9 @@ try {
break;
}
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/inputdocs/inputdocs_Edit.php b/workflow/engine/methods/inputdocs/inputdocs_Edit.php
index f2d1c2728..dedc32171 100755
--- a/workflow/engine/methods/inputdocs/inputdocs_Edit.php
+++ b/workflow/engine/methods/inputdocs/inputdocs_Edit.php
@@ -63,6 +63,9 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'inputdocs/inputdocs_Edit', '', $aFields, '../inputdocs/inputdocs_Save' );
G::RenderPage( 'publish', 'raw' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/inputdocs/inputdocs_Save.php b/workflow/engine/methods/inputdocs/inputdocs_Save.php
index d2b3d1c79..73ad956f9 100755
--- a/workflow/engine/methods/inputdocs/inputdocs_Save.php
+++ b/workflow/engine/methods/inputdocs/inputdocs_Save.php
@@ -101,6 +101,9 @@ try {
break;
}
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/install/heartbeatStatus.php b/workflow/engine/methods/install/heartbeatStatus.php
index 09aa2425a..3031425ee 100755
--- a/workflow/engine/methods/install/heartbeatStatus.php
+++ b/workflow/engine/methods/install/heartbeatStatus.php
@@ -18,6 +18,8 @@ try {
echo "Nothing to do";
}
} catch (Exception $e) {
- echo $e->getMessage();
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
}
diff --git a/workflow/engine/methods/login/login_Ajax.php b/workflow/engine/methods/login/login_Ajax.php
index 905b4b9aa..1b303a468 100755
--- a/workflow/engine/methods/login/login_Ajax.php
+++ b/workflow/engine/methods/login/login_Ajax.php
@@ -42,6 +42,9 @@ try {
break;
}
} catch ( Exception $oException ) {
- die ( $oException->getMessage () );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/outputdocs/outputdocs_Edit.php b/workflow/engine/methods/outputdocs/outputdocs_Edit.php
index 9fbf55fb1..a29a039e3 100755
--- a/workflow/engine/methods/outputdocs/outputdocs_Edit.php
+++ b/workflow/engine/methods/outputdocs/outputdocs_Edit.php
@@ -61,29 +61,29 @@ try {
switch ($type) {
case 'HTML':
- global $G_PUBLISH;
- $G_PUBLISH = new Publisher();
- $fcontent = '';
- $proUid = '';
- $filename = '';
- $title = '';
- require_once 'classes/model/OutputDocument.php';
- $oOutputDocument = new OutputDocument();
- if (isset( $_REQUEST['OUT_DOC_UID'] )) {
- $aFields = $oOutputDocument->load( $_REQUEST['OUT_DOC_UID'] );
- $fcontent = $aFields['OUT_DOC_TEMPLATE'];
- $proUid = $aFields['PRO_UID'];
- $filename = $aFields['OUT_DOC_FILENAME'];
- $title = $aFields['OUT_DOC_TITLE'];
- }
- $aData = Array (
- 'PRO_UID' => $proUid,
- 'OUT_DOC_TEMPLATE' => $fcontent,
- 'FILENAME' => $filename,
- 'OUT_DOC_UID'=> $_REQUEST['OUT_DOC_UID'],
- 'OUT_DOC_TITLE'=> $title,
- );
- $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'outputdocs/outputdocs_Edit', '', $aData );
+ global $G_PUBLISH;
+ $G_PUBLISH = new Publisher();
+ $fcontent = '';
+ $proUid = '';
+ $filename = '';
+ $title = '';
+ require_once 'classes/model/OutputDocument.php';
+ $oOutputDocument = new OutputDocument();
+ if (isset( $_REQUEST['OUT_DOC_UID'] )) {
+ $aFields = $oOutputDocument->load( $_REQUEST['OUT_DOC_UID'] );
+ $fcontent = $aFields['OUT_DOC_TEMPLATE'];
+ $proUid = $aFields['PRO_UID'];
+ $filename = $aFields['OUT_DOC_FILENAME'];
+ $title = $aFields['OUT_DOC_TITLE'];
+ }
+ $aData = Array (
+ 'PRO_UID' => $proUid,
+ 'OUT_DOC_TEMPLATE' => $fcontent,
+ 'FILENAME' => $filename,
+ 'OUT_DOC_UID'=> $_REQUEST['OUT_DOC_UID'],
+ 'OUT_DOC_TITLE'=> $title,
+ );
+ $G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'outputdocs/outputdocs_Edit', '', $aData );
G::RenderPage( 'publish', 'blank' );
die();
break;
@@ -98,8 +98,8 @@ try {
$extension = 'pdf';
}
- // The ereg_replace function has been DEPRECATED as of PHP 5.3.0.
- // $downFileName = ereg_replace('[^A-Za-z0-9_]', '_', $aFields['OUT_DOC_TITLE'] ) . '.' . $extension;
+ // The ereg_replace function has been DEPRECATED as of PHP 5.3.0.
+ // $downFileName = ereg_replace('[^A-Za-z0-9_]', '_', $aFields['OUT_DOC_TITLE'] ) . '.' . $extension;
$downFileName = preg_replace( '/[^A-Za-z0-9_]/i', '_', $aFields['OUT_DOC_TITLE'] ) . '.' . $extension;
$filename = PATH_DYNAFORM . $aFields['PRO_UID'] . PATH_SEP . $aFields['OUT_DOC_UID'] . '.' . $extension;
if (file_exists( $filename )) {
@@ -115,6 +115,9 @@ try {
}
G::RenderPage( 'publish', 'raw' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
-}
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
+}
diff --git a/workflow/engine/methods/outputdocs/outputdocs_New.php b/workflow/engine/methods/outputdocs/outputdocs_New.php
index bd41b19ba..83b6786d8 100755
--- a/workflow/engine/methods/outputdocs/outputdocs_New.php
+++ b/workflow/engine/methods/outputdocs/outputdocs_New.php
@@ -72,6 +72,9 @@ try {
}
G::RenderPage( 'publish', 'raw' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/outputdocs/outputdocs_Properties.php b/workflow/engine/methods/outputdocs/outputdocs_Properties.php
index fdedfffab..e82722c3d 100755
--- a/workflow/engine/methods/outputdocs/outputdocs_Properties.php
+++ b/workflow/engine/methods/outputdocs/outputdocs_Properties.php
@@ -63,15 +63,15 @@ try {
break;
case 'JRXML':
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'outputdocs/outputdocs_Properties', '', $aFields, '../outputdocs/outputdocs_Save' );
- /*
- // $G_PUBLISH->AddContent('xmlform', 'xmlform', 'outputdocs/outputdocsDynaformList', '', $aFields , '../outputdocs/outputdocs_Save');
- require_once 'classes/model/Process.php';
- G::LoadClass( 'processMap');
- $sProcessUID = $aFields['PRO_UID'];
- $oProcess = new Process();
- $oProcessMap = new ProcessMap();
- $aFields = $oProcess->load($sProcessUID);
- $G_PUBLISH->AddContent('propeltable', 'paged-table', 'dynaforms/dynaforms_ShortList', $oProcessMap->getDynaformsCriteria($sProcessUID), $aFields);
+ /*
+ // $G_PUBLISH->AddContent('xmlform', 'xmlform', 'outputdocs/outputdocsDynaformList', '', $aFields , '../outputdocs/outputdocs_Save');
+ require_once 'classes/model/Process.php';
+ G::LoadClass( 'processMap');
+ $sProcessUID = $aFields['PRO_UID'];
+ $oProcess = new Process();
+ $oProcessMap = new ProcessMap();
+ $aFields = $oProcess->load($sProcessUID);
+ $G_PUBLISH->AddContent('propeltable', 'paged-table', 'dynaforms/dynaforms_ShortList', $oProcessMap->getDynaformsCriteria($sProcessUID), $aFields);
*/
break;
case 'ACROFORM':
@@ -80,6 +80,9 @@ try {
}
G::RenderPage( 'publish', 'raw' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
-}
-
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
+}
+
diff --git a/workflow/engine/methods/outputdocs/outputdocs_Save.php b/workflow/engine/methods/outputdocs/outputdocs_Save.php
index 028d70072..9c8ecbf36 100755
--- a/workflow/engine/methods/outputdocs/outputdocs_Save.php
+++ b/workflow/engine/methods/outputdocs/outputdocs_Save.php
@@ -86,6 +86,9 @@ try {
}
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/outputdocs/uploadFile.php b/workflow/engine/methods/outputdocs/uploadFile.php
index 3f81a84c6..03758b5b1 100755
--- a/workflow/engine/methods/outputdocs/uploadFile.php
+++ b/workflow/engine/methods/outputdocs/uploadFile.php
@@ -28,6 +28,10 @@ try {
print "File uploaded.";
} catch (Exception $e) {
- print "Error: " . $e->getMessage() . "";
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ $varRes = "Error: " . G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . "";
+ G::outRes( $varRes );
+ die;
}
diff --git a/workflow/engine/methods/processCategory/processCategory_Ajax.php b/workflow/engine/methods/processCategory/processCategory_Ajax.php
index a96baf10c..337b1e80a 100755
--- a/workflow/engine/methods/processCategory/processCategory_Ajax.php
+++ b/workflow/engine/methods/processCategory/processCategory_Ajax.php
@@ -118,7 +118,8 @@ if (isset( $_REQUEST['action'] )) {
G::auditLog("CreateCategory", "Category Name: ".$catName);
echo '{success: true}';
} catch (Exception $ex) {
- echo '{success: false, error: ' . $ex->getMessage() . '}';
+ $varEcho = '{success: false, error: ' . $ex->getMessage() . '}';
+ G::outRes( $varEcho );
}
break;
case 'checkEditCategoryName':
@@ -149,7 +150,8 @@ if (isset( $_REQUEST['action'] )) {
g::auditLog("UpdateCategory", "Category Name: ".$catName." Category ID: (".$catUID.") ");
echo '{success: true}';
} catch (Exception $ex) {
- echo '{success: false, error: ' . $ex->getMessage() . '}';
+ $varEcho = '{success: false, error: ' . $ex->getMessage() . '}';
+ G::outRes( $varEcho );
}
break;
case 'canDeleteCategory':
@@ -169,7 +171,8 @@ if (isset( $_REQUEST['action'] )) {
$catName = $cat->loadByCategoryId( $catUID );
$cat->delete();
G::auditLog("DeleteCategory", "Category Name: ".$catName." Category ID: (".$catUID.") ");
- echo '{success: true}';
+ $varEcho = '{success: true}';
+ G::outRes( $varEcho );
} catch (Exception $ex) {
echo '{success: false, error: ' . $ex->getMessage() . '}';
}
diff --git a/workflow/engine/methods/setup/appCacheViewAjax.php b/workflow/engine/methods/setup/appCacheViewAjax.php
index 078f06f8a..454f084f7 100755
--- a/workflow/engine/methods/setup/appCacheViewAjax.php
+++ b/workflow/engine/methods/setup/appCacheViewAjax.php
@@ -288,7 +288,10 @@ switch ($request) {
$confParams = array('lang' => $lang, 'status' => 'failed');
$appCacheViewEngine = $oServerConf->setProperty('APP_CACHE_VIEW_ENGINE', $confParams);
- echo '{success: false, msg:"' . $e->getMessage() . '"}';
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ $varRes = '{success: false, msg:"' . G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) . '"}';
+ G::outRes( $varRes );
}
break;
case 'recreate-root':
diff --git a/workflow/engine/methods/setup/emails_Ajax.php b/workflow/engine/methods/setup/emails_Ajax.php
index c380a18d9..bd73cfc23 100755
--- a/workflow/engine/methods/setup/emails_Ajax.php
+++ b/workflow/engine/methods/setup/emails_Ajax.php
@@ -182,7 +182,9 @@ switch ($request) {
// print (FAILED . ',' . $smtp->error['error']) ;
}
} catch (Exception $e) {
- print (FAILED . ',' . $e->getMessage()) ;
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
}
} else {
print (SUCCESSFUL . ', No authentication required!') ;
@@ -214,7 +216,9 @@ switch ($request) {
print (FAILED . ',' . $resp->msg) ;
}
} catch (Exception $e) {
- print (FAILED . ',' . $e->getMessage()) ;
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
}
} else {
diff --git a/workflow/engine/methods/setup/language_Ajax.php b/workflow/engine/methods/setup/language_Ajax.php
index b322c4352..040098840 100755
--- a/workflow/engine/methods/setup/language_Ajax.php
+++ b/workflow/engine/methods/setup/language_Ajax.php
@@ -163,7 +163,9 @@ try {
$trn->removeTranslationEnvironment( $locale );
echo G::LoadTranslation( 'ID_LANGUAGE_DELETED_SUCCESSFULLY' );
} catch (Exception $e) {
- echo $e->getMessage();
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
}
} else {
echo str_replace( '{0}', $aRow[0], G::LoadTranslation( 'ID_LANGUAGE_CANT_DELETE' ) );
@@ -177,6 +179,8 @@ try {
break;
}
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
}
diff --git a/workflow/engine/methods/setup/logo_Delete.php b/workflow/engine/methods/setup/logo_Delete.php
index 36ef7d21c..68e574587 100755
--- a/workflow/engine/methods/setup/logo_Delete.php
+++ b/workflow/engine/methods/setup/logo_Delete.php
@@ -45,6 +45,9 @@ try {
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/setup/replacementLogo.php b/workflow/engine/methods/setup/replacementLogo.php
index 2d9028e2f..65d0d8a72 100755
--- a/workflow/engine/methods/setup/replacementLogo.php
+++ b/workflow/engine/methods/setup/replacementLogo.php
@@ -100,6 +100,9 @@ try { //ini_set('display_errors','1');
}
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/setup/setupSchemas/triggerAppDelegationInsert.sql b/workflow/engine/methods/setup/setupSchemas/triggerAppDelegationInsert.sql
index 809608aa0..b8aa5f70c 100755
--- a/workflow/engine/methods/setup/setupSchemas/triggerAppDelegationInsert.sql
+++ b/workflow/engine/methods/setup/setupSchemas/triggerAppDelegationInsert.sql
@@ -20,12 +20,12 @@ BEGIN
SELECT APPLICATION.APP_CREATE_DATE into @APP_CREATE_DATE FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
SELECT APPLICATION.APP_UPDATE_DATE into @APP_UPDATE_DATE FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
- SELECT CONTENT.CON_VALUE into @APP_TITLE FROM CONTENT WHERE NEW.APP_UID=CON_ID AND CON_CATEGORY='APP_TITLE' and CON_LANG = '{lang}' LIMIT 1;
+ SELECT APPLICATION.APP_TITLE into @APP_TITLE FROM APPLICATION WHERE NEW.APP_UID=APPLICATION.APP_UID LIMIT 1;
IF ( @APP_TITLE IS NULL ) THEN
SET @APP_TITLE = '';
END IF;
- SELECT CONTENT.CON_VALUE into @APP_PRO_TITLE FROM CONTENT WHERE NEW.PRO_UID=CON_ID AND CON_CATEGORY='PRO_TITLE' and CON_LANG = '{lang}' LIMIT 1;
- SELECT CONTENT.CON_VALUE into @APP_TAS_TITLE FROM CONTENT WHERE NEW.TAS_UID=CON_ID AND CON_CATEGORY='TAS_TITLE' and CON_LANG = '{lang}' LIMIT 1;
+ SELECT PROCESS.PRO_TITLE into @APP_PRO_TITLE FROM PROCESS WHERE NEW.PRO_UID=PROCESS.PRO_UID LIMIT 1;
+ SELECT TASK.TAS_TITLE into @APP_TAS_TITLE FROM TASK WHERE NEW.TAS_UID=TASK.TAS_UID LIMIT 1;
SELECT CONCAT(USERS.USR_LASTNAME, ' ', USERS.USR_FIRSTNAME) INTO @APP_CURRENT_USER FROM USERS WHERE USR_UID = NEW.USR_UID LIMIT 1;
IF ( @APP_CURRENT_USER IS NULL ) THEN
SET @APP_CURRENT_USER = '';
diff --git a/workflow/engine/methods/setup/setupSchemas/triggerAppDelegationUpdate.sql b/workflow/engine/methods/setup/setupSchemas/triggerAppDelegationUpdate.sql
index dce6833fe..39cee7d53 100755
--- a/workflow/engine/methods/setup/setupSchemas/triggerAppDelegationUpdate.sql
+++ b/workflow/engine/methods/setup/setupSchemas/triggerAppDelegationUpdate.sql
@@ -20,12 +20,12 @@ BEGIN
SELECT APPLICATION.APP_CREATE_DATE into @APP_CREATE_DATE FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
SELECT APPLICATION.APP_UPDATE_DATE into @APP_UPDATE_DATE FROM APPLICATION WHERE APP_UID = NEW.APP_UID LIMIT 1;
- SELECT CONTENT.CON_VALUE into @APP_TITLE FROM CONTENT WHERE NEW.APP_UID=CON_ID AND CON_CATEGORY='APP_TITLE' and CON_LANG = '{lang}' LIMIT 1;
+ SELECT APPLICATION.APP_TITLE into @APP_TITLE FROM APPLICATION WHERE NEW.APP_UID=APPLICATION.APP_UID LIMIT 1;
IF ( @APP_TITLE IS NULL ) THEN
SET @APP_TITLE = '';
END IF;
- SELECT CONTENT.CON_VALUE into @APP_PRO_TITLE FROM CONTENT WHERE NEW.PRO_UID=CON_ID AND CON_CATEGORY='PRO_TITLE' and CON_LANG = '{lang}' LIMIT 1;
- SELECT CONTENT.CON_VALUE into @APP_TAS_TITLE FROM CONTENT WHERE NEW.TAS_UID=CON_ID AND CON_CATEGORY='TAS_TITLE' and CON_LANG = '{lang}' LIMIT 1;
+ SELECT PROCESS.PRO_TITLE into @APP_PRO_TITLE FROM PROCESS WHERE NEW.PRO_UID=PROCESS.PRO_UID LIMIT 1;
+ SELECT TASK.TAS_TITLE into @APP_TAS_TITLE FROM TASK WHERE NEW.TAS_UID=TASK.TAS_UID LIMIT 1;
SELECT CONCAT(USERS.USR_LASTNAME, ' ', USERS.USR_FIRSTNAME) INTO @APP_CURRENT_USER FROM USERS WHERE USR_UID = NEW.USR_UID LIMIT 1;
IF ( @APP_CURRENT_USER IS NULL ) THEN
SET @APP_CURRENT_USER = '';
diff --git a/workflow/engine/methods/setup/skin_Ajax.php b/workflow/engine/methods/setup/skin_Ajax.php
index e81f79ccd..2f3fe89a8 100755
--- a/workflow/engine/methods/setup/skin_Ajax.php
+++ b/workflow/engine/methods/setup/skin_Ajax.php
@@ -192,12 +192,12 @@ function newSkin ($baseSkin = 'classic')
$response['success'] = true;
$response['message'] = G::LoadTranslation( 'ID_SKIN_SUCCESS_CREATE' );
G::auditLog("CreateSkin", "Skin Name: ".$skinName);
- print_r( G::json_encode( $response ) );
+ G::outRes( G::json_encode( $response ) );
} catch (Exception $e) {
$response['success'] = false;
$response['message'] = $e->getMessage();
$response['error'] = $e->getMessage();
- print_r( G::json_encode( $response ) );
+ G::outRes( G::json_encode( $response ) );
}
}
@@ -308,12 +308,12 @@ function importSkin ()
$response['success'] = true;
$response['message'] = G::LoadTranslation( 'ID_SKIN_SUCCESSFUL_IMPORTED' );
G::auditLog("ImportSkin", "Skin Name: ".$skinName);
- print_r( G::json_encode( $response ) );
+ G::outRes( G::json_encode( $response ) );
} catch (Exception $e) {
$response['success'] = false;
$response['message'] = $e->getMessage();
$response['error'] = $e->getMessage();
- print_r( G::json_encode( $response ) );
+ G::outRes( G::json_encode( $response ) );
}
}
diff --git a/workflow/engine/methods/steps/conditions_Edit.php b/workflow/engine/methods/steps/conditions_Edit.php
index fdc60c1e7..c1a60baa9 100755
--- a/workflow/engine/methods/steps/conditions_Edit.php
+++ b/workflow/engine/methods/steps/conditions_Edit.php
@@ -43,6 +43,9 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'steps/conditions_Edit', '', $aFields, '../steps/conditions_Save' );
G::RenderPage( 'publish-raw', 'raw' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/steps/conditions_Save.php b/workflow/engine/methods/steps/conditions_Save.php
index 9d318ab87..b7f96786d 100755
--- a/workflow/engine/methods/steps/conditions_Save.php
+++ b/workflow/engine/methods/steps/conditions_Save.php
@@ -48,6 +48,9 @@ try {
$oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria( $value['TAS_UID'] );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/steps/steps_Ajax.php b/workflow/engine/methods/steps/steps_Ajax.php
index 944e63f73..b539feab4 100755
--- a/workflow/engine/methods/steps/steps_Ajax.php
+++ b/workflow/engine/methods/steps/steps_Ajax.php
@@ -207,6 +207,9 @@ try {
break;
}
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/steps/steps_Delete.php b/workflow/engine/methods/steps/steps_Delete.php
index addf712a5..8a1e78d2c 100755
--- a/workflow/engine/methods/steps/steps_Delete.php
+++ b/workflow/engine/methods/steps/steps_Delete.php
@@ -44,6 +44,9 @@ try {
$oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria( $_POST['TASK'] );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/steps/steps_Down.php b/workflow/engine/methods/steps/steps_Down.php
index 2f97cd4be..25350f6ba 100755
--- a/workflow/engine/methods/steps/steps_Down.php
+++ b/workflow/engine/methods/steps/steps_Down.php
@@ -43,5 +43,8 @@ try {
$oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria( $_POST['TASK'] );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/steps/steps_New.php b/workflow/engine/methods/steps/steps_New.php
index 5ff23800d..1783e94e7 100755
--- a/workflow/engine/methods/steps/steps_New.php
+++ b/workflow/engine/methods/steps/steps_New.php
@@ -42,6 +42,9 @@ try {
$G_PUBLISH->AddContent( 'propeltable', 'paged-table', 'steps/steps_availableBB', $oProcessMap->getAvailableBBCriteria( $_GET['PROCESS'], $_GET['TASK'] ), $_GET );
G::RenderPage( 'publish-raw', 'raw' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/steps/steps_Save.php b/workflow/engine/methods/steps/steps_Save.php
index f4c8a287f..c6585287c 100755
--- a/workflow/engine/methods/steps/steps_Save.php
+++ b/workflow/engine/methods/steps/steps_Save.php
@@ -46,6 +46,9 @@ try {
$oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria( $_POST['sTask'] );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/steps/steps_SupervisorAjax.php b/workflow/engine/methods/steps/steps_SupervisorAjax.php
index b5d2a912f..cc28b36bb 100755
--- a/workflow/engine/methods/steps/steps_SupervisorAjax.php
+++ b/workflow/engine/methods/steps/steps_SupervisorAjax.php
@@ -70,6 +70,9 @@ try {
break;
}
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/steps/steps_Up.php b/workflow/engine/methods/steps/steps_Up.php
index 24fa33814..7dae3447d 100755
--- a/workflow/engine/methods/steps/steps_Up.php
+++ b/workflow/engine/methods/steps/steps_Up.php
@@ -43,5 +43,8 @@ try {
$oProcessMap = new ProcessMap();
$oProcessMap->getStepsCriteria( $_POST['TASK'] );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/tasks/tasks_Ajax.php b/workflow/engine/methods/tasks/tasks_Ajax.php
index 0c23a00fa..ffd364ef2 100755
--- a/workflow/engine/methods/tasks/tasks_Ajax.php
+++ b/workflow/engine/methods/tasks/tasks_Ajax.php
@@ -136,6 +136,9 @@ try {
break;
}
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/tracker/tracker_Ajax.php b/workflow/engine/methods/tracker/tracker_Ajax.php
index ea233a815..cd64aee70 100755
--- a/workflow/engine/methods/tracker/tracker_Ajax.php
+++ b/workflow/engine/methods/tracker/tracker_Ajax.php
@@ -459,6 +459,9 @@ try {
break;
}
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/tracker/tracker_ConditionsEdit.php b/workflow/engine/methods/tracker/tracker_ConditionsEdit.php
index 50c396864..cc71bb34c 100755
--- a/workflow/engine/methods/tracker/tracker_ConditionsEdit.php
+++ b/workflow/engine/methods/tracker/tracker_ConditionsEdit.php
@@ -46,6 +46,9 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'tracker/tracker_ConditionsEdit', '', $aFields, '../tracker/tracker_ConditionsSave' );
G::RenderPage( 'publish-raw', 'raw' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/tracker/tracker_ConditionsSave.php b/workflow/engine/methods/tracker/tracker_ConditionsSave.php
index b41818d64..dda62d7cd 100755
--- a/workflow/engine/methods/tracker/tracker_ConditionsSave.php
+++ b/workflow/engine/methods/tracker/tracker_ConditionsSave.php
@@ -53,6 +53,9 @@ try {
$resultProcess = $infoProcess->load($value['PRO_UID']);
G::auditLog('CaseTrackers','Save Condition Case Tracker Object ('.$value['CTO_UID'].', condition: '.$value['CTO_CONDITION'].') in Process "'.$resultProcess['PRO_TITLE'].'"');
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/tracker/tracker_PrintView.php b/workflow/engine/methods/tracker/tracker_PrintView.php
index ef9123c82..cc42226a6 100755
--- a/workflow/engine/methods/tracker/tracker_PrintView.php
+++ b/workflow/engine/methods/tracker/tracker_PrintView.php
@@ -56,7 +56,7 @@ try {
$array['TITLE'] = G::LoadTranslation( 'ID_TITLE' );
else
$array['TITLE'] = '';
- // $array['PROCESS'] = G::LoadTranslation('ID_PROCESS');
+ // $array['PROCESS'] = G::LoadTranslation('ID_PROCESS');
$array['DATELABEL'] = G::LoadTranslation( 'DATE_LABEL' );
$G_PUBLISH = new Publisher();
@@ -65,37 +65,40 @@ try {
G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
-?>
-
-
diff --git a/workflow/engine/methods/users/myInfo_Edit.php b/workflow/engine/methods/users/myInfo_Edit.php
index e52b6b553..e0847349f 100755
--- a/workflow/engine/methods/users/myInfo_Edit.php
+++ b/workflow/engine/methods/users/myInfo_Edit.php
@@ -163,6 +163,9 @@ try {
G::RenderPage( 'publish' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/users/myInfo_Save.php b/workflow/engine/methods/users/myInfo_Save.php
index b5d51aec5..6612a8597 100755
--- a/workflow/engine/methods/users/myInfo_Save.php
+++ b/workflow/engine/methods/users/myInfo_Save.php
@@ -164,6 +164,9 @@ try {
G::SendTemporalMessage( 'ID_CHANGES_SAVED', 'info', 'labels' );
G::header( 'location: myInfo' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/users/users_Ajax.php b/workflow/engine/methods/users/users_Ajax.php
index a2d63f96d..ec7c8cb3e 100644
--- a/workflow/engine/methods/users/users_Ajax.php
+++ b/workflow/engine/methods/users/users_Ajax.php
@@ -584,5 +584,8 @@ try {
break;
}
} catch (Exception $oException) {
- die($oException->getMessage());
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/users/users_Delete.php b/workflow/engine/methods/users/users_Delete.php
index ee64013d3..5e12d990e 100755
--- a/workflow/engine/methods/users/users_Delete.php
+++ b/workflow/engine/methods/users/users_Delete.php
@@ -65,6 +65,9 @@ try {
$oUser->update( $aFields );
G::header( 'location: users_List' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/users/users_DeleteReassignEnd.php b/workflow/engine/methods/users/users_DeleteReassignEnd.php
index 3766fb29b..168ccbd5e 100755
--- a/workflow/engine/methods/users/users_DeleteReassignEnd.php
+++ b/workflow/engine/methods/users/users_DeleteReassignEnd.php
@@ -82,6 +82,9 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'users/users_ReassignShowInfo', '', $aMessage );
G::RenderPage( 'publish' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/users/users_Edit.php b/workflow/engine/methods/users/users_Edit.php
index 808b8dbaf..1a1431453 100755
--- a/workflow/engine/methods/users/users_Edit.php
+++ b/workflow/engine/methods/users/users_Edit.php
@@ -150,6 +150,9 @@ try {
G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/users/users_Groups.php b/workflow/engine/methods/users/users_Groups.php
index 438127e8e..da5867a76 100755
--- a/workflow/engine/methods/users/users_Groups.php
+++ b/workflow/engine/methods/users/users_Groups.php
@@ -48,6 +48,9 @@ try {
$G_PUBLISH->AddContent( 'view', 'users/users_Tree' );
G::RenderPage( 'publish', 'raw' );
} catch (exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/users/users_New.php b/workflow/engine/methods/users/users_New.php
index 6cec00db9..f9f16a9bc 100755
--- a/workflow/engine/methods/users/users_New.php
+++ b/workflow/engine/methods/users/users_New.php
@@ -112,6 +112,9 @@ try {
$G_PUBLISH->AddContent( 'xmlform', 'xmlform', 'users/users_New.xml', '', $aFields, 'users_Save' );
G::RenderPage( 'publish', 'blank' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/users/users_Reassign.php b/workflow/engine/methods/users/users_Reassign.php
index 2505bfc78..713d00154 100755
--- a/workflow/engine/methods/users/users_Reassign.php
+++ b/workflow/engine/methods/users/users_Reassign.php
@@ -42,6 +42,9 @@ try {
}
}
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/users/users_ReassignCases.php b/workflow/engine/methods/users/users_ReassignCases.php
index fa14c2a0a..e94a002ff 100755
--- a/workflow/engine/methods/users/users_ReassignCases.php
+++ b/workflow/engine/methods/users/users_ReassignCases.php
@@ -106,6 +106,9 @@ try {
}
G::RenderPage( 'publish', 'raw' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/methods/users/users_View.php b/workflow/engine/methods/users/users_View.php
index 437824845..f68d216bd 100755
--- a/workflow/engine/methods/users/users_View.php
+++ b/workflow/engine/methods/users/users_View.php
@@ -70,6 +70,9 @@ try {
}
G::RenderPage( 'publish' );
} catch (Exception $oException) {
- die( $oException->getMessage() );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php b/workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php
index 1b2ba2187..0941bc724 100644
--- a/workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php
@@ -1106,4 +1106,20 @@ class Consolidated
$oCase->updateCase($appUid, $aData);
}
+
+ /**
+ * @param $usrUid
+ * @return int
+ */
+ public function getCountList($usrUid)
+ {
+ $criteria = new Criteria();
+ $criteria->add(\CaseConsolidatedCorePeer::CON_STATUS, 'ACTIVE');
+ $criteria->addJoin(\CaseConsolidatedCorePeer::TAS_UID, \AppCacheViewPeer::TAS_UID, Criteria::LEFT_JOIN);
+ $criteria->add(\AppCacheViewPeer::USR_UID, $usrUid);
+ $criteria->add(\AppCacheViewPeer::DEL_THREAD_STATUS, 'OPEN');
+ $criteria->add(\AppCacheViewPeer::APP_STATUS, 'TO_DO');
+ $total = \CaseConsolidatedCorePeer::doCount($criteria);
+ return (int)$total;
+ }
}
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Lists.php b/workflow/engine/src/ProcessMaker/BusinessModel/Lists.php
index 1bb26d9dd..88077e2aa 100644
--- a/workflow/engine/src/ProcessMaker/BusinessModel/Lists.php
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/Lists.php
@@ -10,6 +10,74 @@ use \UsersPeer;
*/
class Lists {
+ /**
+ * @var array
+ */
+ private $mapList;
+ /**
+ * @var \ListInbox
+ */
+ private $ListInbox;
+ /**
+ * @var \ListInbox
+ */
+ private $ListDraft;
+ /**
+ * @var \ListCanceled
+ */
+ private $ListCanceled;
+ /**
+ * @var \ListParticipatedLast
+ */
+ private $ListParticipated;
+ /**
+ * @var \ListPaused
+ */
+ private $ListPaused;
+ /**
+ * @var \ListCompleted
+ */
+ private $ListCompleted;
+ /**
+ * @var Consolidated
+ */
+ private $ListConsolidated;
+ /**
+ * @var \ListUnassigned
+ */
+ private $ListSelfService;
+
+ /**
+ * Lists constructor.
+ */
+ public function __construct()
+ {
+ $this->mapList = array(
+ 'ListInbox' => 'CASES_INBOX',
+ 'ListDraft' => 'CASES_DRAFT',
+ 'ListCanceled' => 'CASES_CANCELLED',
+ 'ListParticipated' => 'CASES_SENT',
+ 'ListPaused' => 'CASES_PAUSED',
+ 'ListCompleted' => 'CASES_COMPLETED',
+ /*----------------------------------********---------------------------------*/
+ 'ListConsolidated' => 'CONSOLIDATED_CASES',
+ /*----------------------------------********---------------------------------*/
+ 'ListSelfService' => 'CASES_SELFSERVICE'
+ );
+
+ $this->ListInbox = new \ListInbox();
+ $this->ListDraft = new \ListInbox();
+ $this->ListCanceled = new \ListCanceled();
+ $this->ListParticipated = new \ListParticipatedLast();
+ $this->ListPaused = new \ListPaused();
+ $this->ListCompleted = new \ListCompleted();
+ /*----------------------------------********---------------------------------*/
+ $this->ListConsolidated = new Consolidated();
+ /*----------------------------------********---------------------------------*/
+ $this->ListSelfService = new \ListUnassigned();
+ }
+
+
/**
* Get list for Cases
*
@@ -190,56 +258,34 @@ class Lists {
/**
* Get counters for lists
- *
- * @access public
- * @param array $userId, User Uid
+ * @param $userId
* @return array
- *
- * @author Brayan Pereyra (Cochalo)
- * @copyright Colosa - Bolivia
*/
public function getCounters($userId)
{
- $criteria = new Criteria();
- $criteria->addSelectColumn(UsersPeer::USR_TOTAL_INBOX);
- $criteria->addSelectColumn(UsersPeer::USR_TOTAL_DRAFT);
- $criteria->addSelectColumn(UsersPeer::USR_TOTAL_CANCELLED);
- $criteria->addSelectColumn(UsersPeer::USR_TOTAL_PARTICIPATED);
- $criteria->addSelectColumn(UsersPeer::USR_TOTAL_PAUSED);
- $criteria->addSelectColumn(UsersPeer::USR_TOTAL_COMPLETED);
- $criteria->add( UsersPeer::USR_UID, $userId, Criteria::EQUAL );
- $dataset = UsersPeer::doSelectRS($criteria);
- $dataset->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
- $dataset->next();
- $aRow = $dataset->getRow();
-
- $oAppCache = new \AppCacheView();
- $totalUnassigned = $oAppCache->getListCounters('selfservice', $userId, false);
-
- $response = array(
- array('count' => $aRow['USR_TOTAL_INBOX'], 'item' => 'CASES_INBOX'),
- array('count' => $aRow['USR_TOTAL_DRAFT'], 'item' => 'CASES_DRAFT'),
- array('count' => $aRow['USR_TOTAL_CANCELLED'], 'item' => 'CASES_CANCELLED'),
- array('count' => $aRow['USR_TOTAL_PARTICIPATED'], 'item' => 'CASES_SENT'),
- array('count' => $aRow['USR_TOTAL_PAUSED'], 'item' => 'CASES_PAUSED'),
- array('count' => $aRow['USR_TOTAL_COMPLETED'], 'item' => 'CASES_COMPLETED'),
- array('count' => $totalUnassigned, 'item' => 'CASES_SELFSERVICE')
- );
-
- /*----------------------------------********---------------------------------*/
- $licensedFeatures = & \PMLicensedFeatures::getSingleton();
- if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) {
- $criteria = new Criteria();
- $criteria->add(\CaseConsolidatedCorePeer::CON_STATUS, 'ACTIVE');
- $criteria->addJoin(\CaseConsolidatedCorePeer::TAS_UID, \AppCacheViewPeer::TAS_UID, Criteria::LEFT_JOIN);
- $criteria->add(\AppCacheViewPeer::USR_UID, $userId);
- $criteria->add(\AppCacheViewPeer::DEL_THREAD_STATUS, 'OPEN');
- $criteria->add(\AppCacheViewPeer::APP_STATUS, 'TO_DO');
- $total = \CaseConsolidatedCorePeer::doCount( $criteria );
- $response[] = array('count' => $total, 'item' => 'CONSOLIDATED_CASES');
+ $list = $this->mapList;
+ $response = array();
+ foreach ($list as $listObject => $item) {
+ switch ($listObject) {
+ case 'ListInbox':
+ $total = $this->$listObject->getCountList($userId, 'TO_DO');
+ array_push($response, (array('count' => $total, 'item' => $item)));
+ break;
+ /*----------------------------------********---------------------------------*/
+ case 'ListConsolidated':
+ $licensedFeatures = &\PMLicensedFeatures::getSingleton();
+ if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) {
+ $total = $this->$listObject->getCountList($userId);
+ array_push($response, (array('count' => $total, 'item' => $item)));
+ }
+ break;
+ /*----------------------------------********---------------------------------*/
+ default:
+ $totalInbox = $this->$listObject->getCountList($userId);
+ array_push($response, (array('count' => $totalInbox, 'item' => $item)));
+ break;
+ }
}
- /*----------------------------------********---------------------------------*/
-
return $response;
}
}
\ No newline at end of file
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/ScriptTask.php b/workflow/engine/src/ProcessMaker/BusinessModel/ScriptTask.php
index 37b99b092..a22bf513e 100644
--- a/workflow/engine/src/ProcessMaker/BusinessModel/ScriptTask.php
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/ScriptTask.php
@@ -201,6 +201,26 @@ class ScriptTask
if ($obj->getActTaskType() != "SCRIPTTASK") {
throw new \Exception(\G::LoadTranslation("ID_SCRIPT_TASK_TYPE_ACTIVITY_NOT_IS_SCRIPTTASK", array($this->arrayFieldNameForException["actUid"], $arrayData["ACT_UID"])));
}
+
+ //Activity - Already registered
+ $criteria = new \Criteria('workflow');
+ $criteria->addSelectColumn(\ScriptTaskPeer::SCRTAS_UID);
+
+ if ($scriptTaskUid != '') {
+ $criteria->add(\ScriptTaskPeer::SCRTAS_UID, $scriptTaskUid, \Criteria::NOT_EQUAL);
+ }
+
+ $criteria->add(\ScriptTaskPeer::PRJ_UID, $projectUid, \Criteria::EQUAL);
+ $criteria->add(\ScriptTaskPeer::ACT_UID, $arrayFinalData['ACT_UID'], \Criteria::EQUAL);
+
+ $rsCriteria = \ScriptTaskPeer::doSelectRS($criteria);
+
+ if ($rsCriteria->next()) {
+ throw new \Exception(\G::LoadTranslation(
+ 'ID_SCRIPT_TASK_ACTIVITY_ALREADY_REGISTERED',
+ [$this->arrayFieldNameForException['actUid'], $arrayFinalData['ACT_UID']]
+ ));
+ }
} catch (\Exception $e) {
throw $e;
}
diff --git a/workflow/engine/templates/steps/triggers_Tree.php b/workflow/engine/templates/steps/triggers_Tree.php
index 337efd46d..2f31607b6 100755
--- a/workflow/engine/templates/steps/triggers_Tree.php
+++ b/workflow/engine/templates/steps/triggers_Tree.php
@@ -131,7 +131,10 @@ try {
echo $javascript . $oTree->render();
}
catch (Exception $oException) {
- die($oException->getMessage());
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
unset($_SESSION['PROCESS']);
?>
\ No newline at end of file
diff --git a/workflow/engine/templates/triggers/triggersTree.php b/workflow/engine/templates/triggers/triggersTree.php
index 3d840e026..6e08f330c 100755
--- a/workflow/engine/templates/triggers/triggersTree.php
+++ b/workflow/engine/templates/triggers/triggersTree.php
@@ -72,7 +72,10 @@ try {
echo $oTree->render();
} catch (Exception $e) {
- die($e->getMessage());
+ $token = strtotime("now");
+ PMException::registerErrorLog($e, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
unset($_SESSION["PROCESS"]);
diff --git a/workflow/engine/templates/triggers/triggers_CreateWizard.php b/workflow/engine/templates/triggers/triggers_CreateWizard.php
index 92dc6b801..658cd2527 100755
--- a/workflow/engine/templates/triggers/triggers_CreateWizard.php
+++ b/workflow/engine/templates/triggers/triggers_CreateWizard.php
@@ -173,7 +173,10 @@ try {
print $content;
} catch ( Exception $oException ) {
- die ( $oException->getMessage () );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
unset ($_SESSION ['PROCESS']);
diff --git a/workflow/engine/templates/triggers/triggers_EditWizard.php b/workflow/engine/templates/triggers/triggers_EditWizard.php
index 4b11a4892..1da411064 100755
--- a/workflow/engine/templates/triggers/triggers_EditWizard.php
+++ b/workflow/engine/templates/triggers/triggers_EditWizard.php
@@ -183,6 +183,9 @@ try {
print $content;
} catch ( Exception $oException ) {
- die ( $oException->getMessage () );
+ $token = strtotime("now");
+ PMException::registerErrorLog($oException, $token);
+ G::outRes( G::LoadTranslation("ID_EXCEPTION_LOG_INTERFAZ", array($token)) );
+ die;
}
unset ( $_SESSION ['PROCESS'] );