Files
luos/workflow/engine/classes/model/map/ProcessMapBuilder.php

163 lines
6.4 KiB
PHP
Raw Normal View History

2010-12-02 23:34:41 +00:00
<?php
require_once 'propel/map/MapBuilder.php';
include_once 'creole/CreoleTypes.php';
/**
* This class adds structure of 'PROCESS' table to 'workflow' DatabaseMap object.
*
*
*
* These statically-built map classes are used by Propel to do runtime db structure discovery.
* For example, the createSelectSql() method checks the type of a given column used in an
* ORDER BY clause to know whether it needs to apply SQL to make the ORDER BY case-insensitive
* (i.e. if it's a text column type).
*
* @package workflow.classes.model.map
2010-12-02 23:34:41 +00:00
*/
class ProcessMapBuilder
{
2010-12-02 23:34:41 +00:00
/**
* The (dot-path) name of this class
*/
const CLASS_NAME = 'classes.model.map.ProcessMapBuilder';
2010-12-02 23:34:41 +00:00
/**
* The database map.
*/
private $dbMap;
2010-12-02 23:34:41 +00:00
/**
* Tells us if this DatabaseMapBuilder is built so that we
* don't have to re-build it every time.
*
* @return boolean true if this DatabaseMapBuilder is built, false otherwise.
*/
public function isBuilt()
{
return ($this->dbMap !== null);
}
2010-12-02 23:34:41 +00:00
/**
* Gets the databasemap this map builder built.
*
* @return the databasemap
*/
public function getDatabaseMap()
{
return $this->dbMap;
}
2010-12-02 23:34:41 +00:00
/**
* The doBuild() method builds the DatabaseMap
*
* @return void
* @throws PropelException
*/
public function doBuild()
{
$this->dbMap = Propel::getDatabaseMap('workflow');
2010-12-02 23:34:41 +00:00
$tMap = $this->dbMap->addTable('PROCESS');
$tMap->setPhpName('Process');
2010-12-02 23:34:41 +00:00
2017-01-09 17:13:48 -04:00
$tMap->setUseIdGenerator(true);
2010-12-02 23:34:41 +00:00
$tMap->addPrimaryKey('PRO_UID', 'ProUid', 'string', CreoleTypes::VARCHAR, true, 32);
2010-12-02 23:34:41 +00:00
2017-01-09 17:13:48 -04:00
$tMap->addColumn('PRO_ID', 'ProId', 'int', CreoleTypes::INTEGER, true, null);
$tMap->addColumn('PRO_TITLE', 'ProTitle', 'string', CreoleTypes::LONGVARCHAR, true, null);
$tMap->addColumn('PRO_DESCRIPTION', 'ProDescription', 'string', CreoleTypes::LONGVARCHAR, false, null);
$tMap->addColumn('PRO_PARENT', 'ProParent', 'string', CreoleTypes::VARCHAR, true, 32);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_TIME', 'ProTime', 'double', CreoleTypes::DOUBLE, true, null);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_TIMEUNIT', 'ProTimeunit', 'string', CreoleTypes::VARCHAR, true, 20);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_STATUS', 'ProStatus', 'string', CreoleTypes::VARCHAR, true, 20);
2010-12-02 23:34:41 +00:00
2019-07-23 14:23:59 -04:00
$tMap->addColumn('PRO_STATUS_ID', 'ProStatusId', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addColumn('PRO_TYPE_DAY', 'ProTypeDay', 'string', CreoleTypes::CHAR, true, 1);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_TYPE', 'ProType', 'string', CreoleTypes::VARCHAR, true, 256);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_ASSIGNMENT', 'ProAssignment', 'string', CreoleTypes::VARCHAR, true, 20);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_SHOW_MAP', 'ProShowMap', 'int', CreoleTypes::TINYINT, true, null);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_SHOW_MESSAGE', 'ProShowMessage', 'int', CreoleTypes::TINYINT, true, null);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_SUBPROCESS', 'ProSubprocess', 'int', CreoleTypes::TINYINT, true, null);
$tMap->addColumn('PRO_TRI_CREATE', 'ProTriCreate', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRO_TRI_OPEN', 'ProTriOpen', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRO_TRI_DELETED', 'ProTriDeleted', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRO_TRI_CANCELED', 'ProTriCanceled', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRO_TRI_PAUSED', 'ProTriPaused', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRO_TRI_REASSIGNED', 'ProTriReassigned', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRO_TRI_UNPAUSED', 'ProTriUnpaused', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRO_TYPE_PROCESS', 'ProTypeProcess', 'string', CreoleTypes::VARCHAR, true, 32);
$tMap->addColumn('PRO_SHOW_DELEGATE', 'ProShowDelegate', 'int', CreoleTypes::TINYINT, true, null);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_SHOW_DYNAFORM', 'ProShowDynaform', 'int', CreoleTypes::TINYINT, true, null);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_CATEGORY', 'ProCategory', 'string', CreoleTypes::VARCHAR, true, 48);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_SUB_CATEGORY', 'ProSubCategory', 'string', CreoleTypes::VARCHAR, true, 48);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_INDUSTRY', 'ProIndustry', 'int', CreoleTypes::INTEGER, true, null);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_UPDATE_DATE', 'ProUpdateDate', 'int', CreoleTypes::TIMESTAMP, false, null);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_CREATE_DATE', 'ProCreateDate', 'int', CreoleTypes::TIMESTAMP, true, null);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_CREATE_USER', 'ProCreateUser', 'string', CreoleTypes::VARCHAR, true, 32);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_HEIGHT', 'ProHeight', 'int', CreoleTypes::INTEGER, true, null);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_WIDTH', 'ProWidth', 'int', CreoleTypes::INTEGER, true, null);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_TITLE_X', 'ProTitleX', 'int', CreoleTypes::INTEGER, true, null);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_TITLE_Y', 'ProTitleY', 'int', CreoleTypes::INTEGER, true, null);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_DEBUG', 'ProDebug', 'int', CreoleTypes::INTEGER, true, null);
2010-12-02 23:34:41 +00:00
$tMap->addColumn('PRO_DYNAFORMS', 'ProDynaforms', 'string', CreoleTypes::LONGVARCHAR, false, null);
$tMap->addColumn('PRO_DERIVATION_SCREEN_TPL', 'ProDerivationScreenTpl', 'string', CreoleTypes::VARCHAR, false, 128);
$tMap->addColumn('PRO_COST', 'ProCost', 'double', CreoleTypes::DECIMAL, false, 7,2);
$tMap->addColumn('PRO_UNIT_COST', 'ProUnitCost', 'string', CreoleTypes::VARCHAR, false, 50);
$tMap->addColumn('PRO_ITEE', 'ProItee', 'int', CreoleTypes::INTEGER, true, null);
HOR-1319 "Registros corruptos: Crea 2 registros de un Elemento..." SOLVED Issue: Registros corruptos: Crea 2 registros de un Elemento con 2 Tareas, se debe borrar los q no se usan Cause: - El problema se presenta cuando se tiene la combinacion gateway-to-gateway y al hacer (por ejemplo) un movimiento de algun elemento del proceso y posteriormente guardarlo. Esto ocasiona que se creen registros corruptos en las tablas TASK, ROUTE y ELEMENT_TASK_RELATION - Este problema fue ocasionado por: > Commit: 137a4ea2237573a54964414f477e13a4f5c76a5d, Card: PMLOCAL-3840 El commit 137a4ea2237573a54964414f477e13a4f5c76a5d tambien origino los siguientes issues: > Commit: 6bb8ad6cc05a3d8e671baa5d358b409c1f2710f6, Card: HOR-421 > Commit: 9e8030904a4c0f4f670fc159c9220fead10a5859, Card: PMLOCAL-4270 > Commit: d3296132bf13f81aee12c0f7696d5952d79ee323, Card: HOR-1383 > Commit: b58dc888c1f54d981fc329c3a35cb4294785e0f7, Card: HOR-1358 Solution: Se revirtieron los cambios de los commits involucrados, con el siguiente detalle: - Commit 137a4ea2237573a54964414f477e13a4f5c76a5d: Se revirtio el cambio; se soluciono el problema problema planteado en el card - Commit 6bb8ad6cc05a3d8e671baa5d358b409c1f2710f6: Se revirtio el cambio; se soluciono el problema problema planteado en el card - Commit 9e8030904a4c0f4f670fc159c9220fead10a5859: Se revirtio el cambio - Commit d3296132bf13f81aee12c0f7696d5952d79ee323: Se revirtio el cambio - Commit b58dc888c1f54d981fc329c3a35cb4294785e0f7: Se revirtio el cambio; se soluciono el problema planteado segun el analisis del commit
2016-07-26 15:34:52 -04:00
$tMap->addColumn('PRO_ACTION_DONE', 'ProActionDone', 'string', CreoleTypes::LONGVARCHAR, false, null);
2019-07-23 14:23:59 -04:00
$tMap->addColumn('CATEGORY_ID', 'CategoryId', 'int', CreoleTypes::INTEGER, false, null);
$tMap->addValidator('PRO_TIMEUNIT', 'validValues', 'propel.validator.ValidValuesValidator', 'WEEKS|MONTHS|DAYS|HOURS|MINUTES', 'Please select a valid Time Unit.');
2010-12-02 23:34:41 +00:00
$tMap->addValidator('PRO_STATUS', 'validValues', 'propel.validator.ValidValuesValidator', 'ACTIVE|INACTIVE|DISABLED', 'Please select a valid Process Status.');
2010-12-02 23:34:41 +00:00
$tMap->addValidator('PRO_ASSIGNMENT', 'validValues', 'propel.validator.ValidValuesValidator', 'TRUE|FALSE', 'Please select a valid Process Assignment');
2010-12-02 23:34:41 +00:00
} // doBuild()
2010-12-02 23:34:41 +00:00
} // ProcessMapBuilder