Merged in release/3.5.0 (pull request #7420)

release/3.5.0

Approved-by: Julio Cesar Laura Avendaño <contact@julio-laura.com>
This commit is contained in:
Paula Quispe
2020-07-22 21:56:07 +00:00
committed by Julio Cesar Laura Avendaño
29 changed files with 444 additions and 180 deletions

View File

@@ -1339,7 +1339,7 @@ class Derivation
//if there are SubProcess to create
if (isset($aSP)) {
// Create case in the subprocess
$this->subProcessCreation($aSP, $appFields, $currentDelegation, $iNewDelIndex, $iAppThreadIndex);
$subProcessFields = $this->subProcessCreation($aSP, $appFields, $currentDelegation, $iNewDelIndex, $iAppThreadIndex);
// If is ASYNCHRONOUS we will to route the case master
if ($aSP['SP_SYNCHRONOUS'] == 0) {
@@ -1382,9 +1382,9 @@ class Derivation
if ($openThreads == 0) {
$this->derivate($currentDelegation2, $nextDelegations2);
} else {
$oSubApplication = new SubApplication();
$aSubApplication['SA_STATUS'] = 'ACTIVE';
$oSubApplication->update($aSubApplication);
$subApplication = new SubApplication();
$subProcessFields['SA_STATUS'] = 'ACTIVE';
$subApplication->update($subProcessFields);
}
}
}
@@ -1411,7 +1411,7 @@ class Derivation
* @param int $delIndex
* @param int $threadIndex
*
* @return void
* @return array
*/
protected function subProcessCreation(array $subProcessInfo, array $appFields, array $currentDelegation, $delIndex, $threadIndex)
{
@@ -1496,6 +1496,8 @@ class Derivation
$nextTaskData = $taskNextDel->toArray(BasePeer::TYPE_FIELDNAME);
$nextTaskData['USR_UID'] = $subProcessInfo['USR_UID'];
$sendNotifications = $this->notifyAssignedUser($appFields, $nextTaskData, $newCase['INDEX']);
return $attributes;
}
/**

View File

@@ -3417,24 +3417,26 @@ class Processes
/**
* Get DB Connections Rows for a Process
*
* @param array $sProUid
* @return array $aConnections
* @param string $proUid
* @return array $connections
*/
public function getDBConnectionsRows($sProUid)
public function getDBConnectionsRows($proUid)
{
try {
$aConnections = array();
$oCriteria = new Criteria('workflow');
$oCriteria->add(DbSourcePeer::PRO_UID, $sProUid);
$oDataset = DbSourcePeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
while ($aRow = $oDataset->getRow()) {
$oConnection = new DbSource();
$aConnections[] = $oConnection->Load($aRow['DBS_UID'], $aRow['PRO_UID']);
$oDataset->next();
$connections = [];
$criteria = new Criteria('workflow');
$criteria->add(DbSourcePeer::PRO_UID, $proUid);
$dataset = DbSourcePeer::doSelectRS($criteria);
$dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$dataset->next();
while ($row = $dataset->getRow()) {
$connection = new DbSource();
$infoConnection = $connection->Load($row['DBS_UID'], $row['PRO_UID']);
unset($infoConnection['DBS_ID']);
$connections[] = $infoConnection;
$dataset->next();
}
return $aConnections;
return $connections;
} catch (Exception $oError) {
throw $oError;
}

View File

@@ -81,6 +81,8 @@ class SchedulerMapBuilder
$tMap->addColumn('EXPRESSION', 'Expression', 'string', CreoleTypes::VARCHAR, false, 255);
$tMap->addColumn('DEFAULT_VALUE', 'DefaultValue', 'string', CreoleTypes::LONGVARCHAR, false, null);
$tMap->addColumn('BODY', 'Body', 'string', CreoleTypes::VARCHAR, false, 255);
$tMap->addColumn('TYPE', 'Type', 'string', CreoleTypes::VARCHAR, false, 255);

View File

@@ -75,6 +75,12 @@ abstract class BaseScheduler extends BaseObject implements Persistent
*/
protected $expression;
/**
* The value for the default_value field.
* @var string
*/
protected $default_value;
/**
* The value for the body field.
* @var string
@@ -225,6 +231,17 @@ abstract class BaseScheduler extends BaseObject implements Persistent
return $this->expression;
}
/**
* Get the [default_value] column value.
*
* @return string
*/
public function getDefaultValue()
{
return $this->default_value;
}
/**
* Get the [body] column value.
*
@@ -531,6 +548,28 @@ abstract class BaseScheduler extends BaseObject implements Persistent
} // setExpression()
/**
* Set the value of [default_value] column.
*
* @param string $v new value
* @return void
*/
public function setDefaultValue($v)
{
// Since the native PHP type for this column is string,
// we will cast the input to a string (if it is not).
if ($v !== null && !is_string($v)) {
$v = (string) $v;
}
if ($this->default_value !== $v) {
$this->default_value = $v;
$this->modifiedColumns[] = SchedulerPeer::DEFAULT_VALUE;
}
} // setDefaultValue()
/**
* Set the value of [body] column.
*
@@ -754,28 +793,30 @@ abstract class BaseScheduler extends BaseObject implements Persistent
$this->expression = $rs->getString($startcol + 7);
$this->body = $rs->getString($startcol + 8);
$this->default_value = $rs->getString($startcol + 8);
$this->type = $rs->getString($startcol + 9);
$this->body = $rs->getString($startcol + 9);
$this->category = $rs->getString($startcol + 10);
$this->type = $rs->getString($startcol + 10);
$this->system = $rs->getInt($startcol + 11);
$this->category = $rs->getString($startcol + 11);
$this->timezone = $rs->getString($startcol + 12);
$this->system = $rs->getInt($startcol + 12);
$this->enable = $rs->getInt($startcol + 13);
$this->timezone = $rs->getString($startcol + 13);
$this->creation_date = $rs->getTimestamp($startcol + 14, null);
$this->enable = $rs->getInt($startcol + 14);
$this->last_update = $rs->getTimestamp($startcol + 15, null);
$this->creation_date = $rs->getTimestamp($startcol + 15, null);
$this->last_update = $rs->getTimestamp($startcol + 16, null);
$this->resetModified();
$this->setNew(false);
// FIXME - using NUM_COLUMNS may be clearer.
return $startcol + 16; // 16 = SchedulerPeer::NUM_COLUMNS - SchedulerPeer::NUM_LAZY_LOAD_COLUMNS).
return $startcol + 17; // 17 = SchedulerPeer::NUM_COLUMNS - SchedulerPeer::NUM_LAZY_LOAD_COLUMNS).
} catch (Exception $e) {
throw new PropelException("Error populating Scheduler object", $e);
@@ -1006,27 +1047,30 @@ abstract class BaseScheduler extends BaseObject implements Persistent
return $this->getExpression();
break;
case 8:
return $this->getBody();
return $this->getDefaultValue();
break;
case 9:
return $this->getType();
return $this->getBody();
break;
case 10:
return $this->getCategory();
return $this->getType();
break;
case 11:
return $this->getSystem();
return $this->getCategory();
break;
case 12:
return $this->getTimezone();
return $this->getSystem();
break;
case 13:
return $this->getEnable();
return $this->getTimezone();
break;
case 14:
return $this->getCreationDate();
return $this->getEnable();
break;
case 15:
return $this->getCreationDate();
break;
case 16:
return $this->getLastUpdate();
break;
default:
@@ -1057,14 +1101,15 @@ abstract class BaseScheduler extends BaseObject implements Persistent
$keys[5] => $this->getInterval(),
$keys[6] => $this->getDescription(),
$keys[7] => $this->getExpression(),
$keys[8] => $this->getBody(),
$keys[9] => $this->getType(),
$keys[10] => $this->getCategory(),
$keys[11] => $this->getSystem(),
$keys[12] => $this->getTimezone(),
$keys[13] => $this->getEnable(),
$keys[14] => $this->getCreationDate(),
$keys[15] => $this->getLastUpdate(),
$keys[8] => $this->getDefaultValue(),
$keys[9] => $this->getBody(),
$keys[10] => $this->getType(),
$keys[11] => $this->getCategory(),
$keys[12] => $this->getSystem(),
$keys[13] => $this->getTimezone(),
$keys[14] => $this->getEnable(),
$keys[15] => $this->getCreationDate(),
$keys[16] => $this->getLastUpdate(),
);
return $result;
}
@@ -1121,27 +1166,30 @@ abstract class BaseScheduler extends BaseObject implements Persistent
$this->setExpression($value);
break;
case 8:
$this->setBody($value);
$this->setDefaultValue($value);
break;
case 9:
$this->setType($value);
$this->setBody($value);
break;
case 10:
$this->setCategory($value);
$this->setType($value);
break;
case 11:
$this->setSystem($value);
$this->setCategory($value);
break;
case 12:
$this->setTimezone($value);
$this->setSystem($value);
break;
case 13:
$this->setEnable($value);
$this->setTimezone($value);
break;
case 14:
$this->setCreationDate($value);
$this->setEnable($value);
break;
case 15:
$this->setCreationDate($value);
break;
case 16:
$this->setLastUpdate($value);
break;
} // switch()
@@ -1200,35 +1248,39 @@ abstract class BaseScheduler extends BaseObject implements Persistent
}
if (array_key_exists($keys[8], $arr)) {
$this->setBody($arr[$keys[8]]);
$this->setDefaultValue($arr[$keys[8]]);
}
if (array_key_exists($keys[9], $arr)) {
$this->setType($arr[$keys[9]]);
$this->setBody($arr[$keys[9]]);
}
if (array_key_exists($keys[10], $arr)) {
$this->setCategory($arr[$keys[10]]);
$this->setType($arr[$keys[10]]);
}
if (array_key_exists($keys[11], $arr)) {
$this->setSystem($arr[$keys[11]]);
$this->setCategory($arr[$keys[11]]);
}
if (array_key_exists($keys[12], $arr)) {
$this->setTimezone($arr[$keys[12]]);
$this->setSystem($arr[$keys[12]]);
}
if (array_key_exists($keys[13], $arr)) {
$this->setEnable($arr[$keys[13]]);
$this->setTimezone($arr[$keys[13]]);
}
if (array_key_exists($keys[14], $arr)) {
$this->setCreationDate($arr[$keys[14]]);
$this->setEnable($arr[$keys[14]]);
}
if (array_key_exists($keys[15], $arr)) {
$this->setLastUpdate($arr[$keys[15]]);
$this->setCreationDate($arr[$keys[15]]);
}
if (array_key_exists($keys[16], $arr)) {
$this->setLastUpdate($arr[$keys[16]]);
}
}
@@ -1274,6 +1326,10 @@ abstract class BaseScheduler extends BaseObject implements Persistent
$criteria->add(SchedulerPeer::EXPRESSION, $this->expression);
}
if ($this->isColumnModified(SchedulerPeer::DEFAULT_VALUE)) {
$criteria->add(SchedulerPeer::DEFAULT_VALUE, $this->default_value);
}
if ($this->isColumnModified(SchedulerPeer::BODY)) {
$criteria->add(SchedulerPeer::BODY, $this->body);
}
@@ -1374,6 +1430,8 @@ abstract class BaseScheduler extends BaseObject implements Persistent
$copyObj->setExpression($this->expression);
$copyObj->setDefaultValue($this->default_value);
$copyObj->setBody($this->body);
$copyObj->setType($this->type);

View File

@@ -25,7 +25,7 @@ abstract class BaseSchedulerPeer
const CLASS_DEFAULT = 'classes.model.Scheduler';
/** The total number of columns. */
const NUM_COLUMNS = 16;
const NUM_COLUMNS = 17;
/** The number of lazy-loaded columns. */
const NUM_LAZY_LOAD_COLUMNS = 0;
@@ -55,6 +55,9 @@ abstract class BaseSchedulerPeer
/** the column name for the EXPRESSION field */
const EXPRESSION = 'SCHEDULER.EXPRESSION';
/** the column name for the DEFAULT_VALUE field */
const DEFAULT_VALUE = 'SCHEDULER.DEFAULT_VALUE';
/** the column name for the BODY field */
const BODY = 'SCHEDULER.BODY';
@@ -90,10 +93,10 @@ abstract class BaseSchedulerPeer
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
*/
private static $fieldNames = array (
BasePeer::TYPE_PHPNAME => array ('Id', 'Title', 'Startingtime', 'Endingtime', 'Everyon', 'Interval', 'Description', 'Expression', 'Body', 'Type', 'Category', 'System', 'Timezone', 'Enable', 'CreationDate', 'LastUpdate', ),
BasePeer::TYPE_COLNAME => array (SchedulerPeer::ID, SchedulerPeer::TITLE, SchedulerPeer::STARTINGTIME, SchedulerPeer::ENDINGTIME, SchedulerPeer::EVERYON, SchedulerPeer::INTERVAL, SchedulerPeer::DESCRIPTION, SchedulerPeer::EXPRESSION, SchedulerPeer::BODY, SchedulerPeer::TYPE, SchedulerPeer::CATEGORY, SchedulerPeer::SYSTEM, SchedulerPeer::TIMEZONE, SchedulerPeer::ENABLE, SchedulerPeer::CREATION_DATE, SchedulerPeer::LAST_UPDATE, ),
BasePeer::TYPE_FIELDNAME => array ('id', 'title', 'startingTime', 'endingTime', 'everyOn', 'interval', 'description', 'expression', 'body', 'type', 'category', 'system', 'timezone', 'enable', 'creation_date', 'last_update', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
BasePeer::TYPE_PHPNAME => array ('Id', 'Title', 'Startingtime', 'Endingtime', 'Everyon', 'Interval', 'Description', 'Expression', 'DefaultValue', 'Body', 'Type', 'Category', 'System', 'Timezone', 'Enable', 'CreationDate', 'LastUpdate', ),
BasePeer::TYPE_COLNAME => array (SchedulerPeer::ID, SchedulerPeer::TITLE, SchedulerPeer::STARTINGTIME, SchedulerPeer::ENDINGTIME, SchedulerPeer::EVERYON, SchedulerPeer::INTERVAL, SchedulerPeer::DESCRIPTION, SchedulerPeer::EXPRESSION, SchedulerPeer::DEFAULT_VALUE, SchedulerPeer::BODY, SchedulerPeer::TYPE, SchedulerPeer::CATEGORY, SchedulerPeer::SYSTEM, SchedulerPeer::TIMEZONE, SchedulerPeer::ENABLE, SchedulerPeer::CREATION_DATE, SchedulerPeer::LAST_UPDATE, ),
BasePeer::TYPE_FIELDNAME => array ('id', 'title', 'startingTime', 'endingTime', 'everyOn', 'interval', 'description', 'expression', 'default_value', 'body', 'type', 'category', 'system', 'timezone', 'enable', 'creation_date', 'last_update', ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
);
/**
@@ -103,10 +106,10 @@ abstract class BaseSchedulerPeer
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
*/
private static $fieldKeys = array (
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Title' => 1, 'Startingtime' => 2, 'Endingtime' => 3, 'Everyon' => 4, 'Interval' => 5, 'Description' => 6, 'Expression' => 7, 'Body' => 8, 'Type' => 9, 'Category' => 10, 'System' => 11, 'Timezone' => 12, 'Enable' => 13, 'CreationDate' => 14, 'LastUpdate' => 15, ),
BasePeer::TYPE_COLNAME => array (SchedulerPeer::ID => 0, SchedulerPeer::TITLE => 1, SchedulerPeer::STARTINGTIME => 2, SchedulerPeer::ENDINGTIME => 3, SchedulerPeer::EVERYON => 4, SchedulerPeer::INTERVAL => 5, SchedulerPeer::DESCRIPTION => 6, SchedulerPeer::EXPRESSION => 7, SchedulerPeer::BODY => 8, SchedulerPeer::TYPE => 9, SchedulerPeer::CATEGORY => 10, SchedulerPeer::SYSTEM => 11, SchedulerPeer::TIMEZONE => 12, SchedulerPeer::ENABLE => 13, SchedulerPeer::CREATION_DATE => 14, SchedulerPeer::LAST_UPDATE => 15, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'title' => 1, 'startingTime' => 2, 'endingTime' => 3, 'everyOn' => 4, 'interval' => 5, 'description' => 6, 'expression' => 7, 'body' => 8, 'type' => 9, 'category' => 10, 'system' => 11, 'timezone' => 12, 'enable' => 13, 'creation_date' => 14, 'last_update' => 15, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, )
BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'Title' => 1, 'Startingtime' => 2, 'Endingtime' => 3, 'Everyon' => 4, 'Interval' => 5, 'Description' => 6, 'Expression' => 7, 'DefaultValue' => 8, 'Body' => 9, 'Type' => 10, 'Category' => 11, 'System' => 12, 'Timezone' => 13, 'Enable' => 14, 'CreationDate' => 15, 'LastUpdate' => 16, ),
BasePeer::TYPE_COLNAME => array (SchedulerPeer::ID => 0, SchedulerPeer::TITLE => 1, SchedulerPeer::STARTINGTIME => 2, SchedulerPeer::ENDINGTIME => 3, SchedulerPeer::EVERYON => 4, SchedulerPeer::INTERVAL => 5, SchedulerPeer::DESCRIPTION => 6, SchedulerPeer::EXPRESSION => 7, SchedulerPeer::DEFAULT_VALUE => 8, SchedulerPeer::BODY => 9, SchedulerPeer::TYPE => 10, SchedulerPeer::CATEGORY => 11, SchedulerPeer::SYSTEM => 12, SchedulerPeer::TIMEZONE => 13, SchedulerPeer::ENABLE => 14, SchedulerPeer::CREATION_DATE => 15, SchedulerPeer::LAST_UPDATE => 16, ),
BasePeer::TYPE_FIELDNAME => array ('id' => 0, 'title' => 1, 'startingTime' => 2, 'endingTime' => 3, 'everyOn' => 4, 'interval' => 5, 'description' => 6, 'expression' => 7, 'default_value' => 8, 'body' => 9, 'type' => 10, 'category' => 11, 'system' => 12, 'timezone' => 13, 'enable' => 14, 'creation_date' => 15, 'last_update' => 16, ),
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, )
);
/**
@@ -223,6 +226,8 @@ abstract class BaseSchedulerPeer
$criteria->addSelectColumn(SchedulerPeer::EXPRESSION);
$criteria->addSelectColumn(SchedulerPeer::DEFAULT_VALUE);
$criteria->addSelectColumn(SchedulerPeer::BODY);
$criteria->addSelectColumn(SchedulerPeer::TYPE);