diff --git a/workflow/engine/classes/Derivation.php b/workflow/engine/classes/Derivation.php index 6214b8928..67741db13 100644 --- a/workflow/engine/classes/Derivation.php +++ b/workflow/engine/classes/Derivation.php @@ -1071,7 +1071,8 @@ class Derivation $taskNextDel, $iNewDelIndex, $nextDel["TAS_UID"], - $appFields + $appFields, + $taskNextDel->getTasId() ); } @@ -2081,13 +2082,16 @@ class Derivation /** * When we route a case we will to create a record in the table APP_ASSIGN_SELF_SERVICE_VALUE if the task is SELF_SERVICE + * * @param object $taskNextDel * @param integer $iNewDelIndex * @param string $nextTasUid * @param array $appFields + * @param integer $nextTasId + * * @return void */ - public function createRecordAppSelfServiceValue($taskNextDel, $iNewDelIndex, $nextTasUid, $appFields) + public function createRecordAppSelfServiceValue($taskNextDel, $iNewDelIndex, $nextTasUid, $appFields, $nextTasId = 0) { if ($taskNextDel->getTasAssignType() == "SELF_SERVICE" && trim($taskNextDel->getTasGroupVariable()) != "") { $nextTaskGroupVariable = trim($taskNextDel->getTasGroupVariable(), " @#"); @@ -2101,11 +2105,13 @@ class Derivation $appAssignSelfServiceValue->create( $appFields["APP_UID"], $iNewDelIndex, - array( + [ "PRO_UID" => $appFields["PRO_UID"], "TAS_UID" => $nextTasUid, - "GRP_UID" => "" - ), + "GRP_UID" => "", + "APP_NUMBER" => !empty($appFields["APP_NUMBER"]) ? $appFields["APP_NUMBER"] : 0, + "TAS_ID" => $nextTasId + ], $dataVariable ); } diff --git a/workflow/engine/classes/WorkspaceTools.php b/workflow/engine/classes/WorkspaceTools.php index b0f406a5c..71fc9778f 100644 --- a/workflow/engine/classes/WorkspaceTools.php +++ b/workflow/engine/classes/WorkspaceTools.php @@ -4055,9 +4055,7 @@ class WorkspaceTools $con->commit(); /*----------------------------------********---------------------------------*/ - CLI::logging("-> Migrating And Populating Indexing for avoiding the use of table APP_CACHE_VIEW Done \n"); - - // Populating PRO_ID, USR_ID + // Populating PRO_ID, USR_ID IN LIST TABLES CLI::logging("-> Populating PRO_ID, USR_ID at LIST_* \n"); $con->begin(); $stmt = $con->createStatement(); @@ -4066,7 +4064,37 @@ class WorkspaceTools } $con->commit(); - CLI::logging("-> Populating PRO_ID, USR_ID at LIST_* Done \n"); + // Populating APP_ASSIGN_SELF_SERVICE_VALUE.APP_NUMBER + CLI::logging("-> Populating APP_ASSIGN_SELF_SERVICE_VALUE.APP_NUMBER \n"); + $con->begin(); + $stmt = $con->createStatement(); + $rs = $stmt->executeQuery("UPDATE APP_ASSIGN_SELF_SERVICE_VALUE AS APP_SELF + INNER JOIN ( + SELECT APPLICATION.APP_UID, APPLICATION.APP_NUMBER + FROM APPLICATION + ) AS APP + ON (APP_SELF.APP_UID = APP.APP_UID) + SET APP_SELF.APP_NUMBER = APP.APP_NUMBER + WHERE APP_SELF.APP_NUMBER = 0"); + $con->commit(); + + // Populating APP_ASSIGN_SELF_SERVICE_VALUE.TAS_ID + CLI::logging("-> Populating APP_ASSIGN_SELF_SERVICE_VALUE.TAS_ID \n"); + $con->begin(); + $stmt = $con->createStatement(); + $rs = $stmt->executeQuery("UPDATE APP_ASSIGN_SELF_SERVICE_VALUE AS APP_SELF + INNER JOIN ( + SELECT TASK.TAS_UID, TASK.TAS_ID + FROM TASK + ) AS TASK + ON (APP_SELF.TAS_UID = TASK.TAS_UID) + SET APP_SELF.TAS_ID = TASK.TAS_ID + WHERE APP_SELF.TAS_ID = 0"); + $con->commit(); + CLI::logging("-> Populating APP_ASSIGN_SELF_SERVICE_VALUE.TAS_ID Done \n"); + + //Complete all migrations + CLI::logging("-> Migrating And Populating Indexing for avoiding the use of table APP_CACHE_VIEW Done \n"); } /** diff --git a/workflow/engine/classes/model/AppAssignSelfServiceValue.php b/workflow/engine/classes/model/AppAssignSelfServiceValue.php index ec5a55988..b2fea9d9b 100644 --- a/workflow/engine/classes/model/AppAssignSelfServiceValue.php +++ b/workflow/engine/classes/model/AppAssignSelfServiceValue.php @@ -5,10 +5,11 @@ class AppAssignSelfServiceValue extends BaseAppAssignSelfServiceValue * Create record * * @param string $applicationUid Unique id of Case - * @param int $delIndex Delegation index - * @param array $arrayData Data + * @param int $delIndex Delegation index + * @param array $arrayData Data * - * return void + * @return void + * @throws Exception */ public function create($applicationUid, $delIndex, array $arrayData, $dataVariable = []) { @@ -59,9 +60,10 @@ class AppAssignSelfServiceValue extends BaseAppAssignSelfServiceValue * Remove record * * @param string $applicationUid Unique id of Case - * @param int $delIndex Delegation index + * @param int $delIndex Delegation index * - * return void + * @return void + * @throws Exception */ public function remove($applicationUid, $delIndex = 0) { @@ -93,6 +95,7 @@ class AppAssignSelfServiceValue extends BaseAppAssignSelfServiceValue /** * Generate data + * This method is used from the command database-generate-self-service-by-value * * @return void * @throws Exception @@ -136,6 +139,7 @@ class AppAssignSelfServiceValue extends BaseAppAssignSelfServiceValue $dataVariable = (is_array($dataVariable))? $dataVariable : trim($dataVariable); if (!empty($dataVariable)) { + //@todo, will be deprecate the command database-generate-self-service-by-value $this->create( $row["APP_UID"], $row["DEL_INDEX"], diff --git a/workflow/engine/classes/model/ListUnassigned.php b/workflow/engine/classes/model/ListUnassigned.php index 4a065ad61..7306ad7fe 100644 --- a/workflow/engine/classes/model/ListUnassigned.php +++ b/workflow/engine/classes/model/ListUnassigned.php @@ -325,13 +325,14 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface * Get SelfService Value Based * * @param string $userUid + * * @return array $arrayAppAssignSelfServiceValueData * @throws Exception */ public function getSelfServiceCasesByEvaluate($userUid) { try { - $arrayAppAssignSelfServiceValueData = array(); + $arrayAppAssignSelfServiceValueData = []; $criteria = new Criteria("workflow"); @@ -347,8 +348,10 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface $criteria->setDistinct(); $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::APP_UID); + $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::APP_NUMBER); $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::DEL_INDEX); $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::TAS_UID); + $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::TAS_ID); $criteria->addJoin(AppAssignSelfServiceValuePeer::ID, AppAssignSelfServiceValueGroupPeer::ID, Criteria::INNER_JOIN); $criteria->add(AppAssignSelfServiceValueGroupPeer::GRP_UID, $userUid, Criteria::EQUAL); $criteria->addOr(AppAssignSelfServiceValueGroupPeer::GRP_UID, $sql, Criteria::CUSTOM); @@ -359,11 +362,11 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface while ($rsCriteria->next()) { $row = $rsCriteria->getRow(); - $arrayAppAssignSelfServiceValueData[] = array( - "APP_UID" => $row["APP_UID"], + $arrayAppAssignSelfServiceValueData[] = [ + "APP_NUMBER" => $row["APP_NUMBER"], "DEL_INDEX" => $row["DEL_INDEX"], - "TAS_UID" => $row["TAS_UID"] - ); + "TAS_ID" => $row["TAS_ID"] + ]; } return $arrayAppAssignSelfServiceValueData; @@ -389,8 +392,11 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface $c = new Criteria(); $c->clearSelectColumns(); $c->addSelectColumn(TaskPeer::TAS_UID); + $c->addSelectColumn(TaskPeer::TAS_ID); $c->addSelectColumn(TaskPeer::PRO_UID); + //@todo we need to use the PRO_ID for the left join $c->addJoin(TaskPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN); + //@todo we need to use the TAS_ID for the left join $c->addJoin(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN); $c->add(ProcessPeer::PRO_STATUS, 'ACTIVE'); $c->add(TaskPeer::TAS_ASSIGN_TYPE, 'SELF_SERVICE'); @@ -407,7 +413,7 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface $row = $rs->getRow(); while (is_array($row)) { - $tasks[] = $row['TAS_UID']; + $tasks[] = $row['TAS_ID']; $rs->next(); $row = $rs->getRow(); } @@ -418,8 +424,11 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface $c = new Criteria(); $c->clearSelectColumns(); $c->addSelectColumn(TaskPeer::TAS_UID); + $c->addSelectColumn(TaskPeer::TAS_ID); $c->addSelectColumn(TaskPeer::PRO_UID); + //@todo we need to use the PRO_ID for the left join $c->addJoin(TaskPeer::PRO_UID, ProcessPeer::PRO_UID, Criteria::LEFT_JOIN); + //@todo we need to use the TAS_ID for the left join $c->addJoin(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID, Criteria::LEFT_JOIN); $c->add(ProcessPeer::PRO_STATUS, 'ACTIVE'); $c->add(TaskPeer::TAS_ASSIGN_TYPE, 'SELF_SERVICE'); @@ -436,7 +445,7 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface $row = $rs->getRow(); while (is_array($row)) { - $tasks[] = $row['TAS_UID']; + $tasks[] = $row['TAS_ID']; $rs->next(); $row = $rs->getRow(); } @@ -446,8 +455,10 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface /** * Returns the number of cases of a user + * * @param string $userUid * @param array $filters + * * @return int $total */ public function getCountList($userUid, $filters = array()) @@ -463,6 +474,7 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface * * @param criteria $criteria * @param string $userUid + * * @return criteria $criteria */ public function getCriteriaWhereSelfService($criteria, $userUid) @@ -478,36 +490,36 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface $firstRow = current($aSelfServiceValueBased); $criterionAux = sprintf( "(( - LIST_UNASSIGNED.APP_UID='%s' AND + LIST_UNASSIGNED.APP_NUMBER='%s' AND LIST_UNASSIGNED.DEL_INDEX=%d AND - LIST_UNASSIGNED.TAS_UID='%s' + LIST_UNASSIGNED.TAS_ID='%s' ) ", - $firstRow["APP_UID"], + $firstRow["APP_NUMBER"], $firstRow["DEL_INDEX"], - $firstRow["TAS_UID"] + $firstRow["TAS_ID"] ); foreach (array_slice($aSelfServiceValueBased, 1) as $value) { $criterionAux .= sprintf( " OR ( - LIST_UNASSIGNED.APP_UID='%s' AND + LIST_UNASSIGNED.APP_NUMBER='%s' AND LIST_UNASSIGNED.DEL_INDEX=%d AND - LIST_UNASSIGNED.TAS_UID='%s' + LIST_UNASSIGNED.TAS_ID='%s' ) ", - $value["APP_UID"], + $value["APP_NUMBER"], $value["DEL_INDEX"], - $value["TAS_UID"] + $value["TAS_ID"] ); } $criterionAux .= ")"; //And Load SelfService $criteria->add( $criteria->getNewCriterion( - ListUnassignedPeer::TAS_UID, + ListUnassignedPeer::TAS_ID, $tasks, Criteria::IN )->addOr( $criteria->getNewCriterion( - ListUnassignedPeer::TAS_UID, + ListUnassignedPeer::TAS_ID, $criterionAux, Criteria::CUSTOM ) @@ -515,7 +527,7 @@ class ListUnassigned extends BaseListUnassigned implements ListInterface ); } else { //Self Service - $criteria->add(ListUnassignedPeer::TAS_UID, $tasks, Criteria::IN); + $criteria->add(ListUnassignedPeer::TAS_ID, $tasks, Criteria::IN); } return $criteria; diff --git a/workflow/engine/classes/model/map/AppAssignSelfServiceValueMapBuilder.php b/workflow/engine/classes/model/map/AppAssignSelfServiceValueMapBuilder.php index e5eb302ad..e38cbaa37 100644 --- a/workflow/engine/classes/model/map/AppAssignSelfServiceValueMapBuilder.php +++ b/workflow/engine/classes/model/map/AppAssignSelfServiceValueMapBuilder.php @@ -69,12 +69,16 @@ class AppAssignSelfServiceValueMapBuilder $tMap->addColumn('APP_UID', 'AppUid', 'string', CreoleTypes::VARCHAR, true, 32); + $tMap->addColumn('APP_NUMBER', 'AppNumber', 'int', CreoleTypes::INTEGER, false, null); + $tMap->addColumn('DEL_INDEX', 'DelIndex', 'int', CreoleTypes::INTEGER, true, null); $tMap->addColumn('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32); $tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32); + $tMap->addColumn('TAS_ID', 'TasId', 'int', CreoleTypes::INTEGER, false, null); + $tMap->addColumn('GRP_UID', 'GrpUid', 'string', CreoleTypes::LONGVARCHAR, true, null); } // doBuild() diff --git a/workflow/engine/classes/model/om/BaseAddonsManager.php b/workflow/engine/classes/model/om/BaseAddonsManager.php index d24bda7d5..90b606b0d 100644 --- a/workflow/engine/classes/model/om/BaseAddonsManager.php +++ b/workflow/engine/classes/model/om/BaseAddonsManager.php @@ -67,7 +67,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent * The value for the addon_state field. * @var string */ - protected $addon_state; + protected $addon_state = ''; /** * The value for the addon_state_changed field. @@ -536,7 +536,7 @@ abstract class BaseAddonsManager extends BaseObject implements Persistent $v = (string) $v; } - if ($this->addon_state !== $v) { + if ($this->addon_state !== $v || $v === '') { $this->addon_state = $v; $this->modifiedColumns[] = AddonsManagerPeer::ADDON_STATE; } diff --git a/workflow/engine/classes/model/om/BaseAppAssignSelfServiceValue.php b/workflow/engine/classes/model/om/BaseAppAssignSelfServiceValue.php index 963b56564..921c67ddb 100644 --- a/workflow/engine/classes/model/om/BaseAppAssignSelfServiceValue.php +++ b/workflow/engine/classes/model/om/BaseAppAssignSelfServiceValue.php @@ -39,6 +39,12 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi */ protected $app_uid; + /** + * The value for the app_number field. + * @var int + */ + protected $app_number = 0; + /** * The value for the del_index field. * @var int @@ -57,6 +63,12 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi */ protected $tas_uid; + /** + * The value for the tas_id field. + * @var int + */ + protected $tas_id = 0; + /** * The value for the grp_uid field. * @var string @@ -99,6 +111,17 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi return $this->app_uid; } + /** + * Get the [app_number] column value. + * + * @return int + */ + public function getAppNumber() + { + + return $this->app_number; + } + /** * Get the [del_index] column value. * @@ -132,6 +155,17 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi return $this->tas_uid; } + /** + * Get the [tas_id] column value. + * + * @return int + */ + public function getTasId() + { + + return $this->tas_id; + } + /** * Get the [grp_uid] column value. * @@ -187,6 +221,28 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi } // setAppUid() + /** + * Set the value of [app_number] column. + * + * @param int $v new value + * @return void + */ + public function setAppNumber($v) + { + + // Since the native PHP type for this column is integer, + // we will cast the input value to an int (if it is not). + if ($v !== null && !is_int($v) && is_numeric($v)) { + $v = (int) $v; + } + + if ($this->app_number !== $v || $v === 0) { + $this->app_number = $v; + $this->modifiedColumns[] = AppAssignSelfServiceValuePeer::APP_NUMBER; + } + + } // setAppNumber() + /** * Set the value of [del_index] column. * @@ -253,6 +309,28 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi } // setTasUid() + /** + * Set the value of [tas_id] column. + * + * @param int $v new value + * @return void + */ + public function setTasId($v) + { + + // Since the native PHP type for this column is integer, + // we will cast the input value to an int (if it is not). + if ($v !== null && !is_int($v) && is_numeric($v)) { + $v = (int) $v; + } + + if ($this->tas_id !== $v || $v === 0) { + $this->tas_id = $v; + $this->modifiedColumns[] = AppAssignSelfServiceValuePeer::TAS_ID; + } + + } // setTasId() + /** * Set the value of [grp_uid] column. * @@ -296,20 +374,24 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi $this->app_uid = $rs->getString($startcol + 1); - $this->del_index = $rs->getInt($startcol + 2); + $this->app_number = $rs->getInt($startcol + 2); - $this->pro_uid = $rs->getString($startcol + 3); + $this->del_index = $rs->getInt($startcol + 3); - $this->tas_uid = $rs->getString($startcol + 4); + $this->pro_uid = $rs->getString($startcol + 4); - $this->grp_uid = $rs->getString($startcol + 5); + $this->tas_uid = $rs->getString($startcol + 5); + + $this->tas_id = $rs->getInt($startcol + 6); + + $this->grp_uid = $rs->getString($startcol + 7); $this->resetModified(); $this->setNew(false); // FIXME - using NUM_COLUMNS may be clearer. - return $startcol + 6; // 6 = AppAssignSelfServiceValuePeer::NUM_COLUMNS - AppAssignSelfServiceValuePeer::NUM_LAZY_LOAD_COLUMNS). + return $startcol + 8; // 8 = AppAssignSelfServiceValuePeer::NUM_COLUMNS - AppAssignSelfServiceValuePeer::NUM_LAZY_LOAD_COLUMNS). } catch (Exception $e) { throw new PropelException("Error populating AppAssignSelfServiceValue object", $e); @@ -522,15 +604,21 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi return $this->getAppUid(); break; case 2: - return $this->getDelIndex(); + return $this->getAppNumber(); break; case 3: - return $this->getProUid(); + return $this->getDelIndex(); break; case 4: - return $this->getTasUid(); + return $this->getProUid(); break; case 5: + return $this->getTasUid(); + break; + case 6: + return $this->getTasId(); + break; + case 7: return $this->getGrpUid(); break; default: @@ -555,10 +643,12 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi $result = array( $keys[0] => $this->getId(), $keys[1] => $this->getAppUid(), - $keys[2] => $this->getDelIndex(), - $keys[3] => $this->getProUid(), - $keys[4] => $this->getTasUid(), - $keys[5] => $this->getGrpUid(), + $keys[2] => $this->getAppNumber(), + $keys[3] => $this->getDelIndex(), + $keys[4] => $this->getProUid(), + $keys[5] => $this->getTasUid(), + $keys[6] => $this->getTasId(), + $keys[7] => $this->getGrpUid(), ); return $result; } @@ -597,15 +687,21 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi $this->setAppUid($value); break; case 2: - $this->setDelIndex($value); + $this->setAppNumber($value); break; case 3: - $this->setProUid($value); + $this->setDelIndex($value); break; case 4: - $this->setTasUid($value); + $this->setProUid($value); break; case 5: + $this->setTasUid($value); + break; + case 6: + $this->setTasId($value); + break; + case 7: $this->setGrpUid($value); break; } // switch() @@ -640,19 +736,27 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi } if (array_key_exists($keys[2], $arr)) { - $this->setDelIndex($arr[$keys[2]]); + $this->setAppNumber($arr[$keys[2]]); } if (array_key_exists($keys[3], $arr)) { - $this->setProUid($arr[$keys[3]]); + $this->setDelIndex($arr[$keys[3]]); } if (array_key_exists($keys[4], $arr)) { - $this->setTasUid($arr[$keys[4]]); + $this->setProUid($arr[$keys[4]]); } if (array_key_exists($keys[5], $arr)) { - $this->setGrpUid($arr[$keys[5]]); + $this->setTasUid($arr[$keys[5]]); + } + + if (array_key_exists($keys[6], $arr)) { + $this->setTasId($arr[$keys[6]]); + } + + if (array_key_exists($keys[7], $arr)) { + $this->setGrpUid($arr[$keys[7]]); } } @@ -674,6 +778,10 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi $criteria->add(AppAssignSelfServiceValuePeer::APP_UID, $this->app_uid); } + if ($this->isColumnModified(AppAssignSelfServiceValuePeer::APP_NUMBER)) { + $criteria->add(AppAssignSelfServiceValuePeer::APP_NUMBER, $this->app_number); + } + if ($this->isColumnModified(AppAssignSelfServiceValuePeer::DEL_INDEX)) { $criteria->add(AppAssignSelfServiceValuePeer::DEL_INDEX, $this->del_index); } @@ -686,6 +794,10 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi $criteria->add(AppAssignSelfServiceValuePeer::TAS_UID, $this->tas_uid); } + if ($this->isColumnModified(AppAssignSelfServiceValuePeer::TAS_ID)) { + $criteria->add(AppAssignSelfServiceValuePeer::TAS_ID, $this->tas_id); + } + if ($this->isColumnModified(AppAssignSelfServiceValuePeer::GRP_UID)) { $criteria->add(AppAssignSelfServiceValuePeer::GRP_UID, $this->grp_uid); } @@ -746,12 +858,16 @@ abstract class BaseAppAssignSelfServiceValue extends BaseObject implements Persi $copyObj->setAppUid($this->app_uid); + $copyObj->setAppNumber($this->app_number); + $copyObj->setDelIndex($this->del_index); $copyObj->setProUid($this->pro_uid); $copyObj->setTasUid($this->tas_uid); + $copyObj->setTasId($this->tas_id); + $copyObj->setGrpUid($this->grp_uid); diff --git a/workflow/engine/classes/model/om/BaseAppAssignSelfServiceValuePeer.php b/workflow/engine/classes/model/om/BaseAppAssignSelfServiceValuePeer.php index 2019d8348..5d319a0a8 100644 --- a/workflow/engine/classes/model/om/BaseAppAssignSelfServiceValuePeer.php +++ b/workflow/engine/classes/model/om/BaseAppAssignSelfServiceValuePeer.php @@ -25,7 +25,7 @@ abstract class BaseAppAssignSelfServiceValuePeer const CLASS_DEFAULT = 'classes.model.AppAssignSelfServiceValue'; /** The total number of columns. */ - const NUM_COLUMNS = 6; + const NUM_COLUMNS = 8; /** The number of lazy-loaded columns. */ const NUM_LAZY_LOAD_COLUMNS = 0; @@ -37,6 +37,9 @@ abstract class BaseAppAssignSelfServiceValuePeer /** the column name for the APP_UID field */ const APP_UID = 'APP_ASSIGN_SELF_SERVICE_VALUE.APP_UID'; + /** the column name for the APP_NUMBER field */ + const APP_NUMBER = 'APP_ASSIGN_SELF_SERVICE_VALUE.APP_NUMBER'; + /** the column name for the DEL_INDEX field */ const DEL_INDEX = 'APP_ASSIGN_SELF_SERVICE_VALUE.DEL_INDEX'; @@ -46,6 +49,9 @@ abstract class BaseAppAssignSelfServiceValuePeer /** the column name for the TAS_UID field */ const TAS_UID = 'APP_ASSIGN_SELF_SERVICE_VALUE.TAS_UID'; + /** the column name for the TAS_ID field */ + const TAS_ID = 'APP_ASSIGN_SELF_SERVICE_VALUE.TAS_ID'; + /** the column name for the GRP_UID field */ const GRP_UID = 'APP_ASSIGN_SELF_SERVICE_VALUE.GRP_UID'; @@ -60,10 +66,10 @@ abstract class BaseAppAssignSelfServiceValuePeer * e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id' */ private static $fieldNames = array ( - BasePeer::TYPE_PHPNAME => array ('Id', 'AppUid', 'DelIndex', 'ProUid', 'TasUid', 'GrpUid', ), - BasePeer::TYPE_COLNAME => array (AppAssignSelfServiceValuePeer::ID, AppAssignSelfServiceValuePeer::APP_UID, AppAssignSelfServiceValuePeer::DEL_INDEX, AppAssignSelfServiceValuePeer::PRO_UID, AppAssignSelfServiceValuePeer::TAS_UID, AppAssignSelfServiceValuePeer::GRP_UID, ), - BasePeer::TYPE_FIELDNAME => array ('ID', 'APP_UID', 'DEL_INDEX', 'PRO_UID', 'TAS_UID', 'GRP_UID', ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, ) + BasePeer::TYPE_PHPNAME => array ('Id', 'AppUid', 'AppNumber', 'DelIndex', 'ProUid', 'TasUid', 'TasId', 'GrpUid', ), + BasePeer::TYPE_COLNAME => array (AppAssignSelfServiceValuePeer::ID, AppAssignSelfServiceValuePeer::APP_UID, AppAssignSelfServiceValuePeer::APP_NUMBER, AppAssignSelfServiceValuePeer::DEL_INDEX, AppAssignSelfServiceValuePeer::PRO_UID, AppAssignSelfServiceValuePeer::TAS_UID, AppAssignSelfServiceValuePeer::TAS_ID, AppAssignSelfServiceValuePeer::GRP_UID, ), + BasePeer::TYPE_FIELDNAME => array ('ID', 'APP_UID', 'APP_NUMBER', 'DEL_INDEX', 'PRO_UID', 'TAS_UID', 'TAS_ID', 'GRP_UID', ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, ) ); /** @@ -73,10 +79,10 @@ abstract class BaseAppAssignSelfServiceValuePeer * e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0 */ private static $fieldKeys = array ( - BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'AppUid' => 1, 'DelIndex' => 2, 'ProUid' => 3, 'TasUid' => 4, 'GrpUid' => 5, ), - BasePeer::TYPE_COLNAME => array (AppAssignSelfServiceValuePeer::ID => 0, AppAssignSelfServiceValuePeer::APP_UID => 1, AppAssignSelfServiceValuePeer::DEL_INDEX => 2, AppAssignSelfServiceValuePeer::PRO_UID => 3, AppAssignSelfServiceValuePeer::TAS_UID => 4, AppAssignSelfServiceValuePeer::GRP_UID => 5, ), - BasePeer::TYPE_FIELDNAME => array ('ID' => 0, 'APP_UID' => 1, 'DEL_INDEX' => 2, 'PRO_UID' => 3, 'TAS_UID' => 4, 'GRP_UID' => 5, ), - BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, ) + BasePeer::TYPE_PHPNAME => array ('Id' => 0, 'AppUid' => 1, 'AppNumber' => 2, 'DelIndex' => 3, 'ProUid' => 4, 'TasUid' => 5, 'TasId' => 6, 'GrpUid' => 7, ), + BasePeer::TYPE_COLNAME => array (AppAssignSelfServiceValuePeer::ID => 0, AppAssignSelfServiceValuePeer::APP_UID => 1, AppAssignSelfServiceValuePeer::APP_NUMBER => 2, AppAssignSelfServiceValuePeer::DEL_INDEX => 3, AppAssignSelfServiceValuePeer::PRO_UID => 4, AppAssignSelfServiceValuePeer::TAS_UID => 5, AppAssignSelfServiceValuePeer::TAS_ID => 6, AppAssignSelfServiceValuePeer::GRP_UID => 7, ), + BasePeer::TYPE_FIELDNAME => array ('ID' => 0, 'APP_UID' => 1, 'APP_NUMBER' => 2, 'DEL_INDEX' => 3, 'PRO_UID' => 4, 'TAS_UID' => 5, 'TAS_ID' => 6, 'GRP_UID' => 7, ), + BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, 5, 6, 7, ) ); /** @@ -181,12 +187,16 @@ abstract class BaseAppAssignSelfServiceValuePeer $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::APP_UID); + $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::APP_NUMBER); + $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::DEL_INDEX); $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::PRO_UID); $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::TAS_UID); + $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::TAS_ID); + $criteria->addSelectColumn(AppAssignSelfServiceValuePeer::GRP_UID); } diff --git a/workflow/engine/config/schema.xml b/workflow/engine/config/schema.xml index e862f4eeb..74d40bc8e 100644 --- a/workflow/engine/config/schema.xml +++ b/workflow/engine/config/schema.xml @@ -4230,9 +4230,11 @@ + + diff --git a/workflow/engine/data/mysql/schema.sql b/workflow/engine/data/mysql/schema.sql index 934aa420f..a0a1b1d13 100644 --- a/workflow/engine/data/mysql/schema.sql +++ b/workflow/engine/data/mysql/schema.sql @@ -281,13 +281,13 @@ DROP TABLE IF EXISTS `GROUPWF`; CREATE TABLE `GROUPWF` ( `GRP_UID` VARCHAR(32) NOT NULL, - `GRP_ID` INTEGER NOT NULL AUTO_INCREMENT, + `GRP_ID` INTEGER NOT NULL AUTO_INCREMENT, `GRP_TITLE` MEDIUMTEXT NOT NULL, `GRP_STATUS` CHAR(8) default 'ACTIVE' NOT NULL, `GRP_LDAP_DN` VARCHAR(255) default '' NOT NULL, `GRP_UX` VARCHAR(128) default 'NORMAL', PRIMARY KEY (`GRP_UID`), - UNIQUE KEY `GRP_ID` (`GRP_ID`) + UNIQUE KEY `GRP_ID` (`GRP_ID`) )ENGINE=InnoDB DEFAULT CHARSET='utf8'; #----------------------------------------------------------------------------- #-- GROUP_USER @@ -2354,9 +2354,11 @@ CREATE TABLE `APP_ASSIGN_SELF_SERVICE_VALUE` ( `ID` INTEGER NOT NULL AUTO_INCREMENT, `APP_UID` VARCHAR(32) NOT NULL, + `APP_NUMBER` INTEGER default 0, `DEL_INDEX` INTEGER default 0 NOT NULL, `PRO_UID` VARCHAR(32) NOT NULL, `TAS_UID` VARCHAR(32) NOT NULL, + `TAS_ID` INTEGER default 0, `GRP_UID` MEDIUMTEXT NOT NULL, PRIMARY KEY (`ID`) )ENGINE=InnoDB DEFAULT CHARSET='utf8'; @@ -2372,7 +2374,7 @@ CREATE TABLE `APP_ASSIGN_SELF_SERVICE_VALUE_GROUP` `ID` INTEGER default 0 NOT NULL, `GRP_UID` VARCHAR(32) NOT NULL, `ASSIGNEE_ID` INTEGER default 0, - `ASSIGNEE_TYPE` INTEGER default 0 NOT NULL, + `ASSIGNEE_TYPE` INTEGER default 0 NOT NULL, KEY `indexId`(`ID`), KEY `INDEX_ASSIGNEE_ID`(`ASSIGNEE_ID`) )ENGINE=InnoDB DEFAULT CHARSET='utf8';