diff --git a/gulliver/thirdparty/creole/drivers/mssql/MSSQLConnection.php b/gulliver/thirdparty/creole/drivers/mssql/MSSQLConnection.php
index 688eb48bd..0c3e1db2c 100755
--- a/gulliver/thirdparty/creole/drivers/mssql/MSSQLConnection.php
+++ b/gulliver/thirdparty/creole/drivers/mssql/MSSQLConnection.php
@@ -69,11 +69,28 @@ class MSSQLConnection extends ConnectionCommon implements Connection {
$pw = $dsninfo['password'];
$dbhost = $dsninfo['hostspec'] ? $dsninfo['hostspec'] : 'localhost';
+ /**
+ * MSSQL (http://php.net/manual/en/intro.mssql.php)
+ * These functions allow you to access MS SQL Server database.
+ * This extension is not available anymore on Windows with PHP 5.3 or later.
+ * SQLSRV, an alternative extension for MS SQL connectivity is available from
+ * Microsoft: » http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx.
+ * http://blogs.msdn.com/b/brian_swan/archive/2010/03/08/mssql-vs-sqlsrv-what-s-the-difference-part-1.aspx
+ *
+ * Alternatively to use the mssql functions in Windows, use php_dblib.dll (FreeTDS) http://www.freetds.org/
+ * e.g. php.ini setting
+ * extension=php_dblib.dll
+ *
+ * php_dblib.dll (FreeTDS) use ':' as the delimiter in all installations.
+ */
+ /*
if (PHP_OS == "WINNT" || PHP_OS == "WIN32") {
$portDelimiter = ",";
} else {
$portDelimiter = ":";
}
+ */
+ $portDelimiter = ":";
if(!empty($dsninfo['port'])) {
$dbhost .= $portDelimiter.$dsninfo['port'];
diff --git a/workflow/engine/bin/cron_single.php b/workflow/engine/bin/cron_single.php
index 205e981b3..3a3d8f011 100755
--- a/workflow/engine/bin/cron_single.php
+++ b/workflow/engine/bin/cron_single.php
@@ -91,7 +91,7 @@ if (!defined('PATH_HOME')) {
$e_all = $config['debug'] ? $e_all : $e_all & ~E_NOTICE;
G::LoadSystem('inputfilter');
- $filter = new InputFilter();
+ $filter = new InputFilter();
$config['debug'] = $filter->validateInput($config['debug']);
$config['memory_limit'] = $filter->validateInput($config['memory_limit']);
$config['wsdl_cache'] = $filter->validateInput($config['wsdl_cache'],'int');
@@ -508,7 +508,9 @@ if (!defined('SYS_SYS')) {
}
}
- unlink(PATH_CORE . 'config/_databases_.php');
+ if (file_exists(PATH_CORE . "config" . PATH_SEP . "_databases_.php")) {
+ unlink(PATH_CORE . "config" . PATH_SEP . "_databases_.php");
+ }
} else {
processWorkspace();
}
@@ -967,7 +969,7 @@ function executeCaseSelfService()
$dueDate = $calendar->calculateDate(
$appcacheDelDelegateDate,
$taskSelfServiceTime,
- $taskSelfServiceTimeUnit //HOURS|DAYS
+ $taskSelfServiceTimeUnit //HOURS|DAYS|MINUTES
//1
);
diff --git a/workflow/engine/classes/class.actionsByEmail.php b/workflow/engine/classes/class.actionsByEmailCore.php
similarity index 91%
rename from workflow/engine/classes/class.actionsByEmail.php
rename to workflow/engine/classes/class.actionsByEmailCore.php
index b55754ab7..3596ea45f 100644
--- a/workflow/engine/classes/class.actionsByEmail.php
+++ b/workflow/engine/classes/class.actionsByEmailCore.php
@@ -1,7 +1,7 @@
TAS_UID)) {
+ throw new Exception('The parameter $data->TAS_UID is null.');
+ }
- if (!isset($data->TAS_UID)) {
- throw new Exception('The parameter $data->TAS_UID is null.');
- }
+ if (!isset($data->APP_UID)) {
+ throw new Exception('The parameter $data->APP_UID is null.');
+ }
- if (!isset($data->APP_UID)) {
- throw new Exception('The parameter $data->APP_UID is null.');
- }
+ if (!isset($data->DEL_INDEX)) {
+ throw new Exception('The parameter $data->DEL_INDEX is null.');
+ }
- if (!isset($data->DEL_INDEX)) {
- throw new Exception('The parameter $data->DEL_INDEX is null.');
- }
+ if (!isset($data->USR_UID)) {
+ throw new Exception('The parameter $data->USR_UID is null.');
+ }
- if ($data->TAS_UID == '') {
- throw new Exception('The parameter $data->TAS_UID is empty.');
- }
+ if ($data->TAS_UID == '') {
+ throw new Exception('The parameter $data->TAS_UID is empty.');
+ }
- if ($data->APP_UID == '') {
- throw new Exception('The parameter $data->APP_UID is empty.');
- }
+ if ($data->APP_UID == '') {
+ throw new Exception('The parameter $data->APP_UID is empty.');
+ }
- if ($data->DEL_INDEX == '') {
- throw new Exception('The parameter $data->DEL_INDEX is empty.');
+ if ($data->DEL_INDEX == '') {
+ throw new Exception('The parameter $data->DEL_INDEX is empty.');
+ }
+
+ if ($data->USR_UID == '') {
+ throw new Exception('The parameter $data->USR_UID is empty.');
+ }
+ } catch(Exception $e) {
+ echo $e->getMessage().' Please contact to your system administrator.';
+ die;
}
G::LoadClass('pmFunctions');
diff --git a/workflow/engine/classes/class.consolidatedCases.php b/workflow/engine/classes/class.consolidatedCases.php
index 3cabfd476..cbe1fb6fb 100644
--- a/workflow/engine/classes/class.consolidatedCases.php
+++ b/workflow/engine/classes/class.consolidatedCases.php
@@ -16,10 +16,13 @@ class ConsolidatedCases
if ($sRepTabUid != '') {
if (!$status) {
- $oCaseConsolidated = new CaseConsolidated();
- $oCaseConsolidated = CaseConsolidatedPeer::retrieveByPK($sTasUid);
+ $oCaseConsolidated = new CaseConsolidatedCore();
+ $oCaseConsolidated = CaseConsolidatedCorePeer::retrieveByPK($sTasUid);
if (!(is_object($oCaseConsolidated)) || get_class($oCaseConsolidated) != 'CaseConsolidated') {
- $oCaseConsolidated = new CaseConsolidated();
+ $oCaseConsolidated = new CaseConsolidatedCore();
+ $oCaseConsolidated->setTasUid($sTasUid);
+ $oCaseConsolidated->delete();
+ $oCaseConsolidated = new CaseConsolidatedCore();
$oCaseConsolidated->setTasUid($sTasUid);
$oCaseConsolidated->setConStatus('INACTIVE');
$oCaseConsolidated->save();
@@ -168,9 +171,9 @@ class ConsolidatedCases
$oReportTables->populateTable($_POST['form']['REP_TAB_NAME'], $_POST['form']['REP_TAB_CONNECTION'], $_POST['form']['REP_TAB_TYPE'], $aFields, $_POST['form']['PRO_UID'], '');
$sRepTabUid = $_POST['form']['REP_TAB_UID'];
- $oCaseConsolidated = CaseConsolidatedPeer::retrieveByPK($sTasUid);
+ $oCaseConsolidated = CaseConsolidatedCorePeer::retrieveByPK($sTasUid);
if (!(is_object($oCaseConsolidated)) || get_class($oCaseConsolidated) != 'CaseConsolidated') {
- $oCaseConsolidated = new CaseConsolidated();
+ $oCaseConsolidated = new CaseConsolidatedCore();
$oCaseConsolidated->setTasUid($sTasUid);
}
diff --git a/workflow/engine/classes/class.dbConnections.php b/workflow/engine/classes/class.dbConnections.php
index ec4ac1aa7..462932612 100755
--- a/workflow/engine/classes/class.dbConnections.php
+++ b/workflow/engine/classes/class.dbConnections.php
@@ -136,10 +136,13 @@ class dbConnections
/**
* getConnectionsProUid
*
- * @param string $pType
+ * Parameter $only list of items displayed, everything else is ignored.
+ *
+ * @param string $pProUid
+ * @param string $only
* @return Array $connections
*/
- public function getConnectionsProUid ($pProUid)
+ public function getConnectionsProUid ($pProUid, $only = array())
{
$connections = Array ();
$c = new Criteria();
@@ -155,8 +158,9 @@ class dbConnections
$result->next();
$row = $result->getRow();
+ $sw = count($only) > 0;
while ($row = $result->getRow()) {
- if ((trim( $pProUid ) == trim( $row[1] )) && ($row[2] == 'mysql')) {
+ if ((trim( $pProUid ) == trim( $row[1] )) && ( $sw ? in_array($row[2], $only) : true )) {
$connections[] = Array ('DBS_UID' => $row[0],'DBS_NAME' => '[' . $row[3] . '] ' . $row[2] . ': ' . $row[4]
);
}
diff --git a/workflow/engine/classes/class.library.php b/workflow/engine/classes/class.library.php
index d280fa1b6..f83935f83 100644
--- a/workflow/engine/classes/class.library.php
+++ b/workflow/engine/classes/class.library.php
@@ -10,12 +10,12 @@ class Library
$criteria = new Criteria("workflow");
//SELECT
- $criteria->addSelectColumn(CaseConsolidatedPeer::CON_STATUS);
+ $criteria->addSelectColumn(CaseConsolidatedCorePeer::CON_STATUS);
//FROM
//WHERE
- $criteria->add(CaseConsolidatedPeer::CON_STATUS, "ACTIVE");
+ $criteria->add(CaseConsolidatedCorePeer::CON_STATUS, "ACTIVE");
- $activeNumRec = CaseConsolidatedPeer::doCount($criteria);
+ $activeNumRec = CaseConsolidatedCorePeer::doCount($criteria);
//Number of records
$numRec = 0;
diff --git a/workflow/engine/classes/class.pmDynaform.php b/workflow/engine/classes/class.pmDynaform.php
index d53c5b749..04a0f6f47 100644
--- a/workflow/engine/classes/class.pmDynaform.php
+++ b/workflow/engine/classes/class.pmDynaform.php
@@ -152,7 +152,7 @@ class pmDynaform
$cnn = Propel::getConnection($json->dbConnection);
$stmt = $cnn->createStatement();
try {
- $rs = $stmt->executeQuery($json->sql, \ResultSet::FETCHMODE_NUM);
+ $rs = $stmt->executeQuery(G::replaceDataField($json->sql, array()), \ResultSet::FETCHMODE_NUM);
while ($rs->next()) {
$row = $rs->getRow();
$option = array(
@@ -219,7 +219,7 @@ class pmDynaform
$cells = array();
foreach ($json->columns as $column) {
//data
- if ($column->type === "text" || $column->type === "textarea" || $column->type === "dropdown" || $column->type === "suggest" || $column->type === "datetime" || $column->type === "checkbox" || $column->type === "file" || $column->type === "link" || $value === "hidden") {
+ if ($column->type === "text" || $column->type === "textarea" || $column->type === "dropdown" || $column->type === "suggest" || $column->type === "datetime" || $column->type === "checkbox" || $column->type === "file" || $column->type === "link" || $column->type === "hidden") {
array_push($cells, array(
"value" => isset($row[$column->name]) ? $row[$column->name] : "",
"label" => isset($row[$column->name . "_label"]) ? $row[$column->name . "_label"] : (isset($row[$column->name]) ? $row[$column->name] : "")
diff --git a/workflow/engine/classes/class.processMap.php b/workflow/engine/classes/class.processMap.php
index 7dd4742f1..1b5521d1a 100755
--- a/workflow/engine/classes/class.processMap.php
+++ b/workflow/engine/classes/class.processMap.php
@@ -1545,7 +1545,7 @@ class processMap
}
if ($iForm == 8) {
- $oCaseConsolidated = CaseConsolidatedPeer::retrieveByPK($_SESSION["cDhTajE2T2lxSkhqMzZUTXVacWYyNcKwV3A4eWYybDdyb1p3"]["TAS_UID"]);
+ $oCaseConsolidated = CaseConsolidatedCorePeer::retrieveByPK($_SESSION["cDhTajE2T2lxSkhqMzZUTXVacWYyNcKwV3A4eWYybDdyb1p3"]["TAS_UID"]);
if ((is_object($oCaseConsolidated)) && get_class($oCaseConsolidated) == "CaseConsolidated") {
require_once ("classes/model/ReportTable.php");
diff --git a/workflow/engine/classes/class.reportTables.php b/workflow/engine/classes/class.reportTables.php
index 398c35ad5..05a349f4e 100755
--- a/workflow/engine/classes/class.reportTables.php
+++ b/workflow/engine/classes/class.reportTables.php
@@ -582,6 +582,15 @@ class ReportTables
$sQuery = 'UPDATE `' . $aRow['REP_TAB_NAME'] . '` SET ';
foreach ($aTableFields as $aField) {
$sQuery .= '`' . $aField['sFieldName'] . '` = ';
+
+ if(!isset($aFields[$aField['sFieldName']])){
+ foreach($aFields as $row){
+ if(is_array($row)){
+ $aFields = $row[count($row)];
+ }
+ }
+ }
+
switch ($aField['sType']) {
case 'number':
$sQuery .= (isset( $aFields[$aField['sFieldName']] ) ? (float) str_replace( ',', '', $aFields[$aField['sFieldName']] ) : '0') . ',';
diff --git a/workflow/engine/classes/model/AppDelegation.php b/workflow/engine/classes/model/AppDelegation.php
index a69e80e34..6e7bee609 100755
--- a/workflow/engine/classes/model/AppDelegation.php
+++ b/workflow/engine/classes/model/AppDelegation.php
@@ -188,9 +188,19 @@ class AppDelegation extends BaseAppDelegation
if (PMLicensedFeatures
::getSingleton()
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
- G::LoadClass('actionsByEmail');
- $actionsByEmail = new actionsByEmailClass();
- $actionsByEmail->sendActionsByEmail($data);
+ $criteriaAbe = new Criteria();
+ $criteriaAbe->add(AbeConfigurationPeer::PRO_UID, $sProUid);
+ $criteriaAbe->add(AbeConfigurationPeer::TAS_UID, $sTasUid);
+ $resultAbe = AbeConfigurationPeer::doSelectRS($criteriaAbe);
+ $resultAbe->setFetchmode(ResultSet::FETCHMODE_ASSOC);
+ if ($resultAbe->next()) {
+ $dataAbe = $resultAbe->getRow();
+ if($dataAbe['ABE_TYPE']!=''){
+ G::LoadClass('actionsByEmailCore');
+ $actionsByEmail = new actionsByEmailCoreClass();
+ $actionsByEmail->sendActionsByEmail($data);
+ }
+ }
}
/*----------------------------------********---------------------------------*/
}
diff --git a/workflow/engine/classes/model/CaseConsolidated.php b/workflow/engine/classes/model/CaseConsolidatedCore.php
similarity index 74%
rename from workflow/engine/classes/model/CaseConsolidated.php
rename to workflow/engine/classes/model/CaseConsolidatedCore.php
index 972127612..17f661d0f 100644
--- a/workflow/engine/classes/model/CaseConsolidated.php
+++ b/workflow/engine/classes/model/CaseConsolidatedCore.php
@@ -1,6 +1,6 @@
fromArray( $aData, BasePeer::TYPE_FIELDNAME );
if ($this->validate()) {
$result = $this->save();
@@ -88,6 +93,11 @@ class CaseScheduler extends BaseCaseScheduler
{
$con = Propel::getConnection( CaseSchedulerPeer::DATABASE_NAME );
try {
+ if (isset($fields["SCH_OPTION"]) && (int)($fields["SCH_OPTION"]) == 4) {
+ //One time only
+ $fields["SCH_END_DATE"] = null;
+ }
+
$con->begin();
$this->load( $fields['SCH_UID'] );
$this->fromArray( $fields, BasePeer::TYPE_FIELDNAME );
@@ -329,8 +339,8 @@ class CaseScheduler extends BaseCaseScheduler
$timeDate = strtotime($date);
- $dateHour = (int)(date("H", $timeDate));
- $dateMinutes = (int)(date("i", $timeDate));
+ $dateHour = date("H", $timeDate);
+ $dateMinutes = date("i", $timeDate);
$dateCurrentIni = date("Y-m-d", $timeDate) . " 00:00:00";
$dateCurrentEnd = date("Y-m-d", $timeDate) . " 23:59:59";
@@ -345,7 +355,7 @@ class CaseScheduler extends BaseCaseScheduler
$criteria->add(
$criteria->getNewCriterion(CaseSchedulerPeer::SCH_TIME_NEXT_RUN, $dateCurrentIni, Criteria::GREATER_EQUAL)->addAnd(
$criteria->getNewCriterion(CaseSchedulerPeer::SCH_TIME_NEXT_RUN, $dateCurrentEnd, Criteria::LESS_EQUAL))->addOr(
- $criteria->getNewCriterion(CaseSchedulerPeer::SCH_OPTION, 5, Criteria::GREATER_EQUAL))->addOr(
+ //$criteria->getNewCriterion(CaseSchedulerPeer::SCH_OPTION, 5, Criteria::GREATER_EQUAL))->addOr(
$criteria->getNewCriterion(CaseSchedulerPeer::SCH_TIME_NEXT_RUN, $dateCurrentIni, Criteria::LESS_THAN))
);
@@ -379,13 +389,18 @@ class CaseScheduler extends BaseCaseScheduler
$flagNewCase = true; //Create the old case
$caseSchedulerTimeNextRunNew = $this->getTimeNextRunByDate($row, $date, false);
} else {
- $caseSchedulerTimeNextRunHour = (int)(date("H", strtotime($row["SCH_TIME_NEXT_RUN"])));
- $caseSchedulerTimeNextRunMinutes = (int)(date("i", strtotime($row["SCH_TIME_NEXT_RUN"])));
+ $caseSchedulerTimeNextRunHour = date("H", strtotime($row["SCH_TIME_NEXT_RUN"]));
+ $caseSchedulerTimeNextRunMinutes = date("i", strtotime($row["SCH_TIME_NEXT_RUN"]));
- $flagNewCase = ($caseSchedulerTimeNextRunHour == $dateHour && $caseSchedulerTimeNextRunMinutes <= $dateMinutes) || $caseSchedulerTimeNextRunHour < $dateHour;
+ if ((int)($dateHour . $dateMinutes) <= (int)($caseSchedulerTimeNextRunHour . $caseSchedulerTimeNextRunMinutes)) {
+ $flagNewCase = $caseSchedulerTimeNextRunHour == $dateHour && $caseSchedulerTimeNextRunMinutes == $dateMinutes;
+ } else {
+ $flagNewCase = true; //Create the old case
+ }
}
if ($flagNewCase) {
+ println(" CASE SCHEDULER: " . $row["SCH_NAME"]);
println(" - Connecting webservice: $wsdl");
$user = $row["SCH_DEL_USER_NAME"];
@@ -414,6 +429,9 @@ class CaseScheduler extends BaseCaseScheduler
"WS_ROUTE_CASE_STATUS" => ""
);
+ $paramsLogResult = "FAILED";
+ $paramsRouteLogResult = "FAILED";
+
if ($result->status_code == 0) {
eprintln(" OK", "green");
@@ -579,7 +597,7 @@ class CaseScheduler extends BaseCaseScheduler
case 5:
//Every
if ($caseSchedulerTimeNextRunNew == "") {
- $caseSchedulerTimeNextRunNew = date("Y-m-d H:i:s", $timeDate + (((int)($row["SCH_REPEAT_EVERY"])) * 60 * 60));
+ $caseSchedulerTimeNextRunNew = date("Y-m-d H:i:s", $timeDate + round(floatval($row["SCH_REPEAT_EVERY"]) * 60 * 60));
}
$this->updateDate($caseSchedulerUid, $caseSchedulerTimeNextRunNew, $caseSchedulerTimeNextRun);
@@ -600,164 +618,111 @@ class CaseScheduler extends BaseCaseScheduler
$this->Update( $Fields );
}
- public function updateNextRun($sOption, $sValue = "", $sActualTime = "", $sDaysPerformTask = "", $sWeeks = "", $sStartDay = "", $sMonths = "", $currentDate = "", $flagOptionWeeklyNextRun = true)
+ public function updateNextRun($option, $optionMonth = "", $date = "", $daysPerformTask = "", $weeks = "", $startDay = "", $months = "", $currentDate = "", $flagNoTodayForNextRun = true)
{
- $nActualDate = $currentDate . " " . $sActualTime;
- $dEstimatedDate = '';
- $sWeeks = trim($sWeeks, " |");
+ try {
+ $dateNextRun = "";
- switch ($sOption) {
- case '1':
- switch ($sValue) {
- case '1':
- $dEstimatedDate = date( 'Y-m-d H:i:s', strtotime( "$nActualDate +1 day" ) );
- break;
- case '2':
- $nDayOfTheWeek = date( 'w', strtotime( $sActualTime ) );
- $nDayOfTheWeek = ($nDayOfTheWeek == 0) ? 7 : $nDayOfTheWeek;
+ $currentDate = trim($currentDate . " " . $date); //$date and $currentDate are the same
+ $weeks = trim($weeks, " |");
+ $months = trim($months, " |");
- if ($nDayOfTheWeek >= 5) {
- $dEstimatedDate = date( 'Y-m-d H:i:s', strtotime( "$nActualDate +3 day" ) );
- } else {
- $dEstimatedDate = date( 'Y-m-d H:i:s', strtotime( "$nActualDate +1 day" ) );
- }
- break;
- case '3':
- $dEstimatedDate = date( 'Y-m-d H:i:s', strtotime( "$nActualDate + " . $sDaysPerformTask . " day" ) );
- break;
- }
- break;
- case '2':
- if ($sWeeks != "") {
- $aDaysWeek = array ('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday');
+ $arrayMonthsShort = array("Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec");
+ $arrayWeekdays = array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday");
- $nDayOfTheWeek = (int)(date("w", strtotime($sActualTime)));
- $nDayOfTheWeek = ($nDayOfTheWeek == 0)? 7 : $nDayOfTheWeek;
+ switch ((int)($option)) {
+ case 1:
+ //Daily
+ $dateNextRun = date("Y-m-d H:i:s", strtotime(($flagNoTodayForNextRun)? "$currentDate +1 day" : $currentDate));
+ break;
+ case 2:
+ //Weekly
+ if ($weeks != "") {
+ $weekday = (int)(date("w", strtotime($date)));
+ $weekday = ($weekday == 0)? 7 : $weekday;
- $arrayWeekdays = explode("|", $sWeeks);
- $firstDay = (int)($arrayWeekdays[0]);
- $lastDay = (int)($arrayWeekdays[count($arrayWeekdays) - 1]);
+ $arrayWeekdaysData = explode("|", $weeks);
- $flagFound1 = $nDayOfTheWeek < $firstDay || in_array($nDayOfTheWeek, $arrayWeekdays);
- $flagFound2 = ($flagFound1)? false : ($firstDay <= $nDayOfTheWeek && $nDayOfTheWeek <= $lastDay);
+ $firstWeekday = (int)($arrayWeekdaysData[0]);
- if ($flagFound1 || $flagFound2) {
+ $nextWeekday = $firstWeekday;
$typeStatement = "this";
+ $flag = false;
- if ($flagFound1) {
- $indexDay = (in_array($nDayOfTheWeek, $arrayWeekdays))? $nDayOfTheWeek : $firstDay;
+ foreach ($arrayWeekdaysData as $value) {
+ $d = (int)($value);
- if ($flagOptionWeeklyNextRun) {
- $index = array_search($nDayOfTheWeek, $arrayWeekdays);
-
- if ($index !== false && isset($arrayWeekdays[$index + 1])) {
- $indexDay = $arrayWeekdays[$index + 1];
- } else {
- $typeStatement = "next";
- $indexDay = $firstDay;
- }
+ if ((!$flagNoTodayForNextRun && $d >= $weekday) || ($flagNoTodayForNextRun && $d > $weekday)) {
+ $nextWeekday = $d;
+ $flag = true;
+ break;
}
}
- if ($flagFound2) {
- $indexDay = $firstDay;
+ if (!$flag) {
+ $typeStatement = "next";
+ }
- foreach ($arrayWeekdays as $value) {
- $day = (int)($value);
+ $dateNextRun = date("Y-m-d", strtotime($currentDate . " " . $typeStatement . " " . $arrayWeekdays[$nextWeekday - 1])) . " " . date("H:i:s", strtotime($date));
+ }
+ break;
+ case 3:
+ //Monthly
+ if ($months != "") {
+ $year = (int)(date("Y", strtotime($date)));
+ $month = (int)(date("m", strtotime($date)));
- if ($day > $nDayOfTheWeek) {
- $indexDay = $day;
- break;
- }
+ $arrayStartDay = explode("|", $startDay);
+ $arrayMonthsData = explode("|", $months);
+
+ $firstMonth = (int)($arrayMonthsData[0]);
+
+ $nextMonth = $firstMonth;
+ $flag = false;
+
+ foreach ($arrayMonthsData as $value) {
+ $m = (int)($value);
+
+ if ((!$flagNoTodayForNextRun && $m >= $month) || ($flagNoTodayForNextRun && $m > $month)) {
+ $nextMonth = $m;
+ $flag = true;
+ break;
}
}
- $indexDay--;
+ if (!$flag) {
+ $year++;
+ }
- $dEstimatedDate = date("Y-m-d", strtotime($nActualDate . " " . $typeStatement . " " . $aDaysWeek[$indexDay])) . " " . date("H:i:s", strtotime($sActualTime));
- } else {
- $nEveryDays = $sDaysPerformTask;
+ switch ((int)($optionMonth)) {
+ case 1:
+ $day = (int)($arrayStartDay[1]);
- $typeStatement = ($firstDay >= $nDayOfTheWeek || $nEveryDays == 1)? "next" : "last";
- $indexDay = $firstDay - 1;
+ $dateNextRun = date("Y-m-d", strtotime("$year-$nextMonth-$day")) . " " . date("H:i:s", strtotime($date));
+ break;
+ case 2:
+ $arrayFormat = array(
+ 1 => "+0 week %s %s %d", //First
+ 2 => "+1 week %s %s %d", //Second
+ 3 => "+2 week %s %s %d", //Third
+ 4 => "+3 week %s %s %d", //Fourth
+ 5 => "last %s of %s %d" //Last
+ );
- if ($nEveryDays == 1) {
- $dEstimatedDate = date("Y-m-d", strtotime($nActualDate . " " . $typeStatement . " " . $aDaysWeek[$indexDay])) . " " . date("H:i:s", strtotime($sActualTime));
- } else {
- $nEveryDays = 1;
- $nDataTmp = date( 'Y-m-d', strtotime( "$nActualDate + " . $nEveryDays . " Week" ) );
- $dEstimatedDate = date("Y-m-d", strtotime($nDataTmp . " " . $typeStatement . " " . $aDaysWeek[$indexDay])) . " " . date("H:i:s", strtotime($sActualTime));
+ $day = (int)($arrayStartDay[2]);
+
+ $dateNextRun = date("Y-m-d", strtotime(sprintf($arrayFormat[(int)($arrayStartDay[1])], $arrayWeekdays[$day - 1], $arrayMonthsShort[$nextMonth - 1], $year))) . " " . date("H:i:s", strtotime($date));
+ break;
}
}
- }
- break;
- case '3':
- if (strlen( $sMonths ) > 0) {
- // Must have at least one selected month
- // Calculamos para la siguiente ejecucion, acorde a lo seleccionado
- $aStartDay = explode( '|', $sStartDay );
- $nYear = date( "Y", strtotime( $sActualTime ) );
- $nCurrentMonth = date( "m", strtotime( $sActualTime ) );
- $nCurrentDay = date( "d", strtotime( $sActualTime ) );
- $aMonths = explode( '|', $sMonths );
+ break;
+ }
- $nSW = 0;
- $nNextMonth = 0;
- foreach ($aMonths as $value) {
- if ($value > $nCurrentMonth) {
- $nNextMonth = $value - 1;
- $nSW = 1;
- break;
- }
- }
-
- if ($nSW == 1) {
- $nExecNextMonth = $nNextMonth;
- } else {
- $nExecNextMonth = $aMonths[0] - 1;
- $nYear ++;
- }
-
- switch ($sValue) {
- case '1':
- $nExecNextMonth ++;
- $nCurrentDay = $aStartDay[1];
- $dEstimatedDate = date( 'Y-m-d', strtotime( "$nYear-$nExecNextMonth-$nCurrentDay" ) ) . ' ' . date( 'H:i:s', strtotime( $sActualTime ) );
- break;
- case '2':
- $aMontsShort = array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec');
- $aWeeksShort = array ('Monday','Tuesday','Wednesday','Thursday','Friday','Saturday','Sunday');
- $sNumDayWeek = $aStartDay[1];
- $sDayWeek = ($aStartDay[2] == 7 ? 0 : $aStartDay[2]);
- switch ($sNumDayWeek) {
- case '1':
- $sDaysWeekOpt = "+0";
- break;
- case '2':
- $sDaysWeekOpt = "+1";
- break;
- case '3':
- $sDaysWeekOpt = "+2";
- break;
- case '4':
- $sDaysWeekOpt = "+3";
- break;
- case '5':
- $sDaysWeekOpt = "-1";
- $nExecNextMonth ++;
- if ($nExecNextMonth >= 12) {
- $nExecNextMonth = 0;
- $nYear ++;
- }
- break;
- }
- $dEstimatedDate = date( 'Y-m-d', strtotime( $sDaysWeekOpt . ' week ' . $aWeeksShort[$sDayWeek - 1] . ' ' . $aMontsShort[$nExecNextMonth] . ' ' . $nYear ) ) . ' ' . date( 'H:i:s', strtotime( $sActualTime ) );
- break;
- }
- }
- break;
+ //Return
+ return $dateNextRun;
+ } catch (Exception $e) {
+ throw $e;
}
- return $dEstimatedDate;
}
public function Exists ($sUid)
@@ -836,44 +801,34 @@ class CaseScheduler extends BaseCaseScheduler
public function getTimeNextRunByDate(array $arrayCaseSchedulerData, $date, $flagUpdateTimeNextRun = true)
{
try {
- $arrayNextDate = array();
-
- //Get date
$caseSchedulerOption = (int)($arrayCaseSchedulerData["SCH_OPTION"]);
$caseSchedulerTimeNextRun = $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"];
+ $caseSchedulerStartTime = date("H:i:s", strtotime($arrayCaseSchedulerData["SCH_START_TIME"]));
list($value, $daysPerformTask, $weeks, $startDay, $months) = $this->getVariablesFromRecord($arrayCaseSchedulerData);
$timeDate = strtotime($date); //Current time
- $timeCaseSchedulerTimeNextRun = strtotime($caseSchedulerTimeNextRun);
- $flagTimeNextRun = false;
+ $flagTimeNextRun = true;
$flagUpdate = false;
- if ($caseSchedulerOption != 1) {
- //Others
- $flagTimeNextRun = true;
- } else {
- //Daily
- $arrayDate = array(
- date("Y-m-d", strtotime($arrayCaseSchedulerData["SCH_START_DATE"])) . " " . date("H:i:s", $timeCaseSchedulerTimeNextRun),
- date("Y-m-d", $timeDate) . " " . date("H:i:s", $timeCaseSchedulerTimeNextRun)
- );
+ switch ($caseSchedulerOption) {
+ case 1:
+ case 2:
+ case 3:
+ //Daily
+ //Weekly
+ //Monthly
+ $caseSchedulerTimeNextRun = date("Y-m-d", strtotime($arrayCaseSchedulerData["SCH_START_DATE"])) . " " . $caseSchedulerStartTime;
+ $caseSchedulerTimeNextRun = $this->updateNextRun($caseSchedulerOption, $value, $caseSchedulerTimeNextRun, $daysPerformTask, $weeks, $startDay, $months, "", false);
- $flagTimeNextRun = true;
-
- foreach ($arrayDate as $d) {
- $caseSchedulerTimeNextRun2 = $d;
- $timeCaseSchedulerTimeNextRun2 = strtotime($caseSchedulerTimeNextRun2);
-
- if ($timeDate < $timeCaseSchedulerTimeNextRun2) {
- $caseSchedulerTimeNextRun = $caseSchedulerTimeNextRun2;
+ $timeCaseSchedulerTimeNextRun = strtotime($caseSchedulerTimeNextRun);
+ if ($timeCaseSchedulerTimeNextRun > $timeDate) {
$flagTimeNextRun = false;
$flagUpdate = true;
- break;
}
- }
+ break;
}
if ($flagTimeNextRun) {
@@ -884,7 +839,7 @@ class CaseScheduler extends BaseCaseScheduler
//Daily
//Weekly
//Monthly
- $caseSchedulerTimeNextRun = date("Y-m-d", $timeDate) . " " . date("H:i:s", $timeCaseSchedulerTimeNextRun);
+ $caseSchedulerTimeNextRun = date("Y-m-d", $timeDate) . " " . $caseSchedulerStartTime;
$caseSchedulerTimeNextRun = $this->updateNextRun($caseSchedulerOption, $value, $caseSchedulerTimeNextRun, $daysPerformTask, $weeks, $startDay, $months, "", false);
$timeCaseSchedulerTimeNextRun = strtotime($caseSchedulerTimeNextRun);
@@ -895,7 +850,7 @@ class CaseScheduler extends BaseCaseScheduler
break;
case 4:
//One time only
- $caseSchedulerTimeNextRun = date("Y-m-d", $timeDate) . " " . date("H:i:s", $timeCaseSchedulerTimeNextRun);
+ $caseSchedulerTimeNextRun = date("Y-m-d", $timeDate) . " " . $caseSchedulerStartTime;
$timeCaseSchedulerTimeNextRun = strtotime($caseSchedulerTimeNextRun);
@@ -905,7 +860,7 @@ class CaseScheduler extends BaseCaseScheduler
break;
case 5:
//Every
- $caseSchedulerTimeNextRun = date("Y-m-d H:i:s", $timeDate + (((int)($arrayCaseSchedulerData["SCH_REPEAT_EVERY"])) * 60 * 60));
+ $caseSchedulerTimeNextRun = date("Y-m-d H:i:s", $timeDate + round(floatval($arrayCaseSchedulerData["SCH_REPEAT_EVERY"]) * 60 * 60));
break;
}
diff --git a/workflow/engine/classes/model/map/CaseConsolidatedMapBuilder.php b/workflow/engine/classes/model/map/CaseConsolidatedCoreMapBuilder.php
similarity index 92%
rename from workflow/engine/classes/model/map/CaseConsolidatedMapBuilder.php
rename to workflow/engine/classes/model/map/CaseConsolidatedCoreMapBuilder.php
index 92a061b2b..e3781fafe 100644
--- a/workflow/engine/classes/model/map/CaseConsolidatedMapBuilder.php
+++ b/workflow/engine/classes/model/map/CaseConsolidatedCoreMapBuilder.php
@@ -16,13 +16,13 @@ include_once 'creole/CreoleTypes.php';
*
* @package workflow.classes.model.map
*/
-class CaseConsolidatedMapBuilder
+class CaseConsolidatedCoreMapBuilder
{
/**
* The (dot-path) name of this class
*/
- const CLASS_NAME = 'classes.model.map.CaseConsolidatedMapBuilder';
+ const CLASS_NAME = 'classes.model.map.CaseConsolidatedCoreMapBuilder';
/**
* The database map.
@@ -75,4 +75,4 @@ class CaseConsolidatedMapBuilder
} // doBuild()
-} // CaseConsolidatedMapBuilder
+} // CaseConsolidatedCoreMapBuilder
diff --git a/workflow/engine/classes/model/map/CaseSchedulerMapBuilder.php b/workflow/engine/classes/model/map/CaseSchedulerMapBuilder.php
index 86451a832..bf392b5cf 100755
--- a/workflow/engine/classes/model/map/CaseSchedulerMapBuilder.php
+++ b/workflow/engine/classes/model/map/CaseSchedulerMapBuilder.php
@@ -103,7 +103,7 @@ class CaseSchedulerMapBuilder
$tMap->addColumn('SCH_START_DAY', 'SchStartDay', 'string', CreoleTypes::CHAR, true, 6);
- $tMap->addColumn('SCH_MONTHS', 'SchMonths', 'string', CreoleTypes::CHAR, true, 24);
+ $tMap->addColumn('SCH_MONTHS', 'SchMonths', 'string', CreoleTypes::CHAR, true, 27);
$tMap->addColumn('SCH_END_DATE', 'SchEndDate', 'int', CreoleTypes::TIMESTAMP, false, null);
@@ -113,6 +113,8 @@ class CaseSchedulerMapBuilder
$tMap->addColumn('SCH_REPEAT_STOP_IF_RUNNING', 'SchRepeatStopIfRunning', 'int', CreoleTypes::TINYINT, false, null);
+ $tMap->addColumn('SCH_EXECUTION_DATE', 'SchExecutionDate', 'int', CreoleTypes::TIMESTAMP, false, null);
+
$tMap->addColumn('CASE_SH_PLUGIN_UID', 'CaseShPluginUid', 'string', CreoleTypes::VARCHAR, false, 100);
} // doBuild()
diff --git a/workflow/engine/classes/model/om/BaseCaseConsolidated.php b/workflow/engine/classes/model/om/BaseCaseConsolidatedCore.php
similarity index 88%
rename from workflow/engine/classes/model/om/BaseCaseConsolidated.php
rename to workflow/engine/classes/model/om/BaseCaseConsolidatedCore.php
index b0f0ba1c2..5f5bd342d 100644
--- a/workflow/engine/classes/model/om/BaseCaseConsolidated.php
+++ b/workflow/engine/classes/model/om/BaseCaseConsolidatedCore.php
@@ -7,7 +7,7 @@ require_once 'propel/om/Persistent.php';
include_once 'propel/util/Criteria.php';
-include_once 'classes/model/CaseConsolidatedPeer.php';
+include_once 'classes/model/CaseConsolidatedCorePeer.php';
/**
* Base class that represents a row from the 'CASE_CONSOLIDATED' table.
@@ -16,7 +16,7 @@ include_once 'classes/model/CaseConsolidatedPeer.php';
*
* @package workflow.classes.model.om
*/
-abstract class BaseCaseConsolidated extends BaseObject implements Persistent
+abstract class BaseCaseConsolidatedCore extends BaseObject implements Persistent
{
/**
@@ -126,7 +126,7 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
if ($this->tas_uid !== $v || $v === '') {
$this->tas_uid = $v;
- $this->modifiedColumns[] = CaseConsolidatedPeer::TAS_UID;
+ $this->modifiedColumns[] = CaseConsolidatedCorePeer::TAS_UID;
}
} // setTasUid()
@@ -148,7 +148,7 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
if ($this->dyn_uid !== $v || $v === '') {
$this->dyn_uid = $v;
- $this->modifiedColumns[] = CaseConsolidatedPeer::DYN_UID;
+ $this->modifiedColumns[] = CaseConsolidatedCorePeer::DYN_UID;
}
} // setDynUid()
@@ -170,7 +170,7 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
if ($this->rep_tab_uid !== $v || $v === '') {
$this->rep_tab_uid = $v;
- $this->modifiedColumns[] = CaseConsolidatedPeer::REP_TAB_UID;
+ $this->modifiedColumns[] = CaseConsolidatedCorePeer::REP_TAB_UID;
}
} // setRepTabUid()
@@ -192,7 +192,7 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
if ($this->con_status !== $v || $v === 'ACTIVE') {
$this->con_status = $v;
- $this->modifiedColumns[] = CaseConsolidatedPeer::CON_STATUS;
+ $this->modifiedColumns[] = CaseConsolidatedCorePeer::CON_STATUS;
}
} // setConStatus()
@@ -227,7 +227,7 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
- return $startcol + 4; // 4 = CaseConsolidatedPeer::NUM_COLUMNS - CaseConsolidatedPeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 4; // 4 = CaseConsolidatedCorePeer::NUM_COLUMNS - CaseConsolidatedCorePeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating CaseConsolidated object", $e);
@@ -250,12 +250,12 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CaseConsolidatedPeer::DATABASE_NAME);
+ $con = Propel::getConnection(CaseConsolidatedCorePeer::DATABASE_NAME);
}
try {
$con->begin();
- CaseConsolidatedPeer::doDelete($this, $con);
+ CaseConsolidatedCorePeer::doDelete($this, $con);
$this->setDeleted(true);
$con->commit();
} catch (PropelException $e) {
@@ -281,7 +281,7 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
}
if ($con === null) {
- $con = Propel::getConnection(CaseConsolidatedPeer::DATABASE_NAME);
+ $con = Propel::getConnection(CaseConsolidatedCorePeer::DATABASE_NAME);
}
try {
@@ -316,14 +316,14 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
// If this object has been modified, then save it to the database.
if ($this->isModified()) {
if ($this->isNew()) {
- $pk = CaseConsolidatedPeer::doInsert($this, $con);
+ $pk = CaseConsolidatedCorePeer::doInsert($this, $con);
$affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
// should always be true here (even though technically
// BasePeer::doInsert() can insert multiple rows).
$this->setNew(false);
} else {
- $affectedRows += CaseConsolidatedPeer::doUpdate($this, $con);
+ $affectedRows += CaseConsolidatedCorePeer::doUpdate($this, $con);
}
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
}
@@ -394,7 +394,7 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
$failureMap = array();
- if (($retval = CaseConsolidatedPeer::doValidate($this, $columns)) !== true) {
+ if (($retval = CaseConsolidatedCorePeer::doValidate($this, $columns)) !== true) {
$failureMap = array_merge($failureMap, $retval);
}
@@ -417,7 +417,7 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
*/
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
{
- $pos = CaseConsolidatedPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ $pos = CaseConsolidatedCorePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->getByPosition($pos);
}
@@ -461,7 +461,7 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
*/
public function toArray($keyType = BasePeer::TYPE_PHPNAME)
{
- $keys = CaseConsolidatedPeer::getFieldNames($keyType);
+ $keys = CaseConsolidatedCorePeer::getFieldNames($keyType);
$result = array(
$keys[0] => $this->getTasUid(),
$keys[1] => $this->getDynUid(),
@@ -483,7 +483,7 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
*/
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
{
- $pos = CaseConsolidatedPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
+ $pos = CaseConsolidatedCorePeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
return $this->setByPosition($pos, $value);
}
@@ -531,7 +531,7 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
*/
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
{
- $keys = CaseConsolidatedPeer::getFieldNames($keyType);
+ $keys = CaseConsolidatedCorePeer::getFieldNames($keyType);
if (array_key_exists($keys[0], $arr)) {
$this->setTasUid($arr[$keys[0]]);
@@ -558,22 +558,22 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
*/
public function buildCriteria()
{
- $criteria = new Criteria(CaseConsolidatedPeer::DATABASE_NAME);
+ $criteria = new Criteria(CaseConsolidatedCorePeer::DATABASE_NAME);
- if ($this->isColumnModified(CaseConsolidatedPeer::TAS_UID)) {
- $criteria->add(CaseConsolidatedPeer::TAS_UID, $this->tas_uid);
+ if ($this->isColumnModified(CaseConsolidatedCorePeer::TAS_UID)) {
+ $criteria->add(CaseConsolidatedCorePeer::TAS_UID, $this->tas_uid);
}
- if ($this->isColumnModified(CaseConsolidatedPeer::DYN_UID)) {
- $criteria->add(CaseConsolidatedPeer::DYN_UID, $this->dyn_uid);
+ if ($this->isColumnModified(CaseConsolidatedCorePeer::DYN_UID)) {
+ $criteria->add(CaseConsolidatedCorePeer::DYN_UID, $this->dyn_uid);
}
- if ($this->isColumnModified(CaseConsolidatedPeer::REP_TAB_UID)) {
- $criteria->add(CaseConsolidatedPeer::REP_TAB_UID, $this->rep_tab_uid);
+ if ($this->isColumnModified(CaseConsolidatedCorePeer::REP_TAB_UID)) {
+ $criteria->add(CaseConsolidatedCorePeer::REP_TAB_UID, $this->rep_tab_uid);
}
- if ($this->isColumnModified(CaseConsolidatedPeer::CON_STATUS)) {
- $criteria->add(CaseConsolidatedPeer::CON_STATUS, $this->con_status);
+ if ($this->isColumnModified(CaseConsolidatedCorePeer::CON_STATUS)) {
+ $criteria->add(CaseConsolidatedCorePeer::CON_STATUS, $this->con_status);
}
@@ -590,9 +590,9 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
*/
public function buildPkeyCriteria()
{
- $criteria = new Criteria(CaseConsolidatedPeer::DATABASE_NAME);
+ $criteria = new Criteria(CaseConsolidatedCorePeer::DATABASE_NAME);
- $criteria->add(CaseConsolidatedPeer::TAS_UID, $this->tas_uid);
+ $criteria->add(CaseConsolidatedCorePeer::TAS_UID, $this->tas_uid);
return $criteria;
}
@@ -671,12 +671,12 @@ abstract class BaseCaseConsolidated extends BaseObject implements Persistent
* same instance for all member of this class. The method could therefore
* be static, but this would prevent one from overriding the behavior.
*
- * @return CaseConsolidatedPeer
+ * @return CaseConsolidatedCorePeer
*/
public function getPeer()
{
if (self::$peer === null) {
- self::$peer = new CaseConsolidatedPeer();
+ self::$peer = new CaseConsolidatedCorePeer();
}
return self::$peer;
}
diff --git a/workflow/engine/classes/model/om/BaseCaseConsolidatedPeer.php b/workflow/engine/classes/model/om/BaseCaseConsolidatedCorePeer.php
similarity index 86%
rename from workflow/engine/classes/model/om/BaseCaseConsolidatedPeer.php
rename to workflow/engine/classes/model/om/BaseCaseConsolidatedCorePeer.php
index 5c280d57a..d422e57e1 100644
--- a/workflow/engine/classes/model/om/BaseCaseConsolidatedPeer.php
+++ b/workflow/engine/classes/model/om/BaseCaseConsolidatedCorePeer.php
@@ -2,8 +2,8 @@
require_once 'propel/util/BasePeer.php';
// The object class -- needed for instanceof checks in this class.
-// actual class may be a subclass -- as returned by CaseConsolidatedPeer::getOMClass()
-include_once 'classes/model/CaseConsolidated.php';
+// actual class may be a subclass -- as returned by CaseConsolidatedCorePeer::getOMClass()
+include_once 'classes/model/CaseConsolidatedCore.php';
/**
* Base static class for performing query and update operations on the 'CASE_CONSOLIDATED' table.
@@ -12,7 +12,7 @@ include_once 'classes/model/CaseConsolidated.php';
*
* @package workflow.classes.model.om
*/
-abstract class BaseCaseConsolidatedPeer
+abstract class BaseCaseConsolidatedCorePeer
{
/** the default database name for this class */
@@ -22,7 +22,7 @@ abstract class BaseCaseConsolidatedPeer
const TABLE_NAME = 'CASE_CONSOLIDATED';
/** A class that can be returned by this peer. */
- const CLASS_DEFAULT = 'classes.model.CaseConsolidated';
+ const CLASS_DEFAULT = 'classes.model.CaseConsolidatedCore';
/** The total number of columns. */
const NUM_COLUMNS = 4;
@@ -55,7 +55,7 @@ abstract class BaseCaseConsolidatedPeer
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('TasUid', 'DynUid', 'RepTabUid', 'ConStatus', ),
- BasePeer::TYPE_COLNAME => array (CaseConsolidatedPeer::TAS_UID, CaseConsolidatedPeer::DYN_UID, CaseConsolidatedPeer::REP_TAB_UID, CaseConsolidatedPeer::CON_STATUS, ),
+ BasePeer::TYPE_COLNAME => array (CaseConsolidatedCorePeer::TAS_UID, CaseConsolidatedCorePeer::DYN_UID, CaseConsolidatedCorePeer::REP_TAB_UID, CaseConsolidatedCorePeer::CON_STATUS, ),
BasePeer::TYPE_FIELDNAME => array ('TAS_UID', 'DYN_UID', 'REP_TAB_UID', 'CON_STATUS', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
@@ -68,7 +68,7 @@ abstract class BaseCaseConsolidatedPeer
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('TasUid' => 0, 'DynUid' => 1, 'RepTabUid' => 2, 'ConStatus' => 3, ),
- BasePeer::TYPE_COLNAME => array (CaseConsolidatedPeer::TAS_UID => 0, CaseConsolidatedPeer::DYN_UID => 1, CaseConsolidatedPeer::REP_TAB_UID => 2, CaseConsolidatedPeer::CON_STATUS => 3, ),
+ BasePeer::TYPE_COLNAME => array (CaseConsolidatedCorePeer::TAS_UID => 0, CaseConsolidatedCorePeer::DYN_UID => 1, CaseConsolidatedCorePeer::REP_TAB_UID => 2, CaseConsolidatedCorePeer::CON_STATUS => 3, ),
BasePeer::TYPE_FIELDNAME => array ('TAS_UID' => 0, 'DYN_UID' => 1, 'REP_TAB_UID' => 2, 'CON_STATUS' => 3, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
);
@@ -80,8 +80,8 @@ abstract class BaseCaseConsolidatedPeer
*/
public static function getMapBuilder()
{
- include_once 'classes/model/map/CaseConsolidatedMapBuilder.php';
- return BasePeer::getMapBuilder('classes.model.map.CaseConsolidatedMapBuilder');
+ include_once 'classes/model/map/CaseConsolidatedCoreMapBuilder.php';
+ return BasePeer::getMapBuilder('classes.model.map.CaseConsolidatedCoreMapBuilder');
}
/**
* Gets a map (hash) of PHP names to DB column names.
@@ -94,7 +94,7 @@ abstract class BaseCaseConsolidatedPeer
public static function getPhpNameMap()
{
if (self::$phpNameMap === null) {
- $map = CaseConsolidatedPeer::getTableMap();
+ $map = CaseConsolidatedCorePeer::getTableMap();
$columns = $map->getColumns();
$nameMap = array();
foreach ($columns as $column) {
@@ -149,12 +149,12 @@ abstract class BaseCaseConsolidatedPeer
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
*
* @param string $alias The alias for the current table.
- * @param string $column The column name for current table. (i.e. CaseConsolidatedPeer::COLUMN_NAME).
+ * @param string $column The column name for current table. (i.e. CaseConsolidatedCorePeer::COLUMN_NAME).
* @return string
*/
public static function alias($alias, $column)
{
- return str_replace(CaseConsolidatedPeer::TABLE_NAME.'.', $alias.'.', $column);
+ return str_replace(CaseConsolidatedCorePeer::TABLE_NAME.'.', $alias.'.', $column);
}
/**
@@ -171,13 +171,13 @@ abstract class BaseCaseConsolidatedPeer
public static function addSelectColumns(Criteria $criteria)
{
- $criteria->addSelectColumn(CaseConsolidatedPeer::TAS_UID);
+ $criteria->addSelectColumn(CaseConsolidatedCorePeer::TAS_UID);
- $criteria->addSelectColumn(CaseConsolidatedPeer::DYN_UID);
+ $criteria->addSelectColumn(CaseConsolidatedCorePeer::DYN_UID);
- $criteria->addSelectColumn(CaseConsolidatedPeer::REP_TAB_UID);
+ $criteria->addSelectColumn(CaseConsolidatedCorePeer::REP_TAB_UID);
- $criteria->addSelectColumn(CaseConsolidatedPeer::CON_STATUS);
+ $criteria->addSelectColumn(CaseConsolidatedCorePeer::CON_STATUS);
}
@@ -200,9 +200,9 @@ abstract class BaseCaseConsolidatedPeer
// clear out anything that might confuse the ORDER BY clause
$criteria->clearSelectColumns()->clearOrderByColumns();
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
- $criteria->addSelectColumn(CaseConsolidatedPeer::COUNT_DISTINCT);
+ $criteria->addSelectColumn(CaseConsolidatedCorePeer::COUNT_DISTINCT);
} else {
- $criteria->addSelectColumn(CaseConsolidatedPeer::COUNT);
+ $criteria->addSelectColumn(CaseConsolidatedCorePeer::COUNT);
}
// just in case we're grouping: add those columns to the select statement
@@ -210,7 +210,7 @@ abstract class BaseCaseConsolidatedPeer
$criteria->addSelectColumn($column);
}
- $rs = CaseConsolidatedPeer::doSelectRS($criteria, $con);
+ $rs = CaseConsolidatedCorePeer::doSelectRS($criteria, $con);
if ($rs->next()) {
return $rs->getInt(1);
} else {
@@ -231,7 +231,7 @@ abstract class BaseCaseConsolidatedPeer
{
$critcopy = clone $criteria;
$critcopy->setLimit(1);
- $objects = CaseConsolidatedPeer::doSelect($critcopy, $con);
+ $objects = CaseConsolidatedCorePeer::doSelect($critcopy, $con);
if ($objects) {
return $objects[0];
}
@@ -248,7 +248,7 @@ abstract class BaseCaseConsolidatedPeer
*/
public static function doSelect(Criteria $criteria, $con = null)
{
- return CaseConsolidatedPeer::populateObjects(CaseConsolidatedPeer::doSelectRS($criteria, $con));
+ return CaseConsolidatedCorePeer::populateObjects(CaseConsolidatedCorePeer::doSelectRS($criteria, $con));
}
/**
* Prepares the Criteria object and uses the parent doSelect()
@@ -272,7 +272,7 @@ abstract class BaseCaseConsolidatedPeer
if (!$criteria->getSelectColumns()) {
$criteria = clone $criteria;
- CaseConsolidatedPeer::addSelectColumns($criteria);
+ CaseConsolidatedCorePeer::addSelectColumns($criteria);
}
// Set the correct dbName
@@ -294,7 +294,7 @@ abstract class BaseCaseConsolidatedPeer
$results = array();
// set the class once to avoid overhead in the loop
- $cls = CaseConsolidatedPeer::getOMClass();
+ $cls = CaseConsolidatedCorePeer::getOMClass();
$cls = Propel::import($cls);
// populate the object(s)
while ($rs->next()) {
@@ -329,7 +329,7 @@ abstract class BaseCaseConsolidatedPeer
*/
public static function getOMClass()
{
- return CaseConsolidatedPeer::CLASS_DEFAULT;
+ return CaseConsolidatedCorePeer::CLASS_DEFAULT;
}
/**
@@ -391,8 +391,8 @@ abstract class BaseCaseConsolidatedPeer
if ($values instanceof Criteria) {
$criteria = clone $values; // rename for clarity
- $comparison = $criteria->getComparison(CaseConsolidatedPeer::TAS_UID);
- $selectCriteria->add(CaseConsolidatedPeer::TAS_UID, $criteria->remove(CaseConsolidatedPeer::TAS_UID), $comparison);
+ $comparison = $criteria->getComparison(CaseConsolidatedCorePeer::TAS_UID);
+ $selectCriteria->add(CaseConsolidatedCorePeer::TAS_UID, $criteria->remove(CaseConsolidatedCorePeer::TAS_UID), $comparison);
} else {
$criteria = $values->buildCriteria(); // gets full criteria
@@ -420,7 +420,7 @@ abstract class BaseCaseConsolidatedPeer
// use transaction because $criteria could contain info
// for more than one table or we could emulating ON DELETE CASCADE, etc.
$con->begin();
- $affectedRows += BasePeer::doDeleteAll(CaseConsolidatedPeer::TABLE_NAME, $con);
+ $affectedRows += BasePeer::doDeleteAll(CaseConsolidatedCorePeer::TABLE_NAME, $con);
$con->commit();
return $affectedRows;
} catch (PropelException $e) {
@@ -444,7 +444,7 @@ abstract class BaseCaseConsolidatedPeer
public static function doDelete($values, $con = null)
{
if ($con === null) {
- $con = Propel::getConnection(CaseConsolidatedPeer::DATABASE_NAME);
+ $con = Propel::getConnection(CaseConsolidatedCorePeer::DATABASE_NAME);
}
if ($values instanceof Criteria) {
@@ -455,7 +455,7 @@ abstract class BaseCaseConsolidatedPeer
} else {
// it must be the primary key
$criteria = new Criteria(self::DATABASE_NAME);
- $criteria->add(CaseConsolidatedPeer::TAS_UID, (array) $values, Criteria::IN);
+ $criteria->add(CaseConsolidatedCorePeer::TAS_UID, (array) $values, Criteria::IN);
}
// Set the correct dbName
@@ -494,8 +494,8 @@ abstract class BaseCaseConsolidatedPeer
$columns = array();
if ($cols) {
- $dbMap = Propel::getDatabaseMap(CaseConsolidatedPeer::DATABASE_NAME);
- $tableMap = $dbMap->getTable(CaseConsolidatedPeer::TABLE_NAME);
+ $dbMap = Propel::getDatabaseMap(CaseConsolidatedCorePeer::DATABASE_NAME);
+ $tableMap = $dbMap->getTable(CaseConsolidatedCorePeer::TABLE_NAME);
if (! is_array($cols)) {
$cols = array($cols);
@@ -511,7 +511,7 @@ abstract class BaseCaseConsolidatedPeer
}
- return BasePeer::doValidate(CaseConsolidatedPeer::DATABASE_NAME, CaseConsolidatedPeer::TABLE_NAME, $columns);
+ return BasePeer::doValidate(CaseConsolidatedCorePeer::DATABASE_NAME, CaseConsolidatedCorePeer::TABLE_NAME, $columns);
}
/**
@@ -527,12 +527,12 @@ abstract class BaseCaseConsolidatedPeer
$con = Propel::getConnection(self::DATABASE_NAME);
}
- $criteria = new Criteria(CaseConsolidatedPeer::DATABASE_NAME);
+ $criteria = new Criteria(CaseConsolidatedCorePeer::DATABASE_NAME);
- $criteria->add(CaseConsolidatedPeer::TAS_UID, $pk);
+ $criteria->add(CaseConsolidatedCorePeer::TAS_UID, $pk);
- $v = CaseConsolidatedPeer::doSelect($criteria, $con);
+ $v = CaseConsolidatedCorePeer::doSelect($criteria, $con);
return !empty($v) > 0 ? $v[0] : null;
}
@@ -556,8 +556,8 @@ abstract class BaseCaseConsolidatedPeer
$objs = array();
} else {
$criteria = new Criteria();
- $criteria->add(CaseConsolidatedPeer::TAS_UID, $pks, Criteria::IN);
- $objs = CaseConsolidatedPeer::doSelect($criteria, $con);
+ $criteria->add(CaseConsolidatedCorePeer::TAS_UID, $pks, Criteria::IN);
+ $objs = CaseConsolidatedCorePeer::doSelect($criteria, $con);
}
return $objs;
}
@@ -569,14 +569,14 @@ if (Propel::isInit()) {
// the MapBuilder classes register themselves with Propel during initialization
// so we need to load them here.
try {
- BaseCaseConsolidatedPeer::getMapBuilder();
+ BaseCaseConsolidatedCorePeer::getMapBuilder();
} catch (Exception $e) {
Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
}
} else {
// even if Propel is not yet initialized, the map builder class can be registered
// now and then it will be loaded when Propel initializes.
- require_once 'classes/model/map/CaseConsolidatedMapBuilder.php';
- Propel::registerMapBuilder('classes.model.map.CaseConsolidatedMapBuilder');
+ require_once 'classes/model/map/CaseConsolidatedCoreMapBuilder.php';
+ Propel::registerMapBuilder('classes.model.map.CaseConsolidatedCoreMapBuilder');
}
diff --git a/workflow/engine/classes/model/om/BaseCaseScheduler.php b/workflow/engine/classes/model/om/BaseCaseScheduler.php
index 2b2e77b52..33d39aaf4 100755
--- a/workflow/engine/classes/model/om/BaseCaseScheduler.php
+++ b/workflow/engine/classes/model/om/BaseCaseScheduler.php
@@ -171,6 +171,12 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
*/
protected $sch_repeat_stop_if_running = 0;
+ /**
+ * The value for the sch_execution_date field.
+ * @var int
+ */
+ protected $sch_execution_date;
+
/**
* The value for the case_sh_plugin_uid field.
* @var string
@@ -560,6 +566,38 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
return $this->sch_repeat_stop_if_running;
}
+ /**
+ * Get the [optionally formatted] [sch_execution_date] column value.
+ *
+ * @param string $format The date/time format string (either date()-style or strftime()-style).
+ * If format is NULL, then the integer unix timestamp will be returned.
+ * @return mixed Formatted date/time value as string or integer unix timestamp (if format is NULL).
+ * @throws PropelException - if unable to convert the date/time to timestamp.
+ */
+ public function getSchExecutionDate($format = 'Y-m-d H:i:s')
+ {
+
+ if ($this->sch_execution_date === null || $this->sch_execution_date === '') {
+ return null;
+ } elseif (!is_int($this->sch_execution_date)) {
+ // a non-timestamp value was set externally, so we convert it
+ $ts = strtotime($this->sch_execution_date);
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse value of [sch_execution_date] as date/time value: " .
+ var_export($this->sch_execution_date, true));
+ }
+ } else {
+ $ts = $this->sch_execution_date;
+ }
+ if ($format === null) {
+ return $ts;
+ } elseif (strpos($format, '%') !== false) {
+ return strftime($format, $ts);
+ } else {
+ return date($format, $ts);
+ }
+ }
+
/**
* Get the [case_sh_plugin_uid] column value.
*
@@ -1134,6 +1172,35 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
} // setSchRepeatStopIfRunning()
+ /**
+ * Set the value of [sch_execution_date] column.
+ *
+ * @param int $v new value
+ * @return void
+ */
+ public function setSchExecutionDate($v)
+ {
+
+ if ($v !== null && !is_int($v)) {
+ $ts = strtotime($v);
+ //Date/time accepts null values
+ if ($v == '') {
+ $ts = null;
+ }
+ if ($ts === -1 || $ts === false) {
+ throw new PropelException("Unable to parse date/time value for [sch_execution_date] from input: " .
+ var_export($v, true));
+ }
+ } else {
+ $ts = $v;
+ }
+ if ($this->sch_execution_date !== $ts) {
+ $this->sch_execution_date = $ts;
+ $this->modifiedColumns[] = CaseSchedulerPeer::SCH_EXECUTION_DATE;
+ }
+
+ } // setSchExecutionDate()
+
/**
* Set the value of [case_sh_plugin_uid] column.
*
@@ -1221,14 +1288,16 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
$this->sch_repeat_stop_if_running = $rs->getInt($startcol + 23);
- $this->case_sh_plugin_uid = $rs->getString($startcol + 24);
+ $this->sch_execution_date = $rs->getTimestamp($startcol + 24, null);
+
+ $this->case_sh_plugin_uid = $rs->getString($startcol + 25);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
- return $startcol + 25; // 25 = CaseSchedulerPeer::NUM_COLUMNS - CaseSchedulerPeer::NUM_LAZY_LOAD_COLUMNS).
+ return $startcol + 26; // 26 = CaseSchedulerPeer::NUM_COLUMNS - CaseSchedulerPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating CaseScheduler object", $e);
@@ -1505,6 +1574,9 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
return $this->getSchRepeatStopIfRunning();
break;
case 24:
+ return $this->getSchExecutionDate();
+ break;
+ case 25:
return $this->getCaseShPluginUid();
break;
default:
@@ -1551,7 +1623,8 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
$keys[21] => $this->getSchRepeatEvery(),
$keys[22] => $this->getSchRepeatUntil(),
$keys[23] => $this->getSchRepeatStopIfRunning(),
- $keys[24] => $this->getCaseShPluginUid(),
+ $keys[24] => $this->getSchExecutionDate(),
+ $keys[25] => $this->getCaseShPluginUid(),
);
return $result;
}
@@ -1656,6 +1729,9 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
$this->setSchRepeatStopIfRunning($value);
break;
case 24:
+ $this->setSchExecutionDate($value);
+ break;
+ case 25:
$this->setCaseShPluginUid($value);
break;
} // switch()
@@ -1778,7 +1854,11 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
}
if (array_key_exists($keys[24], $arr)) {
- $this->setCaseShPluginUid($arr[$keys[24]]);
+ $this->setSchExecutionDate($arr[$keys[24]]);
+ }
+
+ if (array_key_exists($keys[25], $arr)) {
+ $this->setCaseShPluginUid($arr[$keys[25]]);
}
}
@@ -1888,6 +1968,10 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
$criteria->add(CaseSchedulerPeer::SCH_REPEAT_STOP_IF_RUNNING, $this->sch_repeat_stop_if_running);
}
+ if ($this->isColumnModified(CaseSchedulerPeer::SCH_EXECUTION_DATE)) {
+ $criteria->add(CaseSchedulerPeer::SCH_EXECUTION_DATE, $this->sch_execution_date);
+ }
+
if ($this->isColumnModified(CaseSchedulerPeer::CASE_SH_PLUGIN_UID)) {
$criteria->add(CaseSchedulerPeer::CASE_SH_PLUGIN_UID, $this->case_sh_plugin_uid);
}
@@ -1992,6 +2076,8 @@ abstract class BaseCaseScheduler extends BaseObject implements Persistent
$copyObj->setSchRepeatStopIfRunning($this->sch_repeat_stop_if_running);
+ $copyObj->setSchExecutionDate($this->sch_execution_date);
+
$copyObj->setCaseShPluginUid($this->case_sh_plugin_uid);
diff --git a/workflow/engine/classes/model/om/BaseCaseSchedulerPeer.php b/workflow/engine/classes/model/om/BaseCaseSchedulerPeer.php
index 721e92bce..d943d007d 100755
--- a/workflow/engine/classes/model/om/BaseCaseSchedulerPeer.php
+++ b/workflow/engine/classes/model/om/BaseCaseSchedulerPeer.php
@@ -25,7 +25,7 @@ abstract class BaseCaseSchedulerPeer
const CLASS_DEFAULT = 'classes.model.CaseScheduler';
/** The total number of columns. */
- const NUM_COLUMNS = 25;
+ const NUM_COLUMNS = 26;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -103,6 +103,9 @@ abstract class BaseCaseSchedulerPeer
/** the column name for the SCH_REPEAT_STOP_IF_RUNNING field */
const SCH_REPEAT_STOP_IF_RUNNING = 'CASE_SCHEDULER.SCH_REPEAT_STOP_IF_RUNNING';
+ /** the column name for the SCH_EXECUTION_DATE field */
+ const SCH_EXECUTION_DATE = 'CASE_SCHEDULER.SCH_EXECUTION_DATE';
+
/** the column name for the CASE_SH_PLUGIN_UID field */
const CASE_SH_PLUGIN_UID = 'CASE_SCHEDULER.CASE_SH_PLUGIN_UID';
@@ -117,10 +120,10 @@ abstract class BaseCaseSchedulerPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
- BasePeer::TYPE_PHPNAME => array ('SchUid', 'SchDelUserName', 'SchDelUserPass', 'SchDelUserUid', 'SchName', 'ProUid', 'TasUid', 'SchTimeNextRun', 'SchLastRunTime', 'SchState', 'SchLastState', 'UsrUid', 'SchOption', 'SchStartTime', 'SchStartDate', 'SchDaysPerformTask', 'SchEveryDays', 'SchWeekDays', 'SchStartDay', 'SchMonths', 'SchEndDate', 'SchRepeatEvery', 'SchRepeatUntil', 'SchRepeatStopIfRunning', 'CaseShPluginUid', ),
- BasePeer::TYPE_COLNAME => array (CaseSchedulerPeer::SCH_UID, CaseSchedulerPeer::SCH_DEL_USER_NAME, CaseSchedulerPeer::SCH_DEL_USER_PASS, CaseSchedulerPeer::SCH_DEL_USER_UID, CaseSchedulerPeer::SCH_NAME, CaseSchedulerPeer::PRO_UID, CaseSchedulerPeer::TAS_UID, CaseSchedulerPeer::SCH_TIME_NEXT_RUN, CaseSchedulerPeer::SCH_LAST_RUN_TIME, CaseSchedulerPeer::SCH_STATE, CaseSchedulerPeer::SCH_LAST_STATE, CaseSchedulerPeer::USR_UID, CaseSchedulerPeer::SCH_OPTION, CaseSchedulerPeer::SCH_START_TIME, CaseSchedulerPeer::SCH_START_DATE, CaseSchedulerPeer::SCH_DAYS_PERFORM_TASK, CaseSchedulerPeer::SCH_EVERY_DAYS, CaseSchedulerPeer::SCH_WEEK_DAYS, CaseSchedulerPeer::SCH_START_DAY, CaseSchedulerPeer::SCH_MONTHS, CaseSchedulerPeer::SCH_END_DATE, CaseSchedulerPeer::SCH_REPEAT_EVERY, CaseSchedulerPeer::SCH_REPEAT_UNTIL, CaseSchedulerPeer::SCH_REPEAT_STOP_IF_RUNNING, CaseSchedulerPeer::CASE_SH_PLUGIN_UID, ),
- BasePeer::TYPE_FIELDNAME => array ('SCH_UID', 'SCH_DEL_USER_NAME', 'SCH_DEL_USER_PASS', 'SCH_DEL_USER_UID', 'SCH_NAME', 'PRO_UID', 'TAS_UID', 'SCH_TIME_NEXT_RUN', 'SCH_LAST_RUN_TIME', 'SCH_STATE', 'SCH_LAST_STATE', 'USR_UID', 'SCH_OPTION', 'SCH_START_TIME', 'SCH_START_DATE', 'SCH_DAYS_PERFORM_TASK', 'SCH_EVERY_DAYS', 'SCH_WEEK_DAYS', 'SCH_START_DAY', 'SCH_MONTHS', 'SCH_END_DATE', 'SCH_REPEAT_EVERY', 'SCH_REPEAT_UNTIL', 'SCH_REPEAT_STOP_IF_RUNNING', 'CASE_SH_PLUGIN_UID', ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, )
+ BasePeer::TYPE_PHPNAME => array ('SchUid', 'SchDelUserName', 'SchDelUserPass', 'SchDelUserUid', 'SchName', 'ProUid', 'TasUid', 'SchTimeNextRun', 'SchLastRunTime', 'SchState', 'SchLastState', 'UsrUid', 'SchOption', 'SchStartTime', 'SchStartDate', 'SchDaysPerformTask', 'SchEveryDays', 'SchWeekDays', 'SchStartDay', 'SchMonths', 'SchEndDate', 'SchRepeatEvery', 'SchRepeatUntil', 'SchRepeatStopIfRunning', 'SchExecutionDate', 'CaseShPluginUid', ),
+ BasePeer::TYPE_COLNAME => array (CaseSchedulerPeer::SCH_UID, CaseSchedulerPeer::SCH_DEL_USER_NAME, CaseSchedulerPeer::SCH_DEL_USER_PASS, CaseSchedulerPeer::SCH_DEL_USER_UID, CaseSchedulerPeer::SCH_NAME, CaseSchedulerPeer::PRO_UID, CaseSchedulerPeer::TAS_UID, CaseSchedulerPeer::SCH_TIME_NEXT_RUN, CaseSchedulerPeer::SCH_LAST_RUN_TIME, CaseSchedulerPeer::SCH_STATE, CaseSchedulerPeer::SCH_LAST_STATE, CaseSchedulerPeer::USR_UID, CaseSchedulerPeer::SCH_OPTION, CaseSchedulerPeer::SCH_START_TIME, CaseSchedulerPeer::SCH_START_DATE, CaseSchedulerPeer::SCH_DAYS_PERFORM_TASK, CaseSchedulerPeer::SCH_EVERY_DAYS, CaseSchedulerPeer::SCH_WEEK_DAYS, CaseSchedulerPeer::SCH_START_DAY, CaseSchedulerPeer::SCH_MONTHS, CaseSchedulerPeer::SCH_END_DATE, CaseSchedulerPeer::SCH_REPEAT_EVERY, CaseSchedulerPeer::SCH_REPEAT_UNTIL, CaseSchedulerPeer::SCH_REPEAT_STOP_IF_RUNNING, CaseSchedulerPeer::SCH_EXECUTION_DATE, CaseSchedulerPeer::CASE_SH_PLUGIN_UID, ),
+ BasePeer::TYPE_FIELDNAME => array ('SCH_UID', 'SCH_DEL_USER_NAME', 'SCH_DEL_USER_PASS', 'SCH_DEL_USER_UID', 'SCH_NAME', 'PRO_UID', 'TAS_UID', 'SCH_TIME_NEXT_RUN', 'SCH_LAST_RUN_TIME', 'SCH_STATE', 'SCH_LAST_STATE', 'USR_UID', 'SCH_OPTION', 'SCH_START_TIME', 'SCH_START_DATE', 'SCH_DAYS_PERFORM_TASK', 'SCH_EVERY_DAYS', 'SCH_WEEK_DAYS', 'SCH_START_DAY', 'SCH_MONTHS', 'SCH_END_DATE', 'SCH_REPEAT_EVERY', 'SCH_REPEAT_UNTIL', 'SCH_REPEAT_STOP_IF_RUNNING', 'SCH_EXECUTION_DATE', 'CASE_SH_PLUGIN_UID', ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, )
);
/**
@@ -130,10 +133,10 @@ abstract class BaseCaseSchedulerPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
- BasePeer::TYPE_PHPNAME => array ('SchUid' => 0, 'SchDelUserName' => 1, 'SchDelUserPass' => 2, 'SchDelUserUid' => 3, 'SchName' => 4, 'ProUid' => 5, 'TasUid' => 6, 'SchTimeNextRun' => 7, 'SchLastRunTime' => 8, 'SchState' => 9, 'SchLastState' => 10, 'UsrUid' => 11, 'SchOption' => 12, 'SchStartTime' => 13, 'SchStartDate' => 14, 'SchDaysPerformTask' => 15, 'SchEveryDays' => 16, 'SchWeekDays' => 17, 'SchStartDay' => 18, 'SchMonths' => 19, 'SchEndDate' => 20, 'SchRepeatEvery' => 21, 'SchRepeatUntil' => 22, 'SchRepeatStopIfRunning' => 23, 'CaseShPluginUid' => 24, ),
- BasePeer::TYPE_COLNAME => array (CaseSchedulerPeer::SCH_UID => 0, CaseSchedulerPeer::SCH_DEL_USER_NAME => 1, CaseSchedulerPeer::SCH_DEL_USER_PASS => 2, CaseSchedulerPeer::SCH_DEL_USER_UID => 3, CaseSchedulerPeer::SCH_NAME => 4, CaseSchedulerPeer::PRO_UID => 5, CaseSchedulerPeer::TAS_UID => 6, CaseSchedulerPeer::SCH_TIME_NEXT_RUN => 7, CaseSchedulerPeer::SCH_LAST_RUN_TIME => 8, CaseSchedulerPeer::SCH_STATE => 9, CaseSchedulerPeer::SCH_LAST_STATE => 10, CaseSchedulerPeer::USR_UID => 11, CaseSchedulerPeer::SCH_OPTION => 12, CaseSchedulerPeer::SCH_START_TIME => 13, CaseSchedulerPeer::SCH_START_DATE => 14, CaseSchedulerPeer::SCH_DAYS_PERFORM_TASK => 15, CaseSchedulerPeer::SCH_EVERY_DAYS => 16, CaseSchedulerPeer::SCH_WEEK_DAYS => 17, CaseSchedulerPeer::SCH_START_DAY => 18, CaseSchedulerPeer::SCH_MONTHS => 19, CaseSchedulerPeer::SCH_END_DATE => 20, CaseSchedulerPeer::SCH_REPEAT_EVERY => 21, CaseSchedulerPeer::SCH_REPEAT_UNTIL => 22, CaseSchedulerPeer::SCH_REPEAT_STOP_IF_RUNNING => 23, CaseSchedulerPeer::CASE_SH_PLUGIN_UID => 24, ),
- BasePeer::TYPE_FIELDNAME => array ('SCH_UID' => 0, 'SCH_DEL_USER_NAME' => 1, 'SCH_DEL_USER_PASS' => 2, 'SCH_DEL_USER_UID' => 3, 'SCH_NAME' => 4, 'PRO_UID' => 5, 'TAS_UID' => 6, 'SCH_TIME_NEXT_RUN' => 7, 'SCH_LAST_RUN_TIME' => 8, 'SCH_STATE' => 9, 'SCH_LAST_STATE' => 10, 'USR_UID' => 11, 'SCH_OPTION' => 12, 'SCH_START_TIME' => 13, 'SCH_START_DATE' => 14, 'SCH_DAYS_PERFORM_TASK' => 15, 'SCH_EVERY_DAYS' => 16, 'SCH_WEEK_DAYS' => 17, 'SCH_START_DAY' => 18, 'SCH_MONTHS' => 19, 'SCH_END_DATE' => 20, 'SCH_REPEAT_EVERY' => 21, 'SCH_REPEAT_UNTIL' => 22, 'SCH_REPEAT_STOP_IF_RUNNING' => 23, 'CASE_SH_PLUGIN_UID' => 24, ),
- BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, )
+ BasePeer::TYPE_PHPNAME => array ('SchUid' => 0, 'SchDelUserName' => 1, 'SchDelUserPass' => 2, 'SchDelUserUid' => 3, 'SchName' => 4, 'ProUid' => 5, 'TasUid' => 6, 'SchTimeNextRun' => 7, 'SchLastRunTime' => 8, 'SchState' => 9, 'SchLastState' => 10, 'UsrUid' => 11, 'SchOption' => 12, 'SchStartTime' => 13, 'SchStartDate' => 14, 'SchDaysPerformTask' => 15, 'SchEveryDays' => 16, 'SchWeekDays' => 17, 'SchStartDay' => 18, 'SchMonths' => 19, 'SchEndDate' => 20, 'SchRepeatEvery' => 21, 'SchRepeatUntil' => 22, 'SchRepeatStopIfRunning' => 23, 'SchExecutionDate' => 24, 'CaseShPluginUid' => 25, ),
+ BasePeer::TYPE_COLNAME => array (CaseSchedulerPeer::SCH_UID => 0, CaseSchedulerPeer::SCH_DEL_USER_NAME => 1, CaseSchedulerPeer::SCH_DEL_USER_PASS => 2, CaseSchedulerPeer::SCH_DEL_USER_UID => 3, CaseSchedulerPeer::SCH_NAME => 4, CaseSchedulerPeer::PRO_UID => 5, CaseSchedulerPeer::TAS_UID => 6, CaseSchedulerPeer::SCH_TIME_NEXT_RUN => 7, CaseSchedulerPeer::SCH_LAST_RUN_TIME => 8, CaseSchedulerPeer::SCH_STATE => 9, CaseSchedulerPeer::SCH_LAST_STATE => 10, CaseSchedulerPeer::USR_UID => 11, CaseSchedulerPeer::SCH_OPTION => 12, CaseSchedulerPeer::SCH_START_TIME => 13, CaseSchedulerPeer::SCH_START_DATE => 14, CaseSchedulerPeer::SCH_DAYS_PERFORM_TASK => 15, CaseSchedulerPeer::SCH_EVERY_DAYS => 16, CaseSchedulerPeer::SCH_WEEK_DAYS => 17, CaseSchedulerPeer::SCH_START_DAY => 18, CaseSchedulerPeer::SCH_MONTHS => 19, CaseSchedulerPeer::SCH_END_DATE => 20, CaseSchedulerPeer::SCH_REPEAT_EVERY => 21, CaseSchedulerPeer::SCH_REPEAT_UNTIL => 22, CaseSchedulerPeer::SCH_REPEAT_STOP_IF_RUNNING => 23, CaseSchedulerPeer::SCH_EXECUTION_DATE => 24, CaseSchedulerPeer::CASE_SH_PLUGIN_UID => 25, ),
+ BasePeer::TYPE_FIELDNAME => array ('SCH_UID' => 0, 'SCH_DEL_USER_NAME' => 1, 'SCH_DEL_USER_PASS' => 2, 'SCH_DEL_USER_UID' => 3, 'SCH_NAME' => 4, 'PRO_UID' => 5, 'TAS_UID' => 6, 'SCH_TIME_NEXT_RUN' => 7, 'SCH_LAST_RUN_TIME' => 8, 'SCH_STATE' => 9, 'SCH_LAST_STATE' => 10, 'USR_UID' => 11, 'SCH_OPTION' => 12, 'SCH_START_TIME' => 13, 'SCH_START_DATE' => 14, 'SCH_DAYS_PERFORM_TASK' => 15, 'SCH_EVERY_DAYS' => 16, 'SCH_WEEK_DAYS' => 17, 'SCH_START_DAY' => 18, 'SCH_MONTHS' => 19, 'SCH_END_DATE' => 20, 'SCH_REPEAT_EVERY' => 21, 'SCH_REPEAT_UNTIL' => 22, 'SCH_REPEAT_STOP_IF_RUNNING' => 23, 'SCH_EXECUTION_DATE' => 24, 'CASE_SH_PLUGIN_UID' => 25, ),
+ BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, )
);
/**
@@ -282,6 +285,8 @@ abstract class BaseCaseSchedulerPeer
$criteria->addSelectColumn(CaseSchedulerPeer::SCH_REPEAT_STOP_IF_RUNNING);
+ $criteria->addSelectColumn(CaseSchedulerPeer::SCH_EXECUTION_DATE);
+
$criteria->addSelectColumn(CaseSchedulerPeer::CASE_SH_PLUGIN_UID);
}
diff --git a/workflow/engine/config/schema.xml b/workflow/engine/config/schema.xml
index 8a931e399..21ee5cd01 100755
--- a/workflow/engine/config/schema.xml
+++ b/workflow/engine/config/schema.xml
@@ -1,5057 +1,5052 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-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
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/workflow/engine/controllers/pmTablesProxy.php b/workflow/engine/controllers/pmTablesProxy.php
index 988d4b04a..577daadab 100755
--- a/workflow/engine/controllers/pmTablesProxy.php
+++ b/workflow/engine/controllers/pmTablesProxy.php
@@ -116,7 +116,7 @@ class pmTablesProxy extends HttpProxyController
G::LoadClass( 'dbConnections' );
$proUid = $_POST['PRO_UID'];
$dbConn = new DbConnections();
- $dbConnections = $dbConn->getConnectionsProUid( $proUid );
+ $dbConnections = $dbConn->getConnectionsProUid( $proUid, array('mysql') );
$workSpace = new workspaceTools(SYS_SYS);
$workspaceDB = $workSpace->getDBInfo();
@@ -1713,22 +1713,28 @@ class pmTablesProxy extends HttpProxyController
$oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_UID);
$oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_NAME);
$oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_FIELD_TYPE);
+ $oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_SQL);
+ $oCriteria->addSelectColumn(ProcessVariablesPeer::VAR_ACCEPTED_VALUES);
$oCriteria->add(ProcessVariablesPeer::PRJ_UID, $row["PRJ_UID"]);
$oDataset = ProcessVariablesPeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$index = 0;
while ($oDataset->next()) {
$row = $oDataset->getRow();
- $fieldType = isset($row["VAR_FIELD_TYPE"]) ? $row["VAR_FIELD_TYPE"]: '';
- if(! in_array( $fieldType, $excludeFieldsList )){
- array_push($fields, array(
- "FIELD_UID" => $row["VAR_NAME"] . "-" . $row["VAR_FIELD_TYPE"],
- "FIELD_NAME" => $row["VAR_NAME"],
- "FIELD_VALIDATE" => "any",
- "_index" => $index ++,
- "_isset" => true
- ));
- }
+ $fieldType = isset($row["VAR_FIELD_TYPE"]) ? $row["VAR_FIELD_TYPE"]: '';
+ $varSql = isset($row["VAR_SQL"]) ? $row["VAR_SQL"] : '';
+ $varProcessVariable = isset($row["VAR_ACCEPTED_VALUES"]) ? $row["VAR_ACCEPTED_VALUES"] : '[]';
+ if(! in_array( $fieldType, $excludeFieldsList )){
+ if(strlen($varSql) == 0 && $varProcessVariable == '[]'){
+ array_push($fields, array(
+ "FIELD_UID" => $row["VAR_NAME"] . "-" . $row["VAR_FIELD_TYPE"],
+ "FIELD_NAME" => $row["VAR_NAME"],
+ "FIELD_VALIDATE" => "any",
+ "_index" => $index ++,
+ "_isset" => true
+ ));
+ }
+ }
}
}
diff --git a/workflow/engine/data/mssql/schema.sql b/workflow/engine/data/mssql/schema.sql
index ae8cd4aba..71919ff23 100755
--- a/workflow/engine/data/mssql/schema.sql
+++ b/workflow/engine/data/mssql/schema.sql
@@ -2805,11 +2805,12 @@ CREATE TABLE [CASE_SCHEDULER]
[SCH_EVERY_DAYS] TINYINT default 0 NULL,
[SCH_WEEK_DAYS] CHAR(14) default '0|0|0|0|0|0|0' NOT NULL,
[SCH_START_DAY] CHAR(6) default '' NOT NULL,
- [SCH_MONTHS] CHAR(24) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL,
+ [SCH_MONTHS] CHAR(27) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL,
[SCH_END_DATE] CHAR(19) NULL,
[SCH_REPEAT_EVERY] VARCHAR(15) default '' NOT NULL,
[SCH_REPEAT_UNTIL] VARCHAR(15) default '' NOT NULL,
[SCH_REPEAT_STOP_IF_RUNNING] TINYINT default 0 NULL,
+ [SCH_EXECUTION_DATE] CHAR(19) NULL,
[CASE_SH_PLUGIN_UID] VARCHAR(100) NULL,
CONSTRAINT CASE_SCHEDULER_PK PRIMARY KEY ([SCH_UID])
);
diff --git a/workflow/engine/data/mysql/schema.sql b/workflow/engine/data/mysql/schema.sql
index fe2d7763d..f54fdb02c 100755
--- a/workflow/engine/data/mysql/schema.sql
+++ b/workflow/engine/data/mysql/schema.sql
@@ -1331,11 +1331,12 @@ CREATE TABLE `CASE_SCHEDULER`
`SCH_EVERY_DAYS` TINYINT default 0,
`SCH_WEEK_DAYS` CHAR(14) default '0|0|0|0|0|0|0' NOT NULL,
`SCH_START_DAY` CHAR(6) default '' NOT NULL,
- `SCH_MONTHS` CHAR(24) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL,
+ `SCH_MONTHS` CHAR(27) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL,
`SCH_END_DATE` DATETIME,
`SCH_REPEAT_EVERY` VARCHAR(15) default '' NOT NULL,
`SCH_REPEAT_UNTIL` VARCHAR(15) default '' NOT NULL,
`SCH_REPEAT_STOP_IF_RUNNING` TINYINT default 0,
+ `SCH_EXECUTION_DATE` DATETIME,
`CASE_SH_PLUGIN_UID` VARCHAR(100),
PRIMARY KEY (`SCH_UID`)
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Conditions store to show or hide dynaform fields..';
@@ -2829,3 +2830,4 @@ CREATE TABLE `CATALOG`
)ENGINE=InnoDB DEFAULT CHARSET='utf8' COMMENT='Definitions catalog.';
# This restores the fkey checks, after having unset them earlier
SET FOREIGN_KEY_CHECKS = 1;
+
diff --git a/workflow/engine/data/oracle/schema.sql b/workflow/engine/data/oracle/schema.sql
index b45cbc85a..5102ed654 100755
--- a/workflow/engine/data/oracle/schema.sql
+++ b/workflow/engine/data/oracle/schema.sql
@@ -1601,11 +1601,12 @@ CREATE TABLE "CASE_SCHEDULER"
"SCH_EVERY_DAYS" NUMBER(3,0) default 0,
"SCH_WEEK_DAYS" CHAR(14) default '0|0|0|0|0|0|0' NOT NULL,
"SCH_START_DAY" CHAR(6) default '' NOT NULL,
- "SCH_MONTHS" CHAR(24) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL,
+ "SCH_MONTHS" CHAR(27) default '0|0|0|0|0|0|0|0|0|0|0|0' NOT NULL,
"SCH_END_DATE" DATE,
"SCH_REPEAT_EVERY" VARCHAR2(15) default '' NOT NULL,
"SCH_REPEAT_UNTIL" VARCHAR2(15) default '' NOT NULL,
"SCH_REPEAT_STOP_IF_RUNNING" NUMBER(3,0) default 0,
+ "SCH_EXECUTION_DATE" DATE,
"CASE_SH_PLUGIN_UID" VARCHAR2(100)
);
diff --git a/workflow/engine/menus/cases.php b/workflow/engine/menus/cases.php
index 4445714e4..2ebf51b92 100755
--- a/workflow/engine/menus/cases.php
+++ b/workflow/engine/menus/cases.php
@@ -99,5 +99,4 @@ if (count($dashBoardPages)>0) {
ucwords(strtolower($tabName)), '');
}
}
-}
-
+}
\ No newline at end of file
diff --git a/workflow/engine/methods/cases/casesConsolidatedListExtJs.php b/workflow/engine/methods/cases/casesConsolidatedListExtJs.php
index 9ce405b42..2861f4f95 100644
--- a/workflow/engine/methods/cases/casesConsolidatedListExtJs.php
+++ b/workflow/engine/methods/cases/casesConsolidatedListExtJs.php
@@ -105,16 +105,31 @@ while ($rsSql->next()) {
$grdTitle = htmlentities($proTitle . " / " . $tabTitle, ENT_QUOTES, "UTF-8");
$tabTitle = htmlentities(substr($proTitle, 0, 25) . ((strlen($proTitle) > 25)? "..." : null) . " / " . $tabTitle, ENT_QUOTES, "UTF-8");
- $arrayTabItem[] = "
- {
- title: \"$tabTitle\",
- listeners: {
- activate: function ()
- {
- generateGrid(\"$processUid\", \"$taskUid\", \"$dynaformUid\");
+ $oProcess = new Process();
+ $isBpmn = $oProcess->isBpmnProcess($processUid);
+ if($isBpmn){
+ $arrayTabItem[] = "
+ {
+ title: \"$tabTitle\",
+ listeners: {
+ activate: function ()
+ {
+ generateGrid(\"$processUid\", \"$taskUid\", \"$dynaformUid\");
+ }
}
- }
- }";
+ }";
+ }else{
+ $arrayTabItem[] = "
+ {
+ title: \"$tabTitle\",
+ listeners: {
+ activate: function ()
+ {
+ generateGridClassic(\"$processUid\", \"$taskUid\", \"$dynaformUid\");
+ }
+ }
+ }";
+ }
}
if (count($arrayTabItem) > 0) {
diff --git a/workflow/engine/methods/cases/proxyDataCombobox.php b/workflow/engine/methods/cases/proxyDataCombobox.php
new file mode 100755
index 000000000..4d086afc9
--- /dev/null
+++ b/workflow/engine/methods/cases/proxyDataCombobox.php
@@ -0,0 +1,75 @@
+home = PATH_DYNAFORM;
+$G_FORM->parseFile($filename, SYS_LANG, true);
+
+G::LoadClass("case");
+G::LoadClass("pmFunctions");
+
+//Load the variables
+$oCase = new Cases();
+$sqlQuery = null;
+$array = array();
+$aFields = $oCase->loadCase($appUid);
+
+foreach ($G_FORM->fields as $key => $val) {
+ if ($fieldName == $val->name) {
+ if ($G_FORM->fields[$key]->sql != null) {
+ $sqlQuery = G::replaceDataField($G_FORM->fields[$key]->sql, $aFields ["APP_DATA"]);
+ }
+ //$coma = "";
+ //$data1 = "";
+ if (is_array($val->options)) {
+ foreach ($val->options as $key1 => $val1) {
+ $array[] = array("value" => $key1, "text" => $val1);
+ }
+ }
+ }
+}
+
+//echo ($sqlQuery);
+if ($sqlQuery != null) {
+ $aResult = executeQuery($sqlQuery);
+ //var_dump($aResult);
+ if ($aResult == "false" || $aResult == null) {
+ $aResult = array();
+ }
+} else {
+ $aResult = array();
+}
+//var_dump($aResult);
+$arrayTmp = array();
+foreach ($aResult as $field) {
+ $i = 0;
+
+ foreach ($field as $key => $value) {
+ if ($i == 0) {
+ $arrayTmp["value"] = $value;
+ if (count($field) == 1) {
+ $arrayTmp["text"]=$value;
+ }
+ }
+
+ if ($i == 1) {
+ $arrayTmp["text"] = $value;
+ }
+ $i++;
+ }
+ $array[] = $arrayTmp;
+}
+
+$response["records"] = $array;
+
+echo G::json_encode($response);
\ No newline at end of file
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/CaseScheduler.php b/workflow/engine/src/ProcessMaker/BusinessModel/CaseScheduler.php
index 193e4cf33..88dccc28f 100644
--- a/workflow/engine/src/ProcessMaker/BusinessModel/CaseScheduler.php
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/CaseScheduler.php
@@ -897,7 +897,6 @@ class CaseScheduler
$sDaysPerformTask = "";
$sWeeks = "";
$sMonths = "";
- $sStartDay = "";
switch ($option) {
case "INS":
@@ -992,7 +991,6 @@ class CaseScheduler
}
$arrayCaseSchedulerData["SCH_MONTHS"] = $sMonths;
- $sStartDay = $arrayCaseSchedulerData["SCH_START_DAY"];
$sValue = $nStartDay;
break;
}
@@ -1013,123 +1011,33 @@ class CaseScheduler
$arrayCaseSchedulerData["SCH_END_DATE"] = ($arrayData["SCH_END_DATE"] != "")? $arrayData["SCH_END_DATE"] : null;
//If the start date has changed then recalculate the next run time
- $recalculateDate = ($arrayData["SCH_START_DATE"] == $arrayData["PREV_SCH_START_DATE"])? false : true;
- $recalculateTime = (date("H:i:s", strtotime($arrayData["SCH_START_TIME"])) == date("H:i:s", strtotime($arrayData["PREV_SCH_START_TIME"])))? false : true;
+ $recalculateDate = ($arrayData["SCH_START_DATE"] != $arrayData["PREV_SCH_START_DATE"])? true : false;
+ $recalculateTime = (date("H:i:s", strtotime($arrayData["SCH_START_TIME"])) != date("H:i:s", strtotime($arrayData["PREV_SCH_START_TIME"])))? true : false;
break;
}
- $nActualTime = $arrayData["SCH_START_TIME"];
-
- if ($caseSchedulerOption != 1 && $caseSchedulerOption != 4 && $caseSchedulerOption != 5) {
- if ($sStartDay == "") {
- $sStartDay = date("Y-m-d");
- }
-
- $dCurrentDay = (int)(date("d"));
- $dCurrentMonth = (int)(date("m"));
-
- $aStartDay = ($caseSchedulerOption == 3)? explode("|", $arrayCaseSchedulerData["SCH_START_DAY"]) : array();
-
- if ($caseSchedulerOption == 3 && $aStartDay[0] == "1") {
- $monthsArray = explode("|", $sMonths);
-
- foreach ($monthsArray as $row) {
- switch ($option) {
- case "INS":
- if ((int)($row) == $dCurrentMonth && $dCurrentDay <= (int)($aStartDay[1])) {
- $startTime = $arrayData["SCH_START_TIME"] . ":00";
- $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = date("Y") . "-" . $row . "-" . $aStartDay[1] . " " . $startTime;
- break;
- } else {
- $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = $caseScheduler->updateNextRun($caseSchedulerOption, $sValue, $nActualTime, $sDaysPerformTask, $sWeeks, $sStartDay, $sMonths, $sDateTmp, false);
- }
- break;
- case "UPD":
- if ($dCurrentMonth == $row && $dCurrentDay < $aStartDay[1]) {
- $startTime = $arrayData["SCH_START_TIME"] . ":00";
-
- if ($recalculateDate) {
- $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = date("Y") . "-" . $row . "-" . $aStartDay[1] . " " . $startTime;
- } else {
- if ($recalculateTime) {
- $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = $caseScheduler->getSchTimeNextRun("Y-m-d") . " " . $arrayData["SCH_START_TIME"] . ":00";
- }
- }
- break;
- } else {
- if ($recalculateDate) {
- $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = $caseScheduler->updateNextRun($caseSchedulerOption, $sValue, $nActualTime, $sDaysPerformTask, $sWeeks, $sStartDay, $sMonths, $sDateTmp, false);
- } else {
- if ($recalculateTime) {
- $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = $caseScheduler->getSchTimeNextRun("Y-m-d") . " " . $arrayData["SCH_START_TIME"] . ":00";
- }
- }
- }
- break;
- }
- }
- } else {
- switch ($option) {
- case "INS":
- $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = $caseScheduler->updateNextRun($caseSchedulerOption, $sValue, $nActualTime, $sDaysPerformTask, $sWeeks, $sStartDay, $sMonths, $sDateTmp, false);
- break;
- case "UPD":
- if ($recalculateDate) {
- $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = $caseScheduler->updateNextRun($caseSchedulerOption, $sValue, $nActualTime, $sDaysPerformTask, $sWeeks, $sStartDay, $sMonths, $sDateTmp, false);
- } else {
- if ($recalculateTime) {
- $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = $caseScheduler->getSchTimeNextRun("Y-m-d") . " " . $arrayData["SCH_START_TIME"] . ":00";
- }
- }
- break;
- }
- }
- } else {
- if ($caseSchedulerOption == 4) {
- $arrayCaseSchedulerData["SCH_END_DATE"] = $arrayCaseSchedulerData["SCH_START_TIME"];
- }
-
- switch ($option) {
- case "INS":
- $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = $arrayCaseSchedulerData["SCH_START_TIME"];
- break;
- case "UPD":
- if ($recalculateDate) {
- $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = $arrayCaseSchedulerData["SCH_START_TIME"];
- } else {
- if ($recalculateTime) {
- $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = $caseScheduler->getSchTimeNextRun("Y-m-d") . " " . $arrayData["SCH_START_TIME"] . ":00";
- }
- }
- break;
- }
-
- if ($caseSchedulerOption == 5) {
+ switch ($caseSchedulerOption) {
+ case 4:
+ //$arrayCaseSchedulerData["SCH_END_DATE"] = $arrayCaseSchedulerData["SCH_START_TIME"];
+ break;
+ case 5:
switch ($option) {
case "INS":
$arrayCaseSchedulerData["SCH_START_TIME"] = time();
$arrayCaseSchedulerData["SCH_START_DATE"] = $arrayCaseSchedulerData["SCH_START_TIME"];
-
- $date = $arrayCaseSchedulerData["SCH_START_TIME"];
break;
case "UPD":
- $date = $caseScheduler->getSchLastRunTime();
-
- if (is_null($date)) {
- $date = $caseScheduler->getSchStartTime();
- }
-
- $date = strtotime($date);
break;
}
- $arrayCaseSchedulerData["SCH_REPEAT_EVERY"] = $arrayData["SCH_REPEAT_EVERY"];
- $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = date("Y-m-d H:i:s", $date + (((int)($arrayData["SCH_REPEAT_EVERY"])) * 60 * 60));
- }
+ $arrayCaseSchedulerData["SCH_REPEAT_EVERY"] = $arrayData["SCH_REPEAT_EVERY"];
+ break;
}
switch ($option) {
case "INS":
+ $arrayCaseSchedulerData["SCH_TIME_NEXT_RUN"] = date("Y-m-d") . " " . (($caseSchedulerOption != 5)? $arrayData["SCH_START_TIME"] . ":00" : date("H:i:s"));
+
if ($arrayData["SCH_END_DATE"] != "") {
$arrayCaseSchedulerData["SCH_END_DATE"] = $arrayData["SCH_END_DATE"];
}
@@ -1138,13 +1046,13 @@ class CaseScheduler
break;
}
- if (!empty($arrayData["SCH_REPEAT_TASK_CHK"])) {
- if ($arrayData["SCH_REPEAT_EVERY_OPT"] . "" == "2") {
- $arrayCaseSchedulerData["SCH_REPEAT_EVERY"] = ((int)($arrayData["SCH_REPEAT_EVERY"])) * 60;
- } else {
- $arrayCaseSchedulerData["SCH_REPEAT_EVERY"] = (int)($arrayData["SCH_REPEAT_EVERY"]);
- }
- }
+ //if (!empty($arrayData["SCH_REPEAT_TASK_CHK"])) {
+ // if ($arrayData["SCH_REPEAT_EVERY_OPT"] . "" == "2") {
+ // $arrayCaseSchedulerData["SCH_REPEAT_EVERY"] = ((int)($arrayData["SCH_REPEAT_EVERY"])) * 60;
+ // } else {
+ // $arrayCaseSchedulerData["SCH_REPEAT_EVERY"] = (int)($arrayData["SCH_REPEAT_EVERY"]);
+ // }
+ //}
//Create/Update
$caseSchedulerAux = new \CaseScheduler();
@@ -1193,11 +1101,11 @@ class CaseScheduler
break;
case 4:
//One time only
- $flagUpdateTimeNextRun = $arrayCaseSchedulerData["SCH_START_TIME"] != $arrayCaseSchedulerDataOld["SCH_START_TIME"];
+ $flagUpdateTimeNextRun = $recalculateTime || $arrayCaseSchedulerData["SCH_START_TIME"] != $arrayCaseSchedulerDataOld["SCH_START_TIME"];
break;
case 5:
//Every
- $flagUpdateTimeNextRun = $arrayCaseSchedulerData["SCH_REPEAT_EVERY"] != $arrayCaseSchedulerDataOld["SCH_REPEAT_EVERY"];
+ $flagUpdateTimeNextRun = $option == "INS" || $arrayCaseSchedulerData["SCH_REPEAT_EVERY"] != $arrayCaseSchedulerDataOld["SCH_REPEAT_EVERY"];
break;
}
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php b/workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php
index 8e590b361..41cf13800 100644
--- a/workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/Consolidated.php
@@ -7,7 +7,7 @@ use \Criteria;
use \ReportTablePeer;
use \ResultSet;
use \AppCacheViewPeer;
-use \CaseConsolidatedPeer;
+use \CaseConsolidatedCorePeer;
use \ContentPeer;
/**
@@ -29,21 +29,21 @@ class Consolidated
public function get ($tas_uid)
{
$criteria = new Criteria();
- $criteria->addSelectColumn(CaseConsolidatedPeer::DYN_UID);
+ $criteria->addSelectColumn(CaseConsolidatedCorePeer::DYN_UID);
$criteria->addSelectColumn(\ReportTablePeer::REP_TAB_NAME);
$criteria->addSelectColumn(\ReportTablePeer::REP_TAB_UID);
$criteria->addSelectColumn(ContentPeer::CON_VALUE);
- $criteria->addSelectColumn(CaseConsolidatedPeer::CON_STATUS);
+ $criteria->addSelectColumn(CaseConsolidatedCorePeer::CON_STATUS);
- $criteria->addJoin( CaseConsolidatedPeer::REP_TAB_UID, ReportTablePeer::REP_TAB_UID, Criteria::LEFT_JOIN );
- $criteria->addJoin( CaseConsolidatedPeer::REP_TAB_UID, ContentPeer::CON_ID, Criteria::LEFT_JOIN );
+ $criteria->addJoin( CaseConsolidatedCorePeer::REP_TAB_UID, ReportTablePeer::REP_TAB_UID, Criteria::LEFT_JOIN );
+ $criteria->addJoin( CaseConsolidatedCorePeer::REP_TAB_UID, ContentPeer::CON_ID, Criteria::LEFT_JOIN );
$criteria->add( ContentPeer::CON_CATEGORY, "REP_TAB_TITLE");
$criteria->add( ContentPeer::CON_LANG, SYS_LANG);
- $criteria->add( CaseConsolidatedPeer::TAS_UID, $tas_uid, Criteria::EQUAL );
- $criteria->add( CaseConsolidatedPeer::CON_STATUS, 'ACTIVE', Criteria::EQUAL );
+ $criteria->add( CaseConsolidatedCorePeer::TAS_UID, $tas_uid, Criteria::EQUAL );
+ $criteria->add( CaseConsolidatedCorePeer::CON_STATUS, 'ACTIVE', Criteria::EQUAL );
- $dataset = CaseConsolidatedPeer::doSelectRS($criteria);
+ $dataset = CaseConsolidatedCorePeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
if ($dataset->next()) {
$response = $dataset->getRow();
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Light.php b/workflow/engine/src/ProcessMaker/BusinessModel/Light.php
index e5a4421e0..1d0a43370 100644
--- a/workflow/engine/src/ProcessMaker/BusinessModel/Light.php
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/Light.php
@@ -90,6 +90,11 @@ class Light
return $response;
}
+ /**
+ * Get status trigger case
+ * @param $triggers
+ * @return array
+ */
public function statusTriggers($triggers)
{
$return = array("before" => false, "after"=> false);
@@ -1061,6 +1066,23 @@ class Light
$sysConf = \System::getSystemConfiguration( PATH_CONFIG . 'env.ini' );
$offset = timezone_offset_get( new \DateTimeZone( $sysConf['time_zone'] ), new \DateTime() );
$response['timeZone'] = sprintf( "GMT%s%02d:%02d", ( $offset >= 0 ) ? '+' : '-', abs( $offset / 3600 ), abs( ($offset % 3600) / 60 ) );
+ $fields = \System::getSysInfo();
+ $response['version'] = $fields['PM_VERSION'];
+
+ $Translations = new \Translation;
+ $translationsTable = $Translations->getTranslationEnvironments();
+ $languagesList = array ();
+
+ foreach ($translationsTable as $locale) {
+ $LANG_ID = $locale['LOCALE'];
+ if ($locale['COUNTRY'] != '.') {
+ $LANG_NAME = $locale['LANGUAGE'] . ' (' . (ucwords( strtolower( $locale['COUNTRY'] ) )) . ')';
+ } else {
+ $LANG_NAME = $locale['LANGUAGE'];
+ }
+ $languagesList[$LANG_ID] = $LANG_NAME;
+ }
+ $response['listLanguage'] = $languagesList;
return $response;
}
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Light/Tracker.php b/workflow/engine/src/ProcessMaker/BusinessModel/Light/Tracker.php
new file mode 100644
index 000000000..7d5b87eed
--- /dev/null
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/Light/Tracker.php
@@ -0,0 +1,347 @@
+verifyCaseTracker( $case, $pin );
+ switch ($uid) {
+ //The case doesn't exist
+ case - 1:
+ throw (new \Exception(\G::LoadTranslation('ID_CASE_NOT_EXISTS')));
+ break;
+ //The pin is invalid
+ case - 2:
+ throw (new \Exception(\G::LoadTranslation('ID_PIN_INVALID')));
+ break;
+ }
+ $response['process'] = $uid['PRO_UID'];
+ $response['app_uid'] = $uid['APP_UID'];
+ return $response;
+ }
+
+ /**
+ * Access granted for administrator in case tracker
+ *
+ * @param $pro_uid
+ * @param $status
+ * @return bool
+ */
+ public function permissions ($pro_uid, $status)
+ {
+ $cases = new \Cases();
+ $caseTracker = $cases->caseTrackerPermissions( $pro_uid );
+ switch ($status) {
+ case "map":
+ $return = $caseTracker['CT_MAP_TYPE'];
+ break;
+ case "messages":
+ $return = $caseTracker['CT_MESSAGE_HISTORY'];
+ break;
+ case "history":
+ $return = $caseTracker['CT_DERIVATION_HISTORY'];
+ break;
+ case "objects":
+ $return = $caseTracker['DYNADOC'];
+ break;
+ default:
+ $return = false;
+ break;
+ }
+ return $return;
+ }
+
+
+ public function history($idProcess, $appUid)
+ {
+ $oCase = new \Cases();
+ $aFields = $oCase->loadCase( $appUid );
+
+ $oProcess = new \Process();
+ $aProcessFieds = $oProcess->load( $idProcess );
+ $noShowTitle = 0;
+ if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
+ $noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
+ }
+
+ if (isset( $aFields['TITLE'] )) {
+ $aFields['APP_TITLE'] = $aFields['TITLE'];
+ }
+ if ($aFields['APP_PROC_CODE'] != '') {
+ $aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
+ }
+ $aFields['CASE'] = \G::LoadTranslation( 'ID_CASE' );
+ $aFields['TITLE'] = \G::LoadTranslation( 'ID_TITLE' );
+
+ $c = \Cases::getTransferHistoryCriteria( $appUid );
+ $dataset = \AppDelegationPeer::doSelectRS( $c );
+ $dataset->setFetchmode( \ResultSet::FETCHMODE_ASSOC );
+ $dataset->next();
+ $history = array();
+ while ($row = $dataset->getRow()) {
+ $history[] = $row;
+ $dataset->next();
+ }
+ $response = $this->parserHistory($history);
+ return $response;
+ }
+
+ public function parserHistory ($data)
+ {
+ $structure = array(
+ 'PRO_UID' => 'processId',
+ 'TAS_UID' => 'taskId',
+ 'APP_UID' => 'caseId',
+ 'user' => array(
+ 'USR_NAME' => 'name',
+ 'USR_FIRSTNAME' => 'firstName',
+ 'USR_LASTNAME' => 'lastName'
+ ),
+ 'DEL_DELEGATE_DATE' => 'delegateDate',
+ 'DEL_INDEX' => 'index',
+ 'DEL_INIT_DATE' => 'initDate',
+ 'APP_ENABLE_ACTION_DATE' => 'enableAction',
+ 'APP_DISABLE_ACTION_DATE' => 'disableAction',
+ 'TAS_TITLE' => 'taskTitle',
+ 'DEL_FINISH_DATE' => 'finishDate',
+ 'APP_TYPE' => 'type'
+ );
+
+ $response = $this->replaceFields($data, $structure);
+ return $response;
+ }
+
+ public function messages($idProcess, $appUid)
+ {
+ $oCase = new \Cases();
+ $aFields = $oCase->loadCase( $appUid );
+
+ $oProcess = new \Process();
+ $aProcessFieds = $oProcess->load( $idProcess );
+ $noShowTitle = 0;
+ if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
+ $noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
+ }
+
+ if (isset( $aFields['TITLE'] )) {
+ $aFields['APP_TITLE'] = $aFields['TITLE'];
+ }
+ if ($aFields['APP_PROC_CODE'] != '') {
+ $aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
+ }
+ $aFields['CASE'] = \G::LoadTranslation( 'ID_CASE' );
+ $aFields['TITLE'] = \G::LoadTranslation( 'ID_TITLE' );
+
+ $c = \Cases::getHistoryMessagesTracker( $appUid );
+ $response = array();
+ if ($c->getDbName() == 'dbarray') {
+ $rs = \ArrayBasePeer::doSelectRs( $c );
+ $rs->setFetchmode( \ResultSet::FETCHMODE_ASSOC );
+ $rs->next();
+ $messages = array();
+ while ($row = $rs->getRow()) {
+ $messages[] = $row;
+ $rs->next();
+ }
+ $response = $this->parserMessages($messages);
+ }
+
+ return $response;
+ }
+
+ public function parserMessages ($data)
+ {
+ $structure = array(
+ 'APP_UID' => 'caseId',
+ 'APP_MSG_UID' => 'messageId',
+ 'APP_MSG_TYPE' => 'messageType',
+ 'APP_MSG_SUBJECT' => 'messageSubject',
+ 'APP_MSG_FROM' => 'messageFrom',
+ 'APP_MSG_TO' => 'messageTo',
+ 'APP_MSG_BODY' => 'messageBody',
+ 'APP_MSG_DATE' => 'messageDate',
+ 'APP_MSG_CC' => 'messageCc',
+ 'APP_MSG_BCC' => 'messageBcc',
+ 'APP_MSG_TEMPLATE' => 'messageTemplate',
+ 'APP_MSG_STATUS' => 'messageStatus'
+ );
+
+ $response = $this->replaceFields($data, $structure);
+ return $response;
+ }
+
+ public function objects($idProcess, $appUid)
+ {
+ $oProcessMap = new \processMap();
+
+ $oCase = new \Cases();
+
+ $oProcess = new \Process();
+ $aProcessFieds = $oProcess->load( $idProcess );
+ $noShowTitle = 0;
+ if (isset( $aProcessFieds['PRO_SHOW_MESSAGE'] )) {
+ $noShowTitle = $aProcessFieds['PRO_SHOW_MESSAGE'];
+ }
+
+ $aFields = $oCase->loadCase( $appUid );
+ if (isset( $aFields['TITLE'] )) {
+ $aFields['APP_TITLE'] = $aFields['TITLE'];
+ }
+ if ($aFields['APP_PROC_CODE'] != '') {
+ $aFields['APP_NUMBER'] = $aFields['APP_PROC_CODE'];
+ }
+ $aFields['CASE'] = \G::LoadTranslation( 'ID_CASE' );
+ $aFields['TITLE'] = \G::LoadTranslation( 'ID_TITLE' );
+
+ $c = $oProcessMap->getCaseTrackerObjectsCriteria( $idProcess );
+ $response = array();
+ if ($c->getDbName() == 'dbarray') {
+ $rs = \ArrayBasePeer::doSelectRs( $c );
+ $rs->setFetchmode( \ResultSet::FETCHMODE_ASSOC );
+ $rs->next();
+ $objects = array();
+ while ($row = $rs->getRow()) {
+ $objects[] = $row;
+ $rs->next();
+ }
+ $response = $this->parserObjects($objects);
+ }
+ return $response;
+ }
+
+ public function parserObjects ($data)
+ {
+ $structure = array(
+ //'CTO_UID' => 'objectId',
+ 'CTO_TITLE' => 'objectTitle',
+ 'CTO_TYPE_OBJ' => 'objectType',
+ 'CTO_UID_OBJ' => 'objectId',
+ 'CTO_CONDITION' => 'condition',
+ 'CTO_POSITION' => 'position'
+ );
+
+ $response = $this->replaceFields($data, $structure);
+ return $response;
+ }
+
+ public function showObjects ($pro_uid, $app_uid, $obj_uid, $typeObject)
+ {
+ switch ($typeObject) {
+ case 'DYNAFORM':
+
+ $oCase = new \Cases();
+ $Fields = $oCase->loadCase( $app_uid );
+ $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PREVIOUS_STEP_LABEL'] = '';
+ $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP_LABEL'] = '';
+ $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_STEP'] = '#';
+ $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['NEXT_ACTION'] = 'alert("Sample"); return false;';
+ $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PRINT_PREVIEW'] = '#';
+ $Fields['APP_DATA']['__DYNAFORM_OPTIONS']['PRINT_PREVIEW_ACTION'] = 'tracker_PrintView?CTO_UID_OBJ=' . $obj_uid . '&CTO_TYPE_OBJ=PRINT_PREVIEW';
+
+ $dynaForm = new \Dynaform();
+ $arrayDynaFormData = $dynaForm->Load($obj_uid);
+
+ if (isset($arrayDynaFormData["DYN_VERSION"]) && $arrayDynaFormData["DYN_VERSION"] == 2) {
+ \G::LoadClass("pmDynaform");
+
+ $Fields["PRO_UID"] = $pro_uid;
+ $Fields["CURRENT_DYNAFORM"] = $obj_uid;
+
+ $pmDynaForm = new \pmDynaform($Fields);
+
+// if ($pmDynaForm->isResponsive()) {
+// $pmDynaForm->printTracker();
+// }
+ $response = $pmDynaForm;
+ }
+ break;
+ case 'INPUT_DOCUMENT':
+ //G::LoadClass( 'case' );
+ $oCase = new \Cases();
+ $c = $oCase->getAllUploadedDocumentsCriteriaTracker( $pro_uid, $app_uid, $obj_uid );
+
+// $response = array();
+ if ($c->getDbName() == 'dbarray') {
+ $rs = \ArrayBasePeer::doSelectRs( $c );
+ $rs->setFetchmode( \ResultSet::FETCHMODE_ASSOC );
+ $rs->next();
+ $doc = array();
+ while ($row = $rs->getRow()) {
+ $doc[] = $row;
+ $rs->next();
+ }
+ //$response = $this->parserObjects($objects);
+ }
+
+ $response = $doc;
+ break;
+
+ case 'OUTPUT_DOCUMENT':
+ //G::LoadClass( 'case' );
+ $oCase = new \Cases();
+ $c = $oCase->getAllGeneratedDocumentsCriteriaTracker( $pro_uid, $app_uid, $obj_uid );
+ $response = $c;
+ break;
+ }
+ return $response;
+ }
+
+ public function replaceFields ($data, $structure)
+ {
+ $response = array();
+ foreach ($data as $field => $d) {
+ if (is_array($d)) {
+ $newData = array();
+ foreach ($d as $field => $value) {
+ if (array_key_exists($field, $structure)) {
+ $newName = $structure[$field];
+ $newData[$newName] = is_null($value) ? "":$value;
+ } else {
+ foreach ($structure as $name => $str) {
+ if (is_array($str) && array_key_exists($field, $str)) {
+ $newName = $str[$field];
+ $newData[$name][$newName] = is_null($value) ? "":$value;
+ }
+ }
+ }
+ }
+ if (count($newData) > 0)
+ $response[] = $newData;
+ } else {
+ if (array_key_exists($field, $structure)) {
+ $newName = $structure[$field];
+ $response[$newName] = is_null($d) ? "":$d;
+ } else {
+ foreach ($structure as $name => $str) {
+ if (is_array($str) && array_key_exists($field, $str)) {
+ $newName = $str[$field];
+ $response[$name][$newName] = is_null($d) ? "":$d;
+ }
+ }
+ }
+ }
+
+ }
+ return $response;
+ }
+}
\ No newline at end of file
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Lists.php b/workflow/engine/src/ProcessMaker/BusinessModel/Lists.php
index b5a1eb92e..06bdad8d0 100644
--- a/workflow/engine/src/ProcessMaker/BusinessModel/Lists.php
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/Lists.php
@@ -226,12 +226,12 @@ class Lists {
$licensedFeatures = & \PMLicensedFeatures::getSingleton();
if ($licensedFeatures->verifyfeature('7TTeDBQeWRoZTZKYjh4eFpYUlRDUUEyVERPU3FxellWank=')) {
$criteria = new Criteria();
- $criteria->add(\CaseConsolidatedPeer::CON_STATUS, 'ACTIVE');
- $criteria->addJoin(\CaseConsolidatedPeer::TAS_UID, \AppCacheViewPeer::TAS_UID, Criteria::LEFT_JOIN);
+ $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 = \CaseConsolidatedPeer::doCount( $criteria );
+ $total = \CaseConsolidatedCorePeer::doCount( $criteria );
$response[] = array('count' => $total, 'item' => 'CONSOLIDATED_CASES');
}
/*----------------------------------********---------------------------------*/
diff --git a/workflow/engine/src/ProcessMaker/BusinessModel/Task.php b/workflow/engine/src/ProcessMaker/BusinessModel/Task.php
index 81bbe6cfe..e366e419f 100644
--- a/workflow/engine/src/ProcessMaker/BusinessModel/Task.php
+++ b/workflow/engine/src/ProcessMaker/BusinessModel/Task.php
@@ -155,7 +155,8 @@ class Task
"TAS_SELFSERVICE_TIMEOUT" => $arrayDataAux["TAS_SELFSERVICE_TIMEOUT"],
"TAS_SELFSERVICE_TIME" => $arrayDataAux["TAS_SELFSERVICE_TIME"],
"TAS_SELFSERVICE_TIME_UNIT" => $arrayDataAux["TAS_SELFSERVICE_TIME_UNIT"],
- "TAS_SELFSERVICE_TRIGGER_UID" => $arrayDataAux["TAS_SELFSERVICE_TRIGGER_UID"]
+ "TAS_SELFSERVICE_TRIGGER_UID" => $arrayDataAux["TAS_SELFSERVICE_TRIGGER_UID"],
+ "TAS_SELFSERVICE_EXECUTION" => $arrayDataAux["TAS_SELFSERVICE_EXECUTION"]
),
$keyCase
);
@@ -281,6 +282,7 @@ class Task
$this->unsetVar($arrayProperty, "TAS_SELFSERVICE_TIME");
$this->unsetVar($arrayProperty, "TAS_SELFSERVICE_TIME_UNIT");
$this->unsetVar($arrayProperty, "TAS_SELFSERVICE_TRIGGER_UID");
+ $this->unsetVar($arrayProperty, "TAS_SELFSERVICE_EXECUTION");
break;
case 'EVALUATE':
if (empty($arrayProperty["TAS_ASSIGN_VARIABLE"])) {
@@ -291,6 +293,7 @@ class Task
$this->unsetVar($arrayProperty, "TAS_SELFSERVICE_TIME");
$this->unsetVar($arrayProperty, "TAS_SELFSERVICE_TIME_UNIT");
$this->unsetVar($arrayProperty, "TAS_SELFSERVICE_TRIGGER_UID");
+ $this->unsetVar($arrayProperty, "TAS_SELFSERVICE_EXECUTION");
break;
case 'SELF_SERVICE':
case 'SELF_SERVICE_EVALUATE':
@@ -316,10 +319,14 @@ class Task
if (empty($arrayProperty["TAS_SELFSERVICE_TRIGGER_UID"])) {
throw (new \Exception("Invalid value specified for 'tas_selfservice_trigger_uid'"));
}
+ if (empty($arrayProperty["TAS_SELFSERVICE_EXECUTION"])) {
+ throw (new \Exception("Invalid value specified for 'tas_selfservice_execution'"));
+ }
} else {
$this->unsetVar($arrayProperty, "TAS_SELFSERVICE_TIME");
$this->unsetVar($arrayProperty, "TAS_SELFSERVICE_TIME_UNIT");
$this->unsetVar($arrayProperty, "TAS_SELFSERVICE_TRIGGER_UID");
+ $this->unsetVar($arrayProperty, "TAS_SELFSERVICE_EXECUTION");
}
break;
}
diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Light.php b/workflow/engine/src/ProcessMaker/Services/Api/Light.php
index 85309daf3..e2df62af2 100644
--- a/workflow/engine/src/ProcessMaker/Services/Api/Light.php
+++ b/workflow/engine/src/ProcessMaker/Services/Api/Light.php
@@ -462,8 +462,11 @@ class Light extends Api
$response = $process->getDynaForms($prj_uid);
$result = $this->parserDataDynaForm($response);
+ \G::LoadClass("pmDynaform");
+ $pmDynaForm = new \pmDynaform();
foreach ($result as $k => $form) {
$result[$k]['formContent'] = (isset($form['formContent']) && $form['formContent'] != null)?json_decode($form['formContent']):"";
+ $pmDynaForm->jsonr($result[$k]['formContent']);
$result[$k]['index'] = $k;
}
} catch (\Exception $e) {
@@ -491,12 +494,15 @@ class Light extends Api
$dynaForm->setFormatFieldNameInUppercase(false);
$oMobile = new \ProcessMaker\BusinessModel\Light();
$step = new \ProcessMaker\Services\Api\Project\Activity\Step();
+ \G::LoadClass("pmDynaform");
+ $pmDynaForm = new \pmDynaform();
$response = array();
for ($i = 0; $i < count($activitySteps); $i++) {
if ($activitySteps[$i]['step_type_obj'] == "DYNAFORM") {
$dataForm = $dynaForm->getDynaForm($activitySteps[$i]['step_uid_obj']);
$result = $this->parserDataDynaForm($dataForm);
$result['formContent'] = (isset($result['formContent']) && $result['formContent'] != null)?json_decode($result['formContent']):"";
+ $pmDynaForm->jsonr($result['formContent']);
$result['index'] = $i;
$result['stepId'] = $activitySteps[$i]["step_uid"];
$trigger = $oMobile->statusTriggers($step->doGetActivityStepTriggers($activitySteps[$i]["step_uid"], $act_uid, $prj_uid));
@@ -559,6 +565,9 @@ class Light extends Api
$response = $dynaForm->getDynaForm($dyn_uid);
$result = $this->parserDataDynaForm($response);
$result['formContent'] = (isset($result['formContent']) && $result['formContent'] != null)?json_decode($result['formContent']):"";
+ \G::LoadClass("pmDynaform");
+ $pmDynaForm = new \pmDynaform();
+ $pmDynaForm->jsonr($result['formContent']);
return $result;
} catch (\Exception $e) {
throw (new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage()));
@@ -574,11 +583,14 @@ class Light extends Api
try {
$dynaForm = new \ProcessMaker\BusinessModel\DynaForm();
$dynaForm->setFormatFieldNameInUppercase(false);
+ \G::LoadClass("pmDynaform");
+ $pmDynaForm = new \pmDynaform();
$return = array();
foreach ($request_data['formId'] as $dyn_uid) {
$response = $dynaForm->getDynaForm($dyn_uid);
$result = $this->parserDataDynaForm($response);
$result['formContent'] = (isset($result['formContent']) && $result['formContent'] != null)?json_decode($result['formContent']):"";
+ $pmDynaForm->jsonr($result['formContent']);
$return[] = $result;
}
} catch (\Exception $e) {
@@ -832,7 +844,7 @@ class Light extends Api
/**
* @url POST /case/:app_uid/claim
*
- * @param $app_uid
+ * @param $app_uid {@min 1}{@max 32}
* @return mixed
*/
public function claimCaseUser($app_uid)
diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Light/Tracker.php b/workflow/engine/src/ProcessMaker/Services/Api/Light/Tracker.php
new file mode 100644
index 000000000..051c7d2f7
--- /dev/null
+++ b/workflow/engine/src/ProcessMaker/Services/Api/Light/Tracker.php
@@ -0,0 +1,143 @@
+authentication($case, $pin);
+ } catch (\Exception $e) {
+ throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
+ }
+ return $response;
+ }
+
+ /**
+ * @return array
+ * @access public
+ * @url GET /process/:pro_uid/case/:app_uid/tracker-history
+ */
+ public function history($pro_uid, $app_uid)
+ {
+ try {
+ $oMobile = new \ProcessMaker\BusinessModel\Light\Tracker();
+ if (!$oMobile->permissions($pro_uid, "history"))
+ {
+ throw (new \Exception(\G::LoadTranslation('ID_ACCOUNT_DISABLED_CONTACT_ADMIN')));
+ }
+ $response = $oMobile->history($pro_uid, $app_uid);
+ } catch (\Exception $e) {
+ throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
+ }
+ return $response;
+ }
+
+ /**
+ * @return array
+ * @access public
+ *
+ * @param string $pro_uid {@min 1}{@max 32}
+ * @param string $app_uid {@min 1}{@max 32}
+ *
+ * @url GET /process/:pro_uid/case/:app_uid/tracker-messages
+ */
+ public function getMessages($pro_uid, $app_uid)
+ {
+ try {
+ $oMobile = new \ProcessMaker\BusinessModel\Light\Tracker();
+ if (!$oMobile->permissions($pro_uid, "messages"))
+ {
+ throw (new \Exception(\G::LoadTranslation('ID_ACCOUNT_DISABLED_CONTACT_ADMIN')));
+ }
+ $response = $oMobile->messages($pro_uid, $app_uid);
+ } catch (\Exception $e) {
+ throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
+ }
+ return $response;
+ }
+
+ /**
+ * @return array
+ * @access public
+ *
+ * @param string $msg_uid {@min 1}{@max 32}
+ * @param string $app_uid {@min 1}{@max 32}
+ *
+ * @url GET /process/case/:app_uid/message/:msg_uid/view
+ */
+ public function getViewMessages($app_uid, $msg_uid)
+ {
+ try {
+ $oMobile = new \ProcessMaker\BusinessModel\Light\Tracker();
+ $Fields = \Cases::getHistoryMessagesTrackerView( $app_uid, $msg_uid );
+ $response = $oMobile->parserMessages($Fields);
+ //$response = $oMobile->messages($pro_uid, $app_uid);
+ } catch (\Exception $e) {
+ throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
+ }
+ return $response;
+ }
+
+ /**
+ * @return array
+ * @access public
+ *
+ * @param string $pro_uid {@min 1}{@max 32}
+ * @param string $app_uid {@min 1}{@max 32}
+ *
+ * @url GET /process/:pro_uid/case/:app_uid/tracker-docs
+ */
+ public function getObjects($pro_uid, $app_uid)
+ {
+ try {
+ $oMobile = new \ProcessMaker\BusinessModel\Light\Tracker();
+ if (!$oMobile->permissions($pro_uid, "objects"))
+ {
+ throw (new \Exception(\G::LoadTranslation('ID_ACCOUNT_DISABLED_CONTACT_ADMIN')));
+ }
+ $response = $oMobile->objects($pro_uid, $app_uid);
+ } catch (\Exception $e) {
+ throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
+ }
+ return $response;
+ }
+
+ /**
+ * @return array
+ * @access public
+ *
+ * @param string $pro_uid {@min 1}{@max 32}
+ * @param string $app_uid {@min 1}{@max 32}
+ * @param string $obj_uid {@min 1}{@max 32}
+ * @param string $type
+ *
+ * @url GET /process/:pro_uid/case/:app_uid/object/:obj_uid/:type/show
+ */
+ public function getShowObjects($pro_uid, $app_uid, $obj_uid, $type)
+ {
+ try {
+ $oMobile = new \ProcessMaker\BusinessModel\Light\Tracker();
+ $response = $oMobile->showObjects($pro_uid, $app_uid, $obj_uid, $type);
+ } catch (\Exception $e) {
+ throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
+ }
+ return $response;
+ }
+}
\ No newline at end of file
diff --git a/workflow/engine/src/ProcessMaker/Services/Api/Project/Activity.php b/workflow/engine/src/ProcessMaker/Services/Api/Project/Activity.php
index 34d05b7d9..a01bd3066 100644
--- a/workflow/engine/src/ProcessMaker/Services/Api/Project/Activity.php
+++ b/workflow/engine/src/ProcessMaker/Services/Api/Project/Activity.php
@@ -258,7 +258,7 @@ class ActivityPropertiesStructure
public $tas_selfservice_timeout;
/**
- * @var string {@from body} {@choice DAYS,,HOURS}
+ * @var string {@from body} {@choice DAYS,,HOURS,MINUTES}
*/
public $tas_selfservice_time_unit;
@@ -267,6 +267,11 @@ class ActivityPropertiesStructure
*/
public $tas_selfservice_trigger_uid;
+ /**
+ * @var string {@from body} {@choice EVERY_TIME,ONCE}
+ */
+ public $tas_selfservice_execution;
+
/**
* @var string {@from body} {@choice TRUE,FALSE}
*/
diff --git a/workflow/engine/src/ProcessMaker/Services/api.ini b/workflow/engine/src/ProcessMaker/Services/api.ini
index f44a1dba1..d0d0aa063 100644
--- a/workflow/engine/src/ProcessMaker/Services/api.ini
+++ b/workflow/engine/src/ProcessMaker/Services/api.ini
@@ -100,6 +100,7 @@ debug = 1
[alias: light]
light = "ProcessMaker\Services\Api\Light"
+ tracker = "ProcessMaker\Services\Api\Light\Tracker"
[alias: consolidated]
list = "ProcessMaker\Services\Api\Consolidated"
diff --git a/workflow/engine/templates/cases/casesListConsolidated.js b/workflow/engine/templates/cases/casesListConsolidated.js
index d8f8332b9..b2e9dd1df 100644
--- a/workflow/engine/templates/cases/casesListConsolidated.js
+++ b/workflow/engine/templates/cases/casesListConsolidated.js
@@ -706,6 +706,279 @@ function renderSummary (val, p, r) {
return summaryIcon;
};
+function generateGridClassic(proUid, tasUid, dynUid){
+
+ var pager = 20; //pageSize
+ var pagei = 0; //start
+ Ext.Ajax.request({
+ url: '../pmConsolidatedCL/proxyGenerateGrid',
+ success: function(response) {
+ //Obtenemos el column model y los reader fields de proxyGenerateGrid
+ var dataResponse = Ext.util.JSON.decode(response.responseText);
+ var viewConfigObject;
+ var textArea = dataResponse.hasTextArea;
+
+ if (textArea == false) {
+ viewConfigObject = { //forceFit: true
+ };
+ } else {
+ viewConfigObject = {
+ //forceFit:true,
+ enableRowBody:true,
+ showPreview:true,
+ getRowClass : function(record, rowIndex, p, store){
+ if (this.showPreview) {
+ p.body = '
';
+ return 'x-grid3-row-expanded';
+ }
+ return 'x-grid3-row-collapsed';
+ }
+ };
+ }
+
+ storeConsolidated = new Ext.data.Store({
+ id: "storeConsolidatedGrid",
+ remoteSort: true,
+ //definimos un proxy como un objeto de la clase HttpProxy
+ proxy: new Ext.data.HttpProxy({
+ url: "../pmConsolidatedCL/proxyConsolidated",
+ api: {
+ read: "../pmConsolidatedCL/proxyConsolidated",
+ //update: "../pmConsolidatedCL/proxySaveConsolidated"
+ update: "../pmConsolidatedCL/consolidatedUpdateAjax"
+ }
+ }),
+
+ //el data reader obtiene los reader fields de la consulta en ajax
+ reader: new Ext.data.JsonReader({
+ fields: dataResponse.readerFields,
+ totalProperty: "totalCount",
+ //successProperty: "success",
+ idProperty: "APP_UID",
+ root: "data",
+ messageProperty: "message"
+ }),
+
+ //el data writer es un objeto generico pero q permitira a futuro el escribir los datos al servidor mediante el proxy
+ writer: new Ext.data.JsonWriter({
+ encode: true,
+ writeAllFields: false
+ }), //<-- plug a DataWriter into the store just as you would a Reader
+ autoSave: true, //<-- false would delay executing create, update, destroy requests until specifically told to do so with some [save] buton.
+
+ //el ordenamiento para los campos posiblemente este tenga q ser el tercer dato obtenido del proxy dado q los listados son muy cambiantes de tarea en tarea
+ //sortInfo:{
+ // field: 'APP_CACHE_VIEW.APP_NUMBER',
+ // direction: "DESC"
+ //}
+
+ //,
+ listeners: { //
+ beforeload:function (store, options) { //
+ grdNumRows = 0; //
+ }, //
+
+ load:function (store, records, options) { //
+ grdNumRows = store.getCount(); //
+
+ consolidatedGrid.setDisabled(false);
+ } //
+ } //
+ });
+
+ var xColumns = dataResponse.columnModel;
+ xColumns.unshift(smodel);
+
+
+ var cm = new Ext.grid.ColumnModel(xColumns);
+ cm.config[2].renderer = renderTitle; //Case Number
+ cm.config[3].renderer = renderTitle; //Case Title
+ cm.config[4].renderer = renderSummary;//Case Summary
+
+ //generacion del grid basados en los atributos definidos con anterioridad
+ storeConsolidated.setBaseParam("limit", pager);
+ storeConsolidated.setBaseParam("start", pagei);
+ storeConsolidated.setBaseParam('tasUid', tasUid);
+ storeConsolidated.setBaseParam('dynUid', dynUid);
+ storeConsolidated.setBaseParam('proUid', proUid);
+ storeConsolidated.setBaseParam('dropList', Ext.util.JSON.encode(dataResponse.dropList));
+ storeConsolidated.load();
+
+ consolidatedGrid = new Ext.grid.EditorGridPanel({
+ id: gridId,
+ region: "center",
+
+ store: storeConsolidated,
+ cm: cm,
+ sm: smodel,
+ //autoHeight: true,
+
+ //height: pnlMain.getSize().height - pnlMain.getFrameHeight(), //
+ width: pnlMain.getSize().width, //
+ height: browserHeight - 35, //
+
+ layout: 'fit',
+ //plugins: filters,
+ viewConfig: viewConfigObject,
+
+ listeners: {
+ beforeedit: function (e) {
+ var selRow = Ext.getCmp(gridId).getSelectionModel().getSelected();
+
+ var swDropdown = 0;
+ for (var i = 0; i <= dataResponse.dropList.length - 1 && swDropdown == 0; i++) {
+ if (dataResponse.dropList[i] == e.field) {
+ swDropdown = 1;
+ }
+ }
+
+ var swYesNo = 0;
+ for (var i = 0; i <= dataResponse.comboBoxYesNoList.length - 1 && swYesNo == 0; i++) {
+ if (dataResponse.comboBoxYesNoList[i] == e.field) {
+ swYesNo = 1;
+ }
+ }
+
+ if (swDropdown == 1 && swYesNo == 0) {
+ storeAux = Ext.StoreMgr.get("store" + e.field + "_" + proUid);
+ storeAux.setBaseParam("appUid", selRow.data["APP_UID"]);
+ storeAux.setBaseParam("dynUid", dynUid);
+ storeAux.setBaseParam("proUid", proUid);
+ storeAux.setBaseParam("fieldName", e.field);
+ //currentFieldEdited = e.field;
+ storeAux.load();
+ }
+ },
+
+ afteredit: function (e) {
+ //var store = consolidatedGrid.getStore();
+
+ if (Ext.getCmp("chk_allColumn").checked) {
+ Ext.Msg.show({
+ title: "",
+ msg: "The modification will be applied to all rows in your selection.",
+ buttons: Ext.Msg.YESNO,
+ fn: function (btn) {
+ if (btn == "yes") {
+ //storeConsolidated.each(function (record) {
+ // record.set(e.field, e.value);
+ //});
+
+ consolidatedGrid.setDisabled(true);
+
+ var dataUpdate = "";
+ var strValue = "";
+ var sw = 0;
+
+ if (e.value instanceof Date) {
+ var mAux = e.value.getMonth() + 1;
+ var dAux = e.value.getDate();
+ var hAux = e.value.getHours();
+ var iAux = e.value.getMinutes();
+ var sAux = e.value.getSeconds();
+
+ strValue = e.value.getFullYear() + "-" + ((mAux <= 9)? "0" : "") + mAux + "-" + ((dAux <= 9)? "0" : "") + dAux;
+ strValue = strValue + " " + ((hAux <= 9)? "0" + ((hAux == 0)? "0" : hAux) : hAux) + ":" + ((iAux <= 9)? "0" + ((iAux == 0)? "0" : iAux) : iAux) + ":" + ((sAux <= 9)? "0" + ((sAux == 0)? "0" : sAux) : sAux);
+ } else {
+ strValue = strReplace("\"", "\\\"", e.value + "");
+ }
+
+ storeConsolidated.each(function (record) {
+ dataUpdate = dataUpdate + ((sw == 1)? "(sep1 /)": "") + record.data["APP_UID"] + "(sep2 /)" + e.field + "(sep2 /)" + strValue;
+ sw = 1;
+ });
+
+ ///////
+ Ext.Ajax.request({
+ url: "consolidatedUpdateAjax",
+ method: "POST",
+ params: {
+ "option": "ALL",
+ "dynaformUid": dynUid,
+ "dataUpdate": dataUpdate
+ },
+
+ success: function (response, opts) {
+ var dataResponse = eval("(" + response.responseText + ")"); //json
+
+ if (dataResponse.status && dataResponse.status == "OK") {
+ if (typeof(storeConsolidated.lastOptions.params) != "undefined") {
+ pagei = storeConsolidated.lastOptions.params.start;
+ }
+
+ storeConsolidated.setBaseParam("start", pagei);
+ storeConsolidated.load();
+ } else {
+ //
+ }
+ }
+ });
+ }
+ },
+ //animEl: "elId",
+ icon: Ext.MessageBox.QUESTION
+ });
+ }
+ },
+
+ mouseover: function (e, cell) {
+ var rowIndex = consolidatedGrid.getView().findRowIndex(cell);
+ if (!(rowIndex === false)) {
+ var record = consolidatedGrid.store.getAt(rowIndex);
+ var msg = record.get('APP_TITLE');
+ Ext.QuickTips.register({
+ text: msg,
+ target: e.target
+ });
+ } else {
+ Ext.QuickTips.unregister(e.target);
+ }
+ },
+
+ mouseout: function (e, cell) {
+ Ext.QuickTips.unregister(e.target);
+ }
+ },
+
+ //tbar: tb,
+
+ tbar: new Ext.Toolbar({
+ height: 33,
+ items: toolbarconsolidated
+ }),
+
+ bbar: new Ext.PagingToolbar({
+ pageSize: pager,
+ store: storeConsolidated,
+ displayInfo: true,
+ displayMsg: _("ID_DISPLAY_ITEMS"),
+ emptyMsg: _("ID_DISPLAY_EMPTY")
+ })
+ });
+
+ //remocion de todos los elementos del panel principal donde se carga el grid
+ //Ext.ComponentMgr.get("myId").body.update("");
+ //pnlMain.removeAll(false);
+ pnlMain.removeAll();
+ //adicion del grid definido con anterioridad
+ pnlMain.add(consolidatedGrid);
+ //recarga de los elementos del grid, para su visualizacion.
+ pnlMain.doLayout();
+ },
+
+ //en caso de fallo ejecutar la siguiente funcion.
+ failure: function(){
+ alert("Failure...");
+ },
+ // parametros que son enviados en la peticion al servidor.
+ params: {
+ xaction: 'read',
+ tasUid: tasUid,
+ dynUid: dynUid,
+ proUid: proUid
+ }
+ });
+}
function generateGrid(proUid, tasUid, dynUid)
{
diff --git a/workflow/engine/templates/designer/index.html b/workflow/engine/templates/designer/index.html
index 900944fe0..4fa796318 100644
--- a/workflow/engine/templates/designer/index.html
+++ b/workflow/engine/templates/designer/index.html
@@ -162,11 +162,14 @@
+
+
+
-
+