Merge changes manually due to conflicts with the upstream master branch.
This commit is contained in:
5
workflow/engine/classes/model/ElementTaskRelation.php
Normal file
5
workflow/engine/classes/model/ElementTaskRelation.php
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
class ElementTaskRelation extends BaseElementTaskRelation
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?php
|
||||||
|
class ElementTaskRelationPeer extends BaseElementTaskRelationPeer
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
class MessageEventTaskRelation extends BaseMessageEventTaskRelation
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
<?php
|
|
||||||
class MessageEventTaskRelationPeer extends BaseMessageEventTaskRelationPeer
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@@ -5,7 +5,7 @@ include_once 'creole/CreoleTypes.php';
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class adds structure of 'MESSAGE_EVENT_TASK_RELATION' table to 'workflow' DatabaseMap object.
|
* This class adds structure of 'ELEMENT_TASK_RELATION' table to 'workflow' DatabaseMap object.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
@@ -16,13 +16,13 @@ include_once 'creole/CreoleTypes.php';
|
|||||||
*
|
*
|
||||||
* @package workflow.classes.model.map
|
* @package workflow.classes.model.map
|
||||||
*/
|
*/
|
||||||
class MessageEventTaskRelationMapBuilder
|
class ElementTaskRelationMapBuilder
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The (dot-path) name of this class
|
* The (dot-path) name of this class
|
||||||
*/
|
*/
|
||||||
const CLASS_NAME = 'classes.model.map.MessageEventTaskRelationMapBuilder';
|
const CLASS_NAME = 'classes.model.map.ElementTaskRelationMapBuilder';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The database map.
|
* The database map.
|
||||||
@@ -60,19 +60,21 @@ class MessageEventTaskRelationMapBuilder
|
|||||||
{
|
{
|
||||||
$this->dbMap = Propel::getDatabaseMap('workflow');
|
$this->dbMap = Propel::getDatabaseMap('workflow');
|
||||||
|
|
||||||
$tMap = $this->dbMap->addTable('MESSAGE_EVENT_TASK_RELATION');
|
$tMap = $this->dbMap->addTable('ELEMENT_TASK_RELATION');
|
||||||
$tMap->setPhpName('MessageEventTaskRelation');
|
$tMap->setPhpName('ElementTaskRelation');
|
||||||
|
|
||||||
$tMap->setUseIdGenerator(false);
|
$tMap->setUseIdGenerator(false);
|
||||||
|
|
||||||
$tMap->addPrimaryKey('MSGETR_UID', 'MsgetrUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
$tMap->addPrimaryKey('ETR_UID', 'EtrUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
$tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
$tMap->addColumn('PRJ_UID', 'PrjUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
$tMap->addColumn('EVN_UID', 'EvnUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
$tMap->addColumn('ELEMENT_UID', 'ElementUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
|
$tMap->addColumn('ELEMENT_TYPE', 'ElementType', 'string', CreoleTypes::VARCHAR, true, 50);
|
||||||
|
|
||||||
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
$tMap->addColumn('TAS_UID', 'TasUid', 'string', CreoleTypes::VARCHAR, true, 32);
|
||||||
|
|
||||||
} // doBuild()
|
} // doBuild()
|
||||||
|
|
||||||
} // MessageEventTaskRelationMapBuilder
|
} // ElementTaskRelationMapBuilder
|
||||||
@@ -7,31 +7,31 @@ require_once 'propel/om/Persistent.php';
|
|||||||
|
|
||||||
include_once 'propel/util/Criteria.php';
|
include_once 'propel/util/Criteria.php';
|
||||||
|
|
||||||
include_once 'classes/model/MessageEventTaskRelationPeer.php';
|
include_once 'classes/model/ElementTaskRelationPeer.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base class that represents a row from the 'MESSAGE_EVENT_TASK_RELATION' table.
|
* Base class that represents a row from the 'ELEMENT_TASK_RELATION' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @package workflow.classes.model.om
|
* @package workflow.classes.model.om
|
||||||
*/
|
*/
|
||||||
abstract class BaseMessageEventTaskRelation extends BaseObject implements Persistent
|
abstract class BaseElementTaskRelation extends BaseObject implements Persistent
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Peer class.
|
* The Peer class.
|
||||||
* Instance provides a convenient way of calling static methods on a class
|
* Instance provides a convenient way of calling static methods on a class
|
||||||
* that calling code may not be able to identify.
|
* that calling code may not be able to identify.
|
||||||
* @var MessageEventTaskRelationPeer
|
* @var ElementTaskRelationPeer
|
||||||
*/
|
*/
|
||||||
protected static $peer;
|
protected static $peer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the msgetr_uid field.
|
* The value for the etr_uid field.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $msgetr_uid;
|
protected $etr_uid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the prj_uid field.
|
* The value for the prj_uid field.
|
||||||
@@ -40,10 +40,16 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
protected $prj_uid;
|
protected $prj_uid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the evn_uid field.
|
* The value for the element_uid field.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $evn_uid;
|
protected $element_uid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The value for the element_type field.
|
||||||
|
* @var string
|
||||||
|
*/
|
||||||
|
protected $element_type = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the tas_uid field.
|
* The value for the tas_uid field.
|
||||||
@@ -66,14 +72,14 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
protected $alreadyInValidation = false;
|
protected $alreadyInValidation = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the [msgetr_uid] column value.
|
* Get the [etr_uid] column value.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getMsgetrUid()
|
public function getEtrUid()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->msgetr_uid;
|
return $this->etr_uid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -88,14 +94,25 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the [evn_uid] column value.
|
* Get the [element_uid] column value.
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function getEvnUid()
|
public function getElementUid()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->evn_uid;
|
return $this->element_uid;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get the [element_type] column value.
|
||||||
|
*
|
||||||
|
* @return string
|
||||||
|
*/
|
||||||
|
public function getElementType()
|
||||||
|
{
|
||||||
|
|
||||||
|
return $this->element_type;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -110,12 +127,12 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [msgetr_uid] column.
|
* Set the value of [etr_uid] column.
|
||||||
*
|
*
|
||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setMsgetrUid($v)
|
public function setEtrUid($v)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Since the native PHP type for this column is string,
|
// Since the native PHP type for this column is string,
|
||||||
@@ -124,12 +141,12 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
$v = (string) $v;
|
$v = (string) $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->msgetr_uid !== $v) {
|
if ($this->etr_uid !== $v) {
|
||||||
$this->msgetr_uid = $v;
|
$this->etr_uid = $v;
|
||||||
$this->modifiedColumns[] = MessageEventTaskRelationPeer::MSGETR_UID;
|
$this->modifiedColumns[] = ElementTaskRelationPeer::ETR_UID;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // setMsgetrUid()
|
} // setEtrUid()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [prj_uid] column.
|
* Set the value of [prj_uid] column.
|
||||||
@@ -148,18 +165,18 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
|
|
||||||
if ($this->prj_uid !== $v) {
|
if ($this->prj_uid !== $v) {
|
||||||
$this->prj_uid = $v;
|
$this->prj_uid = $v;
|
||||||
$this->modifiedColumns[] = MessageEventTaskRelationPeer::PRJ_UID;
|
$this->modifiedColumns[] = ElementTaskRelationPeer::PRJ_UID;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // setPrjUid()
|
} // setPrjUid()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [evn_uid] column.
|
* Set the value of [element_uid] column.
|
||||||
*
|
*
|
||||||
* @param string $v new value
|
* @param string $v new value
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setEvnUid($v)
|
public function setElementUid($v)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Since the native PHP type for this column is string,
|
// Since the native PHP type for this column is string,
|
||||||
@@ -168,12 +185,34 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
$v = (string) $v;
|
$v = (string) $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->evn_uid !== $v) {
|
if ($this->element_uid !== $v) {
|
||||||
$this->evn_uid = $v;
|
$this->element_uid = $v;
|
||||||
$this->modifiedColumns[] = MessageEventTaskRelationPeer::EVN_UID;
|
$this->modifiedColumns[] = ElementTaskRelationPeer::ELEMENT_UID;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // setEvnUid()
|
} // setElementUid()
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the value of [element_type] column.
|
||||||
|
*
|
||||||
|
* @param string $v new value
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function setElementType($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->element_type !== $v || $v === '') {
|
||||||
|
$this->element_type = $v;
|
||||||
|
$this->modifiedColumns[] = ElementTaskRelationPeer::ELEMENT_TYPE;
|
||||||
|
}
|
||||||
|
|
||||||
|
} // setElementType()
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the value of [tas_uid] column.
|
* Set the value of [tas_uid] column.
|
||||||
@@ -192,7 +231,7 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
|
|
||||||
if ($this->tas_uid !== $v) {
|
if ($this->tas_uid !== $v) {
|
||||||
$this->tas_uid = $v;
|
$this->tas_uid = $v;
|
||||||
$this->modifiedColumns[] = MessageEventTaskRelationPeer::TAS_UID;
|
$this->modifiedColumns[] = ElementTaskRelationPeer::TAS_UID;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // setTasUid()
|
} // setTasUid()
|
||||||
@@ -214,23 +253,25 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
|
|
||||||
$this->msgetr_uid = $rs->getString($startcol + 0);
|
$this->etr_uid = $rs->getString($startcol + 0);
|
||||||
|
|
||||||
$this->prj_uid = $rs->getString($startcol + 1);
|
$this->prj_uid = $rs->getString($startcol + 1);
|
||||||
|
|
||||||
$this->evn_uid = $rs->getString($startcol + 2);
|
$this->element_uid = $rs->getString($startcol + 2);
|
||||||
|
|
||||||
$this->tas_uid = $rs->getString($startcol + 3);
|
$this->element_type = $rs->getString($startcol + 3);
|
||||||
|
|
||||||
|
$this->tas_uid = $rs->getString($startcol + 4);
|
||||||
|
|
||||||
$this->resetModified();
|
$this->resetModified();
|
||||||
|
|
||||||
$this->setNew(false);
|
$this->setNew(false);
|
||||||
|
|
||||||
// FIXME - using NUM_COLUMNS may be clearer.
|
// FIXME - using NUM_COLUMNS may be clearer.
|
||||||
return $startcol + 4; // 4 = MessageEventTaskRelationPeer::NUM_COLUMNS - MessageEventTaskRelationPeer::NUM_LAZY_LOAD_COLUMNS).
|
return $startcol + 5; // 5 = ElementTaskRelationPeer::NUM_COLUMNS - ElementTaskRelationPeer::NUM_LAZY_LOAD_COLUMNS).
|
||||||
|
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
throw new PropelException("Error populating MessageEventTaskRelation object", $e);
|
throw new PropelException("Error populating ElementTaskRelation object", $e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -250,12 +291,12 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($con === null) {
|
if ($con === null) {
|
||||||
$con = Propel::getConnection(MessageEventTaskRelationPeer::DATABASE_NAME);
|
$con = Propel::getConnection(ElementTaskRelationPeer::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$con->begin();
|
$con->begin();
|
||||||
MessageEventTaskRelationPeer::doDelete($this, $con);
|
ElementTaskRelationPeer::doDelete($this, $con);
|
||||||
$this->setDeleted(true);
|
$this->setDeleted(true);
|
||||||
$con->commit();
|
$con->commit();
|
||||||
} catch (PropelException $e) {
|
} catch (PropelException $e) {
|
||||||
@@ -281,7 +322,7 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($con === null) {
|
if ($con === null) {
|
||||||
$con = Propel::getConnection(MessageEventTaskRelationPeer::DATABASE_NAME);
|
$con = Propel::getConnection(ElementTaskRelationPeer::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -316,14 +357,14 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
// If this object has been modified, then save it to the database.
|
// If this object has been modified, then save it to the database.
|
||||||
if ($this->isModified()) {
|
if ($this->isModified()) {
|
||||||
if ($this->isNew()) {
|
if ($this->isNew()) {
|
||||||
$pk = MessageEventTaskRelationPeer::doInsert($this, $con);
|
$pk = ElementTaskRelationPeer::doInsert($this, $con);
|
||||||
$affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
|
$affectedRows += 1; // we are assuming that there is only 1 row per doInsert() which
|
||||||
// should always be true here (even though technically
|
// should always be true here (even though technically
|
||||||
// BasePeer::doInsert() can insert multiple rows).
|
// BasePeer::doInsert() can insert multiple rows).
|
||||||
|
|
||||||
$this->setNew(false);
|
$this->setNew(false);
|
||||||
} else {
|
} else {
|
||||||
$affectedRows += MessageEventTaskRelationPeer::doUpdate($this, $con);
|
$affectedRows += ElementTaskRelationPeer::doUpdate($this, $con);
|
||||||
}
|
}
|
||||||
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
|
$this->resetModified(); // [HL] After being saved an object is no longer 'modified'
|
||||||
}
|
}
|
||||||
@@ -394,7 +435,7 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
$failureMap = array();
|
$failureMap = array();
|
||||||
|
|
||||||
|
|
||||||
if (($retval = MessageEventTaskRelationPeer::doValidate($this, $columns)) !== true) {
|
if (($retval = ElementTaskRelationPeer::doValidate($this, $columns)) !== true) {
|
||||||
$failureMap = array_merge($failureMap, $retval);
|
$failureMap = array_merge($failureMap, $retval);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -417,7 +458,7 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
*/
|
*/
|
||||||
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
|
public function getByName($name, $type = BasePeer::TYPE_PHPNAME)
|
||||||
{
|
{
|
||||||
$pos = MessageEventTaskRelationPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
|
$pos = ElementTaskRelationPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
|
||||||
return $this->getByPosition($pos);
|
return $this->getByPosition($pos);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -432,15 +473,18 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
{
|
{
|
||||||
switch($pos) {
|
switch($pos) {
|
||||||
case 0:
|
case 0:
|
||||||
return $this->getMsgetrUid();
|
return $this->getEtrUid();
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
return $this->getPrjUid();
|
return $this->getPrjUid();
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
return $this->getEvnUid();
|
return $this->getElementUid();
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
return $this->getElementType();
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
return $this->getTasUid();
|
return $this->getTasUid();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@@ -461,12 +505,13 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
*/
|
*/
|
||||||
public function toArray($keyType = BasePeer::TYPE_PHPNAME)
|
public function toArray($keyType = BasePeer::TYPE_PHPNAME)
|
||||||
{
|
{
|
||||||
$keys = MessageEventTaskRelationPeer::getFieldNames($keyType);
|
$keys = ElementTaskRelationPeer::getFieldNames($keyType);
|
||||||
$result = array(
|
$result = array(
|
||||||
$keys[0] => $this->getMsgetrUid(),
|
$keys[0] => $this->getEtrUid(),
|
||||||
$keys[1] => $this->getPrjUid(),
|
$keys[1] => $this->getPrjUid(),
|
||||||
$keys[2] => $this->getEvnUid(),
|
$keys[2] => $this->getElementUid(),
|
||||||
$keys[3] => $this->getTasUid(),
|
$keys[3] => $this->getElementType(),
|
||||||
|
$keys[4] => $this->getTasUid(),
|
||||||
);
|
);
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
@@ -483,7 +528,7 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
*/
|
*/
|
||||||
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
|
public function setByName($name, $value, $type = BasePeer::TYPE_PHPNAME)
|
||||||
{
|
{
|
||||||
$pos = MessageEventTaskRelationPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
|
$pos = ElementTaskRelationPeer::translateFieldName($name, $type, BasePeer::TYPE_NUM);
|
||||||
return $this->setByPosition($pos, $value);
|
return $this->setByPosition($pos, $value);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -499,15 +544,18 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
{
|
{
|
||||||
switch($pos) {
|
switch($pos) {
|
||||||
case 0:
|
case 0:
|
||||||
$this->setMsgetrUid($value);
|
$this->setEtrUid($value);
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
$this->setPrjUid($value);
|
$this->setPrjUid($value);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
$this->setEvnUid($value);
|
$this->setElementUid($value);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
|
$this->setElementType($value);
|
||||||
|
break;
|
||||||
|
case 4:
|
||||||
$this->setTasUid($value);
|
$this->setTasUid($value);
|
||||||
break;
|
break;
|
||||||
} // switch()
|
} // switch()
|
||||||
@@ -531,10 +579,10 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
*/
|
*/
|
||||||
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
|
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
|
||||||
{
|
{
|
||||||
$keys = MessageEventTaskRelationPeer::getFieldNames($keyType);
|
$keys = ElementTaskRelationPeer::getFieldNames($keyType);
|
||||||
|
|
||||||
if (array_key_exists($keys[0], $arr)) {
|
if (array_key_exists($keys[0], $arr)) {
|
||||||
$this->setMsgetrUid($arr[$keys[0]]);
|
$this->setEtrUid($arr[$keys[0]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists($keys[1], $arr)) {
|
if (array_key_exists($keys[1], $arr)) {
|
||||||
@@ -542,11 +590,15 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists($keys[2], $arr)) {
|
if (array_key_exists($keys[2], $arr)) {
|
||||||
$this->setEvnUid($arr[$keys[2]]);
|
$this->setElementUid($arr[$keys[2]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists($keys[3], $arr)) {
|
if (array_key_exists($keys[3], $arr)) {
|
||||||
$this->setTasUid($arr[$keys[3]]);
|
$this->setElementType($arr[$keys[3]]);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (array_key_exists($keys[4], $arr)) {
|
||||||
|
$this->setTasUid($arr[$keys[4]]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -558,22 +610,26 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
*/
|
*/
|
||||||
public function buildCriteria()
|
public function buildCriteria()
|
||||||
{
|
{
|
||||||
$criteria = new Criteria(MessageEventTaskRelationPeer::DATABASE_NAME);
|
$criteria = new Criteria(ElementTaskRelationPeer::DATABASE_NAME);
|
||||||
|
|
||||||
if ($this->isColumnModified(MessageEventTaskRelationPeer::MSGETR_UID)) {
|
if ($this->isColumnModified(ElementTaskRelationPeer::ETR_UID)) {
|
||||||
$criteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $this->msgetr_uid);
|
$criteria->add(ElementTaskRelationPeer::ETR_UID, $this->etr_uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isColumnModified(MessageEventTaskRelationPeer::PRJ_UID)) {
|
if ($this->isColumnModified(ElementTaskRelationPeer::PRJ_UID)) {
|
||||||
$criteria->add(MessageEventTaskRelationPeer::PRJ_UID, $this->prj_uid);
|
$criteria->add(ElementTaskRelationPeer::PRJ_UID, $this->prj_uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isColumnModified(MessageEventTaskRelationPeer::EVN_UID)) {
|
if ($this->isColumnModified(ElementTaskRelationPeer::ELEMENT_UID)) {
|
||||||
$criteria->add(MessageEventTaskRelationPeer::EVN_UID, $this->evn_uid);
|
$criteria->add(ElementTaskRelationPeer::ELEMENT_UID, $this->element_uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->isColumnModified(MessageEventTaskRelationPeer::TAS_UID)) {
|
if ($this->isColumnModified(ElementTaskRelationPeer::ELEMENT_TYPE)) {
|
||||||
$criteria->add(MessageEventTaskRelationPeer::TAS_UID, $this->tas_uid);
|
$criteria->add(ElementTaskRelationPeer::ELEMENT_TYPE, $this->element_type);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->isColumnModified(ElementTaskRelationPeer::TAS_UID)) {
|
||||||
|
$criteria->add(ElementTaskRelationPeer::TAS_UID, $this->tas_uid);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -590,9 +646,9 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
*/
|
*/
|
||||||
public function buildPkeyCriteria()
|
public function buildPkeyCriteria()
|
||||||
{
|
{
|
||||||
$criteria = new Criteria(MessageEventTaskRelationPeer::DATABASE_NAME);
|
$criteria = new Criteria(ElementTaskRelationPeer::DATABASE_NAME);
|
||||||
|
|
||||||
$criteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $this->msgetr_uid);
|
$criteria->add(ElementTaskRelationPeer::ETR_UID, $this->etr_uid);
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
}
|
}
|
||||||
@@ -603,18 +659,18 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
*/
|
*/
|
||||||
public function getPrimaryKey()
|
public function getPrimaryKey()
|
||||||
{
|
{
|
||||||
return $this->getMsgetrUid();
|
return $this->getEtrUid();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Generic method to set the primary key (msgetr_uid column).
|
* Generic method to set the primary key (etr_uid column).
|
||||||
*
|
*
|
||||||
* @param string $key Primary key.
|
* @param string $key Primary key.
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setPrimaryKey($key)
|
public function setPrimaryKey($key)
|
||||||
{
|
{
|
||||||
$this->setMsgetrUid($key);
|
$this->setEtrUid($key);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -623,7 +679,7 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
* If desired, this method can also make copies of all associated (fkey referrers)
|
* If desired, this method can also make copies of all associated (fkey referrers)
|
||||||
* objects.
|
* objects.
|
||||||
*
|
*
|
||||||
* @param object $copyObj An object of MessageEventTaskRelation (or compatible) type.
|
* @param object $copyObj An object of ElementTaskRelation (or compatible) type.
|
||||||
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
*/
|
*/
|
||||||
@@ -632,14 +688,16 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
|
|
||||||
$copyObj->setPrjUid($this->prj_uid);
|
$copyObj->setPrjUid($this->prj_uid);
|
||||||
|
|
||||||
$copyObj->setEvnUid($this->evn_uid);
|
$copyObj->setElementUid($this->element_uid);
|
||||||
|
|
||||||
|
$copyObj->setElementType($this->element_type);
|
||||||
|
|
||||||
$copyObj->setTasUid($this->tas_uid);
|
$copyObj->setTasUid($this->tas_uid);
|
||||||
|
|
||||||
|
|
||||||
$copyObj->setNew(true);
|
$copyObj->setNew(true);
|
||||||
|
|
||||||
$copyObj->setMsgetrUid(NULL); // this is a pkey column, so set to default value
|
$copyObj->setEtrUid(NULL); // this is a pkey column, so set to default value
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -652,7 +710,7 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
* objects.
|
* objects.
|
||||||
*
|
*
|
||||||
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
* @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
|
||||||
* @return MessageEventTaskRelation Clone of current object.
|
* @return ElementTaskRelation Clone of current object.
|
||||||
* @throws PropelException
|
* @throws PropelException
|
||||||
*/
|
*/
|
||||||
public function copy($deepCopy = false)
|
public function copy($deepCopy = false)
|
||||||
@@ -671,12 +729,12 @@ abstract class BaseMessageEventTaskRelation extends BaseObject implements Persis
|
|||||||
* same instance for all member of this class. The method could therefore
|
* same instance for all member of this class. The method could therefore
|
||||||
* be static, but this would prevent one from overriding the behavior.
|
* be static, but this would prevent one from overriding the behavior.
|
||||||
*
|
*
|
||||||
* @return MessageEventTaskRelationPeer
|
* @return ElementTaskRelationPeer
|
||||||
*/
|
*/
|
||||||
public function getPeer()
|
public function getPeer()
|
||||||
{
|
{
|
||||||
if (self::$peer === null) {
|
if (self::$peer === null) {
|
||||||
self::$peer = new MessageEventTaskRelationPeer();
|
self::$peer = new ElementTaskRelationPeer();
|
||||||
}
|
}
|
||||||
return self::$peer;
|
return self::$peer;
|
||||||
}
|
}
|
||||||
@@ -2,46 +2,49 @@
|
|||||||
|
|
||||||
require_once 'propel/util/BasePeer.php';
|
require_once 'propel/util/BasePeer.php';
|
||||||
// The object class -- needed for instanceof checks in this class.
|
// The object class -- needed for instanceof checks in this class.
|
||||||
// actual class may be a subclass -- as returned by MessageEventTaskRelationPeer::getOMClass()
|
// actual class may be a subclass -- as returned by ElementTaskRelationPeer::getOMClass()
|
||||||
include_once 'classes/model/MessageEventTaskRelation.php';
|
include_once 'classes/model/ElementTaskRelation.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Base static class for performing query and update operations on the 'MESSAGE_EVENT_TASK_RELATION' table.
|
* Base static class for performing query and update operations on the 'ELEMENT_TASK_RELATION' table.
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
*
|
*
|
||||||
* @package workflow.classes.model.om
|
* @package workflow.classes.model.om
|
||||||
*/
|
*/
|
||||||
abstract class BaseMessageEventTaskRelationPeer
|
abstract class BaseElementTaskRelationPeer
|
||||||
{
|
{
|
||||||
|
|
||||||
/** the default database name for this class */
|
/** the default database name for this class */
|
||||||
const DATABASE_NAME = 'workflow';
|
const DATABASE_NAME = 'workflow';
|
||||||
|
|
||||||
/** the table name for this class */
|
/** the table name for this class */
|
||||||
const TABLE_NAME = 'MESSAGE_EVENT_TASK_RELATION';
|
const TABLE_NAME = 'ELEMENT_TASK_RELATION';
|
||||||
|
|
||||||
/** A class that can be returned by this peer. */
|
/** A class that can be returned by this peer. */
|
||||||
const CLASS_DEFAULT = 'classes.model.MessageEventTaskRelation';
|
const CLASS_DEFAULT = 'classes.model.ElementTaskRelation';
|
||||||
|
|
||||||
/** The total number of columns. */
|
/** The total number of columns. */
|
||||||
const NUM_COLUMNS = 4;
|
const NUM_COLUMNS = 5;
|
||||||
|
|
||||||
/** The number of lazy-loaded columns. */
|
/** The number of lazy-loaded columns. */
|
||||||
const NUM_LAZY_LOAD_COLUMNS = 0;
|
const NUM_LAZY_LOAD_COLUMNS = 0;
|
||||||
|
|
||||||
|
|
||||||
/** the column name for the MSGETR_UID field */
|
/** the column name for the ETR_UID field */
|
||||||
const MSGETR_UID = 'MESSAGE_EVENT_TASK_RELATION.MSGETR_UID';
|
const ETR_UID = 'ELEMENT_TASK_RELATION.ETR_UID';
|
||||||
|
|
||||||
/** the column name for the PRJ_UID field */
|
/** the column name for the PRJ_UID field */
|
||||||
const PRJ_UID = 'MESSAGE_EVENT_TASK_RELATION.PRJ_UID';
|
const PRJ_UID = 'ELEMENT_TASK_RELATION.PRJ_UID';
|
||||||
|
|
||||||
/** the column name for the EVN_UID field */
|
/** the column name for the ELEMENT_UID field */
|
||||||
const EVN_UID = 'MESSAGE_EVENT_TASK_RELATION.EVN_UID';
|
const ELEMENT_UID = 'ELEMENT_TASK_RELATION.ELEMENT_UID';
|
||||||
|
|
||||||
|
/** the column name for the ELEMENT_TYPE field */
|
||||||
|
const ELEMENT_TYPE = 'ELEMENT_TASK_RELATION.ELEMENT_TYPE';
|
||||||
|
|
||||||
/** the column name for the TAS_UID field */
|
/** the column name for the TAS_UID field */
|
||||||
const TAS_UID = 'MESSAGE_EVENT_TASK_RELATION.TAS_UID';
|
const TAS_UID = 'ELEMENT_TASK_RELATION.TAS_UID';
|
||||||
|
|
||||||
/** The PHP to DB Name Mapping */
|
/** The PHP to DB Name Mapping */
|
||||||
private static $phpNameMap = null;
|
private static $phpNameMap = null;
|
||||||
@@ -54,10 +57,10 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
* e.g. self::$fieldNames[self::TYPE_PHPNAME][0] = 'Id'
|
||||||
*/
|
*/
|
||||||
private static $fieldNames = array (
|
private static $fieldNames = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('MsgetrUid', 'PrjUid', 'EvnUid', 'TasUid', ),
|
BasePeer::TYPE_PHPNAME => array ('EtrUid', 'PrjUid', 'ElementUid', 'ElementType', 'TasUid', ),
|
||||||
BasePeer::TYPE_COLNAME => array (MessageEventTaskRelationPeer::MSGETR_UID, MessageEventTaskRelationPeer::PRJ_UID, MessageEventTaskRelationPeer::EVN_UID, MessageEventTaskRelationPeer::TAS_UID, ),
|
BasePeer::TYPE_COLNAME => array (ElementTaskRelationPeer::ETR_UID, ElementTaskRelationPeer::PRJ_UID, ElementTaskRelationPeer::ELEMENT_UID, ElementTaskRelationPeer::ELEMENT_TYPE, ElementTaskRelationPeer::TAS_UID, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('MSGETR_UID', 'PRJ_UID', 'EVN_UID', 'TAS_UID', ),
|
BasePeer::TYPE_FIELDNAME => array ('ETR_UID', 'PRJ_UID', 'ELEMENT_UID', 'ELEMENT_TYPE', 'TAS_UID', ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -67,10 +70,10 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
* e.g. self::$fieldNames[BasePeer::TYPE_PHPNAME]['Id'] = 0
|
||||||
*/
|
*/
|
||||||
private static $fieldKeys = array (
|
private static $fieldKeys = array (
|
||||||
BasePeer::TYPE_PHPNAME => array ('MsgetrUid' => 0, 'PrjUid' => 1, 'EvnUid' => 2, 'TasUid' => 3, ),
|
BasePeer::TYPE_PHPNAME => array ('EtrUid' => 0, 'PrjUid' => 1, 'ElementUid' => 2, 'ElementType' => 3, 'TasUid' => 4, ),
|
||||||
BasePeer::TYPE_COLNAME => array (MessageEventTaskRelationPeer::MSGETR_UID => 0, MessageEventTaskRelationPeer::PRJ_UID => 1, MessageEventTaskRelationPeer::EVN_UID => 2, MessageEventTaskRelationPeer::TAS_UID => 3, ),
|
BasePeer::TYPE_COLNAME => array (ElementTaskRelationPeer::ETR_UID => 0, ElementTaskRelationPeer::PRJ_UID => 1, ElementTaskRelationPeer::ELEMENT_UID => 2, ElementTaskRelationPeer::ELEMENT_TYPE => 3, ElementTaskRelationPeer::TAS_UID => 4, ),
|
||||||
BasePeer::TYPE_FIELDNAME => array ('MSGETR_UID' => 0, 'PRJ_UID' => 1, 'EVN_UID' => 2, 'TAS_UID' => 3, ),
|
BasePeer::TYPE_FIELDNAME => array ('ETR_UID' => 0, 'PRJ_UID' => 1, 'ELEMENT_UID' => 2, 'ELEMENT_TYPE' => 3, 'TAS_UID' => 4, ),
|
||||||
BasePeer::TYPE_NUM => array (0, 1, 2, 3, )
|
BasePeer::TYPE_NUM => array (0, 1, 2, 3, 4, )
|
||||||
);
|
);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -80,8 +83,8 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
*/
|
*/
|
||||||
public static function getMapBuilder()
|
public static function getMapBuilder()
|
||||||
{
|
{
|
||||||
include_once 'classes/model/map/MessageEventTaskRelationMapBuilder.php';
|
include_once 'classes/model/map/ElementTaskRelationMapBuilder.php';
|
||||||
return BasePeer::getMapBuilder('classes.model.map.MessageEventTaskRelationMapBuilder');
|
return BasePeer::getMapBuilder('classes.model.map.ElementTaskRelationMapBuilder');
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Gets a map (hash) of PHP names to DB column names.
|
* Gets a map (hash) of PHP names to DB column names.
|
||||||
@@ -94,7 +97,7 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
public static function getPhpNameMap()
|
public static function getPhpNameMap()
|
||||||
{
|
{
|
||||||
if (self::$phpNameMap === null) {
|
if (self::$phpNameMap === null) {
|
||||||
$map = MessageEventTaskRelationPeer::getTableMap();
|
$map = ElementTaskRelationPeer::getTableMap();
|
||||||
$columns = $map->getColumns();
|
$columns = $map->getColumns();
|
||||||
$nameMap = array();
|
$nameMap = array();
|
||||||
foreach ($columns as $column) {
|
foreach ($columns as $column) {
|
||||||
@@ -149,12 +152,12 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
|
* $c->addJoin(TablePeer::alias("alias1", TablePeer::PRIMARY_KEY_COLUMN), TablePeer::PRIMARY_KEY_COLUMN);
|
||||||
* </code>
|
* </code>
|
||||||
* @param string $alias The alias for the current table.
|
* @param string $alias The alias for the current table.
|
||||||
* @param string $column The column name for current table. (i.e. MessageEventTaskRelationPeer::COLUMN_NAME).
|
* @param string $column The column name for current table. (i.e. ElementTaskRelationPeer::COLUMN_NAME).
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public static function alias($alias, $column)
|
public static function alias($alias, $column)
|
||||||
{
|
{
|
||||||
return str_replace(MessageEventTaskRelationPeer::TABLE_NAME.'.', $alias.'.', $column);
|
return str_replace(ElementTaskRelationPeer::TABLE_NAME.'.', $alias.'.', $column);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -171,18 +174,20 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
public static function addSelectColumns(Criteria $criteria)
|
public static function addSelectColumns(Criteria $criteria)
|
||||||
{
|
{
|
||||||
|
|
||||||
$criteria->addSelectColumn(MessageEventTaskRelationPeer::MSGETR_UID);
|
$criteria->addSelectColumn(ElementTaskRelationPeer::ETR_UID);
|
||||||
|
|
||||||
$criteria->addSelectColumn(MessageEventTaskRelationPeer::PRJ_UID);
|
$criteria->addSelectColumn(ElementTaskRelationPeer::PRJ_UID);
|
||||||
|
|
||||||
$criteria->addSelectColumn(MessageEventTaskRelationPeer::EVN_UID);
|
$criteria->addSelectColumn(ElementTaskRelationPeer::ELEMENT_UID);
|
||||||
|
|
||||||
$criteria->addSelectColumn(MessageEventTaskRelationPeer::TAS_UID);
|
$criteria->addSelectColumn(ElementTaskRelationPeer::ELEMENT_TYPE);
|
||||||
|
|
||||||
|
$criteria->addSelectColumn(ElementTaskRelationPeer::TAS_UID);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const COUNT = 'COUNT(MESSAGE_EVENT_TASK_RELATION.MSGETR_UID)';
|
const COUNT = 'COUNT(ELEMENT_TASK_RELATION.ETR_UID)';
|
||||||
const COUNT_DISTINCT = 'COUNT(DISTINCT MESSAGE_EVENT_TASK_RELATION.MSGETR_UID)';
|
const COUNT_DISTINCT = 'COUNT(DISTINCT ELEMENT_TASK_RELATION.ETR_UID)';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the number of rows matching criteria.
|
* Returns the number of rows matching criteria.
|
||||||
@@ -200,9 +205,9 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
// clear out anything that might confuse the ORDER BY clause
|
// clear out anything that might confuse the ORDER BY clause
|
||||||
$criteria->clearSelectColumns()->clearOrderByColumns();
|
$criteria->clearSelectColumns()->clearOrderByColumns();
|
||||||
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
if ($distinct || in_array(Criteria::DISTINCT, $criteria->getSelectModifiers())) {
|
||||||
$criteria->addSelectColumn(MessageEventTaskRelationPeer::COUNT_DISTINCT);
|
$criteria->addSelectColumn(ElementTaskRelationPeer::COUNT_DISTINCT);
|
||||||
} else {
|
} else {
|
||||||
$criteria->addSelectColumn(MessageEventTaskRelationPeer::COUNT);
|
$criteria->addSelectColumn(ElementTaskRelationPeer::COUNT);
|
||||||
}
|
}
|
||||||
|
|
||||||
// just in case we're grouping: add those columns to the select statement
|
// just in case we're grouping: add those columns to the select statement
|
||||||
@@ -210,7 +215,7 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
$criteria->addSelectColumn($column);
|
$criteria->addSelectColumn($column);
|
||||||
}
|
}
|
||||||
|
|
||||||
$rs = MessageEventTaskRelationPeer::doSelectRS($criteria, $con);
|
$rs = ElementTaskRelationPeer::doSelectRS($criteria, $con);
|
||||||
if ($rs->next()) {
|
if ($rs->next()) {
|
||||||
return $rs->getInt(1);
|
return $rs->getInt(1);
|
||||||
} else {
|
} else {
|
||||||
@@ -223,7 +228,7 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
*
|
*
|
||||||
* @param Criteria $criteria object used to create the SELECT statement.
|
* @param Criteria $criteria object used to create the SELECT statement.
|
||||||
* @param Connection $con
|
* @param Connection $con
|
||||||
* @return MessageEventTaskRelation
|
* @return ElementTaskRelation
|
||||||
* @throws PropelException Any exceptions caught during processing will be
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
* rethrown wrapped into a PropelException.
|
* rethrown wrapped into a PropelException.
|
||||||
*/
|
*/
|
||||||
@@ -231,7 +236,7 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
{
|
{
|
||||||
$critcopy = clone $criteria;
|
$critcopy = clone $criteria;
|
||||||
$critcopy->setLimit(1);
|
$critcopy->setLimit(1);
|
||||||
$objects = MessageEventTaskRelationPeer::doSelect($critcopy, $con);
|
$objects = ElementTaskRelationPeer::doSelect($critcopy, $con);
|
||||||
if ($objects) {
|
if ($objects) {
|
||||||
return $objects[0];
|
return $objects[0];
|
||||||
}
|
}
|
||||||
@@ -248,7 +253,7 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
*/
|
*/
|
||||||
public static function doSelect(Criteria $criteria, $con = null)
|
public static function doSelect(Criteria $criteria, $con = null)
|
||||||
{
|
{
|
||||||
return MessageEventTaskRelationPeer::populateObjects(MessageEventTaskRelationPeer::doSelectRS($criteria, $con));
|
return ElementTaskRelationPeer::populateObjects(ElementTaskRelationPeer::doSelectRS($criteria, $con));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* Prepares the Criteria object and uses the parent doSelect()
|
* Prepares the Criteria object and uses the parent doSelect()
|
||||||
@@ -272,7 +277,7 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
|
|
||||||
if (!$criteria->getSelectColumns()) {
|
if (!$criteria->getSelectColumns()) {
|
||||||
$criteria = clone $criteria;
|
$criteria = clone $criteria;
|
||||||
MessageEventTaskRelationPeer::addSelectColumns($criteria);
|
ElementTaskRelationPeer::addSelectColumns($criteria);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the correct dbName
|
// Set the correct dbName
|
||||||
@@ -294,7 +299,7 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
$results = array();
|
$results = array();
|
||||||
|
|
||||||
// set the class once to avoid overhead in the loop
|
// set the class once to avoid overhead in the loop
|
||||||
$cls = MessageEventTaskRelationPeer::getOMClass();
|
$cls = ElementTaskRelationPeer::getOMClass();
|
||||||
$cls = Propel::import($cls);
|
$cls = Propel::import($cls);
|
||||||
// populate the object(s)
|
// populate the object(s)
|
||||||
while ($rs->next()) {
|
while ($rs->next()) {
|
||||||
@@ -329,13 +334,13 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
*/
|
*/
|
||||||
public static function getOMClass()
|
public static function getOMClass()
|
||||||
{
|
{
|
||||||
return MessageEventTaskRelationPeer::CLASS_DEFAULT;
|
return ElementTaskRelationPeer::CLASS_DEFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method perform an INSERT on the database, given a MessageEventTaskRelation or Criteria object.
|
* Method perform an INSERT on the database, given a ElementTaskRelation or Criteria object.
|
||||||
*
|
*
|
||||||
* @param mixed $values Criteria or MessageEventTaskRelation object containing data that is used to create the INSERT statement.
|
* @param mixed $values Criteria or ElementTaskRelation object containing data that is used to create the INSERT statement.
|
||||||
* @param Connection $con the connection to use
|
* @param Connection $con the connection to use
|
||||||
* @return mixed The new primary key.
|
* @return mixed The new primary key.
|
||||||
* @throws PropelException Any exceptions caught during processing will be
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
@@ -350,7 +355,7 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
if ($values instanceof Criteria) {
|
if ($values instanceof Criteria) {
|
||||||
$criteria = clone $values; // rename for clarity
|
$criteria = clone $values; // rename for clarity
|
||||||
} else {
|
} else {
|
||||||
$criteria = $values->buildCriteria(); // build Criteria from MessageEventTaskRelation object
|
$criteria = $values->buildCriteria(); // build Criteria from ElementTaskRelation object
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -372,9 +377,9 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method perform an UPDATE on the database, given a MessageEventTaskRelation or Criteria object.
|
* Method perform an UPDATE on the database, given a ElementTaskRelation or Criteria object.
|
||||||
*
|
*
|
||||||
* @param mixed $values Criteria or MessageEventTaskRelation object containing data create the UPDATE statement.
|
* @param mixed $values Criteria or ElementTaskRelation object containing data create the UPDATE statement.
|
||||||
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
|
* @param Connection $con The connection to use (specify Connection exert more control over transactions).
|
||||||
* @return int The number of affected rows (if supported by underlying database driver).
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
* @throws PropelException Any exceptions caught during processing will be
|
* @throws PropelException Any exceptions caught during processing will be
|
||||||
@@ -391,8 +396,8 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
if ($values instanceof Criteria) {
|
if ($values instanceof Criteria) {
|
||||||
$criteria = clone $values; // rename for clarity
|
$criteria = clone $values; // rename for clarity
|
||||||
|
|
||||||
$comparison = $criteria->getComparison(MessageEventTaskRelationPeer::MSGETR_UID);
|
$comparison = $criteria->getComparison(ElementTaskRelationPeer::ETR_UID);
|
||||||
$selectCriteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $criteria->remove(MessageEventTaskRelationPeer::MSGETR_UID), $comparison);
|
$selectCriteria->add(ElementTaskRelationPeer::ETR_UID, $criteria->remove(ElementTaskRelationPeer::ETR_UID), $comparison);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$criteria = $values->buildCriteria(); // gets full criteria
|
$criteria = $values->buildCriteria(); // gets full criteria
|
||||||
@@ -406,7 +411,7 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method to DELETE all rows from the MESSAGE_EVENT_TASK_RELATION table.
|
* Method to DELETE all rows from the ELEMENT_TASK_RELATION table.
|
||||||
*
|
*
|
||||||
* @return int The number of affected rows (if supported by underlying database driver).
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
*/
|
*/
|
||||||
@@ -420,7 +425,7 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
// use transaction because $criteria could contain info
|
// use transaction because $criteria could contain info
|
||||||
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
// for more than one table or we could emulating ON DELETE CASCADE, etc.
|
||||||
$con->begin();
|
$con->begin();
|
||||||
$affectedRows += BasePeer::doDeleteAll(MessageEventTaskRelationPeer::TABLE_NAME, $con);
|
$affectedRows += BasePeer::doDeleteAll(ElementTaskRelationPeer::TABLE_NAME, $con);
|
||||||
$con->commit();
|
$con->commit();
|
||||||
return $affectedRows;
|
return $affectedRows;
|
||||||
} catch (PropelException $e) {
|
} catch (PropelException $e) {
|
||||||
@@ -430,9 +435,9 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Method perform a DELETE on the database, given a MessageEventTaskRelation or Criteria object OR a primary key value.
|
* Method perform a DELETE on the database, given a ElementTaskRelation or Criteria object OR a primary key value.
|
||||||
*
|
*
|
||||||
* @param mixed $values Criteria or MessageEventTaskRelation object or primary key or array of primary keys
|
* @param mixed $values Criteria or ElementTaskRelation object or primary key or array of primary keys
|
||||||
* which is used to create the DELETE statement
|
* which is used to create the DELETE statement
|
||||||
* @param Connection $con the connection to use
|
* @param Connection $con the connection to use
|
||||||
* @return int The number of affected rows (if supported by underlying database driver).
|
* @return int The number of affected rows (if supported by underlying database driver).
|
||||||
@@ -444,18 +449,18 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
public static function doDelete($values, $con = null)
|
public static function doDelete($values, $con = null)
|
||||||
{
|
{
|
||||||
if ($con === null) {
|
if ($con === null) {
|
||||||
$con = Propel::getConnection(MessageEventTaskRelationPeer::DATABASE_NAME);
|
$con = Propel::getConnection(ElementTaskRelationPeer::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($values instanceof Criteria) {
|
if ($values instanceof Criteria) {
|
||||||
$criteria = clone $values; // rename for clarity
|
$criteria = clone $values; // rename for clarity
|
||||||
} elseif ($values instanceof MessageEventTaskRelation) {
|
} elseif ($values instanceof ElementTaskRelation) {
|
||||||
|
|
||||||
$criteria = $values->buildPkeyCriteria();
|
$criteria = $values->buildPkeyCriteria();
|
||||||
} else {
|
} else {
|
||||||
// it must be the primary key
|
// it must be the primary key
|
||||||
$criteria = new Criteria(self::DATABASE_NAME);
|
$criteria = new Criteria(self::DATABASE_NAME);
|
||||||
$criteria->add(MessageEventTaskRelationPeer::MSGETR_UID, (array) $values, Criteria::IN);
|
$criteria->add(ElementTaskRelationPeer::ETR_UID, (array) $values, Criteria::IN);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the correct dbName
|
// Set the correct dbName
|
||||||
@@ -478,24 +483,24 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Validates all modified columns of given MessageEventTaskRelation object.
|
* Validates all modified columns of given ElementTaskRelation object.
|
||||||
* If parameter $columns is either a single column name or an array of column names
|
* If parameter $columns is either a single column name or an array of column names
|
||||||
* than only those columns are validated.
|
* than only those columns are validated.
|
||||||
*
|
*
|
||||||
* NOTICE: This does not apply to primary or foreign keys for now.
|
* NOTICE: This does not apply to primary or foreign keys for now.
|
||||||
*
|
*
|
||||||
* @param MessageEventTaskRelation $obj The object to validate.
|
* @param ElementTaskRelation $obj The object to validate.
|
||||||
* @param mixed $cols Column name or array of column names.
|
* @param mixed $cols Column name or array of column names.
|
||||||
*
|
*
|
||||||
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
|
* @return mixed TRUE if all columns are valid or the error message of the first invalid column.
|
||||||
*/
|
*/
|
||||||
public static function doValidate(MessageEventTaskRelation $obj, $cols = null)
|
public static function doValidate(ElementTaskRelation $obj, $cols = null)
|
||||||
{
|
{
|
||||||
$columns = array();
|
$columns = array();
|
||||||
|
|
||||||
if ($cols) {
|
if ($cols) {
|
||||||
$dbMap = Propel::getDatabaseMap(MessageEventTaskRelationPeer::DATABASE_NAME);
|
$dbMap = Propel::getDatabaseMap(ElementTaskRelationPeer::DATABASE_NAME);
|
||||||
$tableMap = $dbMap->getTable(MessageEventTaskRelationPeer::TABLE_NAME);
|
$tableMap = $dbMap->getTable(ElementTaskRelationPeer::TABLE_NAME);
|
||||||
|
|
||||||
if (! is_array($cols)) {
|
if (! is_array($cols)) {
|
||||||
$cols = array($cols);
|
$cols = array($cols);
|
||||||
@@ -511,7 +516,7 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return BasePeer::doValidate(MessageEventTaskRelationPeer::DATABASE_NAME, MessageEventTaskRelationPeer::TABLE_NAME, $columns);
|
return BasePeer::doValidate(ElementTaskRelationPeer::DATABASE_NAME, ElementTaskRelationPeer::TABLE_NAME, $columns);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -519,7 +524,7 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
*
|
*
|
||||||
* @param mixed $pk the primary key.
|
* @param mixed $pk the primary key.
|
||||||
* @param Connection $con the connection to use
|
* @param Connection $con the connection to use
|
||||||
* @return MessageEventTaskRelation
|
* @return ElementTaskRelation
|
||||||
*/
|
*/
|
||||||
public static function retrieveByPK($pk, $con = null)
|
public static function retrieveByPK($pk, $con = null)
|
||||||
{
|
{
|
||||||
@@ -527,12 +532,12 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
$con = Propel::getConnection(self::DATABASE_NAME);
|
$con = Propel::getConnection(self::DATABASE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
$criteria = new Criteria(MessageEventTaskRelationPeer::DATABASE_NAME);
|
$criteria = new Criteria(ElementTaskRelationPeer::DATABASE_NAME);
|
||||||
|
|
||||||
$criteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $pk);
|
$criteria->add(ElementTaskRelationPeer::ETR_UID, $pk);
|
||||||
|
|
||||||
|
|
||||||
$v = MessageEventTaskRelationPeer::doSelect($criteria, $con);
|
$v = ElementTaskRelationPeer::doSelect($criteria, $con);
|
||||||
|
|
||||||
return !empty($v) > 0 ? $v[0] : null;
|
return !empty($v) > 0 ? $v[0] : null;
|
||||||
}
|
}
|
||||||
@@ -556,8 +561,8 @@ abstract class BaseMessageEventTaskRelationPeer
|
|||||||
$objs = array();
|
$objs = array();
|
||||||
} else {
|
} else {
|
||||||
$criteria = new Criteria();
|
$criteria = new Criteria();
|
||||||
$criteria->add(MessageEventTaskRelationPeer::MSGETR_UID, $pks, Criteria::IN);
|
$criteria->add(ElementTaskRelationPeer::ETR_UID, $pks, Criteria::IN);
|
||||||
$objs = MessageEventTaskRelationPeer::doSelect($criteria, $con);
|
$objs = ElementTaskRelationPeer::doSelect($criteria, $con);
|
||||||
}
|
}
|
||||||
return $objs;
|
return $objs;
|
||||||
}
|
}
|
||||||
@@ -569,14 +574,14 @@ if (Propel::isInit()) {
|
|||||||
// the MapBuilder classes register themselves with Propel during initialization
|
// the MapBuilder classes register themselves with Propel during initialization
|
||||||
// so we need to load them here.
|
// so we need to load them here.
|
||||||
try {
|
try {
|
||||||
BaseMessageEventTaskRelationPeer::getMapBuilder();
|
BaseElementTaskRelationPeer::getMapBuilder();
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
|
Propel::log('Could not initialize Peer: ' . $e->getMessage(), Propel::LOG_ERR);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// even if Propel is not yet initialized, the map builder class can be registered
|
// even if Propel is not yet initialized, the map builder class can be registered
|
||||||
// now and then it will be loaded when Propel initializes.
|
// now and then it will be loaded when Propel initializes.
|
||||||
require_once 'classes/model/map/MessageEventTaskRelationMapBuilder.php';
|
require_once 'classes/model/map/ElementTaskRelationMapBuilder.php';
|
||||||
Propel::registerMapBuilder('classes.model.map.MessageEventTaskRelationMapBuilder');
|
Propel::registerMapBuilder('classes.model.map.ElementTaskRelationMapBuilder');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -61,7 +61,7 @@ abstract class BaseMessageApplication extends BaseObject implements Persistent
|
|||||||
* The value for the msgapp_variables field.
|
* The value for the msgapp_variables field.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $msgapp_variables = '';
|
protected $msgapp_variables;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the msgapp_correlation field.
|
* The value for the msgapp_correlation field.
|
||||||
@@ -378,7 +378,7 @@ abstract class BaseMessageApplication extends BaseObject implements Persistent
|
|||||||
$v = (string) $v;
|
$v = (string) $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->msgapp_variables !== $v || $v === '') {
|
if ($this->msgapp_variables !== $v) {
|
||||||
$this->msgapp_variables = $v;
|
$this->msgapp_variables = $v;
|
||||||
$this->modifiedColumns[] = MessageApplicationPeer::MSGAPP_VARIABLES;
|
$this->modifiedColumns[] = MessageApplicationPeer::MSGAPP_VARIABLES;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ abstract class BaseMessageEventDefinition extends BaseObject implements Persiste
|
|||||||
* The value for the msged_variables field.
|
* The value for the msged_variables field.
|
||||||
* @var string
|
* @var string
|
||||||
*/
|
*/
|
||||||
protected $msged_variables = '';
|
protected $msged_variables;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The value for the msged_correlation field.
|
* The value for the msged_correlation field.
|
||||||
@@ -285,7 +285,7 @@ abstract class BaseMessageEventDefinition extends BaseObject implements Persiste
|
|||||||
$v = (string) $v;
|
$v = (string) $v;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($this->msged_variables !== $v || $v === '') {
|
if ($this->msged_variables !== $v) {
|
||||||
$this->msged_variables = $v;
|
$this->msged_variables = $v;
|
||||||
$this->modifiedColumns[] = MessageEventDefinitionPeer::MSGED_VARIABLES;
|
$this->modifiedColumns[] = MessageEventDefinitionPeer::MSGED_VARIABLES;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4419,25 +4419,6 @@
|
|||||||
<column name="EVN_UID_CATCH" type="VARCHAR" size="32" required="true" />
|
<column name="EVN_UID_CATCH" type="VARCHAR" size="32" required="true" />
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
<table name="MESSAGE_EVENT_TASK_RELATION">
|
|
||||||
<vendor type="mysql">
|
|
||||||
<parameter name="Name" value="MESSAGE_EVENT_TASK_RELATION" />
|
|
||||||
<parameter name="Engine" value="InnoDB" />
|
|
||||||
<parameter name="Version" value="10" />
|
|
||||||
<parameter name="Row_format" value="Dynamic" />
|
|
||||||
<parameter name="Data_free" value="0" />
|
|
||||||
<parameter name="Auto_increment" value="" />
|
|
||||||
<parameter name="Check_time" value="" />
|
|
||||||
<parameter name="Collation" value="utf8_general_ci" />
|
|
||||||
<parameter name="Checksum" value="" />
|
|
||||||
<parameter name="Create_options" value="" />
|
|
||||||
</vendor>
|
|
||||||
<column name="MSGETR_UID" type="VARCHAR" size="32" required="true" primaryKey="true" />
|
|
||||||
<column name="PRJ_UID" type="VARCHAR" size="32" required="true" />
|
|
||||||
<column name="EVN_UID" type="VARCHAR" size="32" required="true" />
|
|
||||||
<column name="TAS_UID" type="VARCHAR" size="32" required="true" />
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<table name="MESSAGE_APPLICATION">
|
<table name="MESSAGE_APPLICATION">
|
||||||
<vendor type="mysql">
|
<vendor type="mysql">
|
||||||
<parameter name="Name" value="MESSAGE_APPLICATION" />
|
<parameter name="Name" value="MESSAGE_APPLICATION" />
|
||||||
@@ -4465,6 +4446,25 @@
|
|||||||
<rule name="validValues" value="READ|UNREAD" message="Please enter a valid value for MSGAPP_STATUS" />
|
<rule name="validValues" value="READ|UNREAD" message="Please enter a valid value for MSGAPP_STATUS" />
|
||||||
</validator>
|
</validator>
|
||||||
</table>
|
</table>
|
||||||
|
<table name="ELEMENT_TASK_RELATION">
|
||||||
|
<vendor type="mysql">
|
||||||
|
<parameter name="Name" value="ELEMENT_TASK_RELATION" />
|
||||||
|
<parameter name="Engine" value="InnoDB" />
|
||||||
|
<parameter name="Version" value="10" />
|
||||||
|
<parameter name="Row_format" value="Dynamic" />
|
||||||
|
<parameter name="Data_free" value="0" />
|
||||||
|
<parameter name="Auto_increment" value="" />
|
||||||
|
<parameter name="Check_time" value="" />
|
||||||
|
<parameter name="Collation" value="utf8_general_ci" />
|
||||||
|
<parameter name="Checksum" value="" />
|
||||||
|
<parameter name="Create_options" value="" />
|
||||||
|
</vendor>
|
||||||
|
<column name="ETR_UID" type="VARCHAR" size="32" required="true" primaryKey="true" />
|
||||||
|
<column name="PRJ_UID" type="VARCHAR" size="32" required="true" />
|
||||||
|
<column name="ELEMENT_UID" type="VARCHAR" size="32" required="true" />
|
||||||
|
<column name="ELEMENT_TYPE" type="VARCHAR" size="50" required="true" default=""/>
|
||||||
|
<column name="TAS_UID" type="VARCHAR" size="32" required="true" />
|
||||||
|
</table>
|
||||||
<table name="ABE_CONFIGURATION">
|
<table name="ABE_CONFIGURATION">
|
||||||
<vendor type="mysql">
|
<vendor type="mysql">
|
||||||
<parameter name="Name" value="ABE_CONFIGURATION"/>
|
<parameter name="Name" value="ABE_CONFIGURATION"/>
|
||||||
|
|||||||
@@ -2562,21 +2562,6 @@ CREATE TABLE `MESSAGE_EVENT_RELATION`
|
|||||||
PRIMARY KEY (`MSGER_UID`)
|
PRIMARY KEY (`MSGER_UID`)
|
||||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
|
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
#-- MESSAGE_EVENT_TASK_RELATION
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `MESSAGE_EVENT_TASK_RELATION`;
|
|
||||||
|
|
||||||
|
|
||||||
CREATE TABLE `MESSAGE_EVENT_TASK_RELATION`
|
|
||||||
(
|
|
||||||
`MSGETR_UID` VARCHAR(32) NOT NULL,
|
|
||||||
`PRJ_UID` VARCHAR(32) NOT NULL,
|
|
||||||
`EVN_UID` VARCHAR(32) NOT NULL,
|
|
||||||
`TAS_UID` VARCHAR(32) NOT NULL,
|
|
||||||
PRIMARY KEY (`MSGETR_UID`)
|
|
||||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
|
|
||||||
#-----------------------------------------------------------------------------
|
|
||||||
#-- MESSAGE_APPLICATION
|
#-- MESSAGE_APPLICATION
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
@@ -2598,6 +2583,22 @@ CREATE TABLE `MESSAGE_APPLICATION`
|
|||||||
PRIMARY KEY (`MSGAPP_UID`)
|
PRIMARY KEY (`MSGAPP_UID`)
|
||||||
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
|
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
#-- ELEMENT_TASK_RELATION
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
DROP TABLE IF EXISTS `ELEMENT_TASK_RELATION`;
|
||||||
|
|
||||||
|
|
||||||
|
CREATE TABLE `ELEMENT_TASK_RELATION`
|
||||||
|
(
|
||||||
|
`ETR_UID` VARCHAR(32) NOT NULL,
|
||||||
|
`PRJ_UID` VARCHAR(32) NOT NULL,
|
||||||
|
`ELEMENT_UID` VARCHAR(32) NOT NULL,
|
||||||
|
`ELEMENT_TYPE` VARCHAR(50) default '' NOT NULL,
|
||||||
|
`TAS_UID` VARCHAR(32) NOT NULL,
|
||||||
|
PRIMARY KEY (`ETR_UID`)
|
||||||
|
)ENGINE=InnoDB DEFAULT CHARSET='utf8';
|
||||||
|
#-----------------------------------------------------------------------------
|
||||||
#-- ABE_CONFIGURATION
|
#-- ABE_CONFIGURATION
|
||||||
#-----------------------------------------------------------------------------
|
#-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
@@ -367,7 +367,7 @@ switch ($_POST['action']) {
|
|||||||
$dep_manager = $_POST['USR_UID'];
|
$dep_manager = $_POST['USR_UID'];
|
||||||
$dep_uid = $_POST['DEP_UID'];
|
$dep_uid = $_POST['DEP_UID'];
|
||||||
$editDepartment['DEP_UID'] = $dep_uid;
|
$editDepartment['DEP_UID'] = $dep_uid;
|
||||||
$editDepartment['DEP_MANAGER'] = $dep_manager;
|
$editDepartment['DEP_MANAGER'] = (!isset($_POST['NO_DEP_MANAGER'])? $dep_manager : '');
|
||||||
$oDept = new Department();
|
$oDept = new Department();
|
||||||
$oDept->update( $editDepartment );
|
$oDept->update( $editDepartment );
|
||||||
$oDept->updateDepartmentManager( $dep_uid );
|
$oDept->updateDepartmentManager( $dep_uid );
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ $oTemplatePower->assign('USR_UID', $aUser['USR_UID']);
|
|||||||
$oTemplatePower->assign('USR_FULLNAME', $aData['USR_FIRSTNAME'] . ' ' . $aData['USR_LASTNAME'] . ' (' . $aData['USR_USERNAME'] . ')');
|
$oTemplatePower->assign('USR_FULLNAME', $aData['USR_FIRSTNAME'] . ' ' . $aData['USR_LASTNAME'] . ' (' . $aData['USR_USERNAME'] . ')');
|
||||||
*/
|
*/
|
||||||
$userName = 'admin';
|
$userName = 'admin';
|
||||||
$userPass = 'The password introduced at the time of installing the application (admin: if you do not put or changed the password)';
|
$userPass = 'The password introduced at the time of installing the application. (If you did not change the password by default is "admin")';
|
||||||
if(isset($_SESSION['NW_PASSWORD'])){
|
if(isset($_SESSION['NW_PASSWORD'])){
|
||||||
if($_SESSION['NW_PASSWORD'] != ''){
|
if($_SESSION['NW_PASSWORD'] != ''){
|
||||||
$userPass = $_SESSION['NW_PASSWORD'];
|
$userPass = $_SESSION['NW_PASSWORD'];
|
||||||
|
|||||||
@@ -1991,7 +1991,7 @@ class Cases
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Element origin and dest
|
//Element origin and dest
|
||||||
$messageEventTaskRelation = new \ProcessMaker\BusinessModel\MessageEventTaskRelation();
|
$elementTaskRelation = new \ProcessMaker\BusinessModel\ElementTaskRelation();
|
||||||
|
|
||||||
$arrayElement = array(
|
$arrayElement = array(
|
||||||
"elementOrigin" => array("uid" => $elementOriginUid, "type" => "bpmnActivity"),
|
"elementOrigin" => array("uid" => $elementOriginUid, "type" => "bpmnActivity"),
|
||||||
@@ -1999,16 +1999,17 @@ class Cases
|
|||||||
);
|
);
|
||||||
|
|
||||||
foreach ($arrayElement as $key => $value) {
|
foreach ($arrayElement as $key => $value) {
|
||||||
$arrayMessageEventTaskRelationData = $messageEventTaskRelation->getMessageEventTaskRelationWhere(
|
$arrayElementTaskRelationData = $elementTaskRelation->getElementTaskRelationWhere(
|
||||||
array(
|
array(
|
||||||
\MessageEventTaskRelationPeer::PRJ_UID => $arrayApplicationData["PRO_UID"],
|
\ElementTaskRelationPeer::PRJ_UID => $arrayApplicationData["PRO_UID"],
|
||||||
\MessageEventTaskRelationPeer::TAS_UID => $arrayElement[$key]["uid"]
|
\ElementTaskRelationPeer::ELEMENT_TYPE => "bpmnEvent",
|
||||||
|
\ElementTaskRelationPeer::TAS_UID => $arrayElement[$key]["uid"]
|
||||||
),
|
),
|
||||||
true
|
true
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!is_null($arrayMessageEventTaskRelationData)) {
|
if (!is_null($arrayElementTaskRelationData)) {
|
||||||
$arrayElement[$key]["uid"] = $arrayMessageEventTaskRelationData["EVN_UID"];
|
$arrayElement[$key]["uid"] = $arrayElementTaskRelationData["ELEMENT_UID"];
|
||||||
$arrayElement[$key]["type"] = "bpmnEvent";
|
$arrayElement[$key]["type"] = "bpmnEvent";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,14 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
namespace ProcessMaker\BusinessModel;
|
namespace ProcessMaker\BusinessModel;
|
||||||
|
|
||||||
class MessageEventTaskRelation
|
class ElementTaskRelation
|
||||||
{
|
{
|
||||||
private $arrayFieldDefinition = array(
|
private $arrayFieldDefinition = array(
|
||||||
"MSGETR_UID" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "messageEventTaskRelationUid"),
|
"ETR_UID" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "elementTaskRelationUid"),
|
||||||
|
|
||||||
"PRJ_UID" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "projectUid"),
|
"PRJ_UID" => array("type" => "string", "required" => false, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "projectUid"),
|
||||||
"EVN_UID" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "eventUid"),
|
"ELEMENT_UID" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "elementUid"),
|
||||||
"TAS_UID" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "taskUid")
|
"ELEMENT_TYPE" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "elementType"),
|
||||||
|
"TAS_UID" => array("type" => "string", "required" => true, "empty" => false, "defaultValues" => array(), "fieldNameAux" => "taskUid")
|
||||||
);
|
);
|
||||||
|
|
||||||
private $formatFieldNameInUppercase = true;
|
private $formatFieldNameInUppercase = true;
|
||||||
@@ -84,16 +85,16 @@ class MessageEventTaskRelation
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify if exists the Message-Event-Task-Relation
|
* Verify if exists the Element-Task-Relation
|
||||||
*
|
*
|
||||||
* @param string $messageEventTaskRelationUid Unique id of Message-Event-Task-Relation
|
* @param string $elementTaskRelationUid Unique id of Element-Task-Relation
|
||||||
*
|
*
|
||||||
* return bool Return true if exists the Message-Event-Task-Relation, false otherwise
|
* return bool Return true if exists the Element-Task-Relation, false otherwise
|
||||||
*/
|
*/
|
||||||
public function exists($messageEventTaskRelationUid)
|
public function exists($elementTaskRelationUid)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$obj = \MessageEventTaskRelationPeer::retrieveByPK($messageEventTaskRelationUid);
|
$obj = \ElementTaskRelationPeer::retrieveByPK($elementTaskRelationUid);
|
||||||
|
|
||||||
return (!is_null($obj))? true : false;
|
return (!is_null($obj))? true : false;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@@ -102,18 +103,18 @@ class MessageEventTaskRelation
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Verify if does not exists the Message-Event-Task-Relation
|
* Verify if does not exists the Element-Task-Relation
|
||||||
*
|
*
|
||||||
* @param string $messageEventTaskRelationUid Unique id of Message-Event-Task-Relation
|
* @param string $elementTaskRelationUid Unique id of Element-Task-Relation
|
||||||
* @param string $fieldNameForException Field name for the exception
|
* @param string $fieldNameForException Field name for the exception
|
||||||
*
|
*
|
||||||
* return void Throw exception if does not exists the Message-Event-Task-Relation
|
* return void Throw exception if does not exists the Element-Task-Relation
|
||||||
*/
|
*/
|
||||||
public function throwExceptionIfNotExistsMessageEventTaskRelation($messageEventTaskRelationUid, $fieldNameForException)
|
public function throwExceptionIfNotExistsElementTaskRelation($elementTaskRelationUid, $fieldNameForException)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (!$this->exists($messageEventTaskRelationUid)) {
|
if (!$this->exists($elementTaskRelationUid)) {
|
||||||
throw new \Exception(\G::LoadTranslation("ID_MESSAGE_EVENT_TASK_RELATION_DOES_NOT_EXIST", array($fieldNameForException, $messageEventTaskRelationUid)));
|
throw new \Exception(\G::LoadTranslation("ID_MESSAGE_EVENT_TASK_RELATION_DOES_NOT_EXIST", array($fieldNameForException, $elementTaskRelationUid)));
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
@@ -123,20 +124,20 @@ class MessageEventTaskRelation
|
|||||||
/**
|
/**
|
||||||
* Validate the data if they are invalid (INSERT and UPDATE)
|
* Validate the data if they are invalid (INSERT and UPDATE)
|
||||||
*
|
*
|
||||||
* @param string $messageEventTaskRelationUid Unique id of Message-Event-Task-Relation
|
* @param string $elementTaskRelationUid Unique id of Element-Task-Relation
|
||||||
* @param string $projectUid Unique id of Project
|
* @param string $projectUid Unique id of Project
|
||||||
* @param array $arrayData Data
|
* @param array $arrayData Data
|
||||||
*
|
*
|
||||||
* return void Throw exception if data has an invalid value
|
* return void Throw exception if data has an invalid value
|
||||||
*/
|
*/
|
||||||
public function throwExceptionIfDataIsInvalid($messageEventTaskRelationUid, $projectUid, array $arrayData)
|
public function throwExceptionIfDataIsInvalid($elementTaskRelationUid, $projectUid, array $arrayData)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
//Set variables
|
//Set variables
|
||||||
$arrayMessageEventTaskRelationData = ($messageEventTaskRelationUid == "")? array() : $this->getMessageEventTaskRelation($messageEventTaskRelationUid, true);
|
$arrayElementTaskRelationData = ($elementTaskRelationUid == "")? array() : $this->getElementTaskRelation($elementTaskRelationUid, true);
|
||||||
$flagInsert = ($messageEventTaskRelationUid == "")? true : false;
|
$flagInsert = ($elementTaskRelationUid == "")? true : false;
|
||||||
|
|
||||||
$arrayFinalData = array_merge($arrayMessageEventTaskRelationData, $arrayData);
|
$arrayFinalData = array_merge($arrayElementTaskRelationData, $arrayData);
|
||||||
|
|
||||||
//Verify data - Field definition
|
//Verify data - Field definition
|
||||||
$process = new \ProcessMaker\BusinessModel\Process();
|
$process = new \ProcessMaker\BusinessModel\Process();
|
||||||
@@ -148,12 +149,12 @@ class MessageEventTaskRelation
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Create Message-Event-Task-Relation for a Project
|
* Create Element-Task-Relation for a Project
|
||||||
*
|
*
|
||||||
* @param string $projectUid Unique id of Project
|
* @param string $projectUid Unique id of Project
|
||||||
* @param array $arrayData Data
|
* @param array $arrayData Data
|
||||||
*
|
*
|
||||||
* return array Return data of the new Message-Event-Task-Relation created
|
* return array Return data of the new Element-Task-Relation created
|
||||||
*/
|
*/
|
||||||
public function create($projectUid, array $arrayData)
|
public function create($projectUid, array $arrayData)
|
||||||
{
|
{
|
||||||
@@ -168,7 +169,7 @@ class MessageEventTaskRelation
|
|||||||
//Set data
|
//Set data
|
||||||
$arrayData = array_change_key_case($arrayData, CASE_UPPER);
|
$arrayData = array_change_key_case($arrayData, CASE_UPPER);
|
||||||
|
|
||||||
unset($arrayData["MSGETR_UID"]);
|
unset($arrayData["ETR_UID"]);
|
||||||
unset($arrayData["PRJ_UID"]);
|
unset($arrayData["PRJ_UID"]);
|
||||||
|
|
||||||
//Verify data
|
//Verify data
|
||||||
@@ -180,28 +181,28 @@ class MessageEventTaskRelation
|
|||||||
$cnn = \Propel::getConnection("workflow");
|
$cnn = \Propel::getConnection("workflow");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$messageEventTaskRelation = new \MessageEventTaskRelation();
|
$elementTaskRelation = new \ElementTaskRelation();
|
||||||
|
|
||||||
$messageEventTaskRelationUid = \ProcessMaker\Util\Common::generateUID();
|
$elementTaskRelationUid = \ProcessMaker\Util\Common::generateUID();
|
||||||
|
|
||||||
$messageEventTaskRelation->fromArray($arrayData, \BasePeer::TYPE_FIELDNAME);
|
$elementTaskRelation->fromArray($arrayData, \BasePeer::TYPE_FIELDNAME);
|
||||||
|
|
||||||
$messageEventTaskRelation->setMsgetrUid($messageEventTaskRelationUid);
|
$elementTaskRelation->setEtrUid($elementTaskRelationUid);
|
||||||
$messageEventTaskRelation->setPrjUid($projectUid);
|
$elementTaskRelation->setPrjUid($projectUid);
|
||||||
|
|
||||||
if ($messageEventTaskRelation->validate()) {
|
if ($elementTaskRelation->validate()) {
|
||||||
$cnn->begin();
|
$cnn->begin();
|
||||||
|
|
||||||
$result = $messageEventTaskRelation->save();
|
$result = $elementTaskRelation->save();
|
||||||
|
|
||||||
$cnn->commit();
|
$cnn->commit();
|
||||||
|
|
||||||
//Return
|
//Return
|
||||||
return $this->getMessageEventTaskRelation($messageEventTaskRelationUid);
|
return $this->getElementTaskRelation($elementTaskRelationUid);
|
||||||
} else {
|
} else {
|
||||||
$msg = "";
|
$msg = "";
|
||||||
|
|
||||||
foreach ($messageEventTaskRelation->getValidationFailures() as $validationFailure) {
|
foreach ($elementTaskRelation->getValidationFailures() as $validationFailure) {
|
||||||
$msg = $msg . (($msg != "")? "\n" : "") . $validationFailure->getMessage();
|
$msg = $msg . (($msg != "")? "\n" : "") . $validationFailure->getMessage();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,7 +219,7 @@ class MessageEventTaskRelation
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Delete Message-Event-Task-Relation
|
* Delete Element-Task-Relation
|
||||||
*
|
*
|
||||||
* @param array $arrayCondition Conditions
|
* @param array $arrayCondition Conditions
|
||||||
*
|
*
|
||||||
@@ -238,26 +239,27 @@ class MessageEventTaskRelation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$result = \MessageEventTaskRelationPeer::doDelete($criteria);
|
$result = \ElementTaskRelationPeer::doDelete($criteria);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get criteria for Message-Event-Task-Relation
|
* Get criteria for Element-Task-Relation
|
||||||
*
|
*
|
||||||
* return object
|
* return object
|
||||||
*/
|
*/
|
||||||
public function getMessageEventTaskRelationCriteria()
|
public function getElementTaskRelationCriteria()
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$criteria = new \Criteria("workflow");
|
$criteria = new \Criteria("workflow");
|
||||||
|
|
||||||
$criteria->addSelectColumn(\MessageEventTaskRelationPeer::MSGETR_UID);
|
$criteria->addSelectColumn(\ElementTaskRelationPeer::ETR_UID);
|
||||||
$criteria->addSelectColumn(\MessageEventTaskRelationPeer::PRJ_UID);
|
$criteria->addSelectColumn(\ElementTaskRelationPeer::PRJ_UID);
|
||||||
$criteria->addSelectColumn(\MessageEventTaskRelationPeer::EVN_UID);
|
$criteria->addSelectColumn(\ElementTaskRelationPeer::ELEMENT_UID);
|
||||||
$criteria->addSelectColumn(\MessageEventTaskRelationPeer::TAS_UID);
|
$criteria->addSelectColumn(\ElementTaskRelationPeer::ELEMENT_TYPE);
|
||||||
|
$criteria->addSelectColumn(\ElementTaskRelationPeer::TAS_UID);
|
||||||
|
|
||||||
return $criteria;
|
return $criteria;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
@@ -266,19 +268,20 @@ class MessageEventTaskRelation
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get data of a Message-Event-Task-Relation from a record
|
* Get data of a Element-Task-Relation from a record
|
||||||
*
|
*
|
||||||
* @param array $record Record
|
* @param array $record Record
|
||||||
*
|
*
|
||||||
* return array Return an array with data Message-Event-Task-Relation
|
* return array Return an array with data Element-Task-Relation
|
||||||
*/
|
*/
|
||||||
public function getMessageEventTaskRelationDataFromRecord(array $record)
|
public function getElementTaskRelationDataFromRecord(array $record)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
return array(
|
return array(
|
||||||
$this->getFieldNameByFormatFieldName("MSGETR_UID") => $record["MSGETR_UID"],
|
$this->getFieldNameByFormatFieldName("ETR_UID") => $record["ETR_UID"],
|
||||||
$this->getFieldNameByFormatFieldName("EVN_UID") => $record["EVN_UID"],
|
$this->getFieldNameByFormatFieldName("ELEMENT_UID") => $record["ELEMENT_UID"],
|
||||||
$this->getFieldNameByFormatFieldName("TAS_UID") => $record["TAS_UID"]
|
$this->getFieldNameByFormatFieldName("ELEMENT_TYPE") => $record["ELEMENT_TYPE"],
|
||||||
|
$this->getFieldNameByFormatFieldName("TAS_UID") => $record["TAS_UID"]
|
||||||
);
|
);
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
@@ -286,25 +289,25 @@ class MessageEventTaskRelation
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get data of a Message-Event-Task-Relation
|
* Get data of a Element-Task-Relation
|
||||||
*
|
*
|
||||||
* @param string $messageEventTaskRelationUid Unique id of Message-Event-Task-Relation
|
* @param string $elementTaskRelationUid Unique id of Element-Task-Relation
|
||||||
* @param bool $flagGetRecord Value that set the getting
|
* @param bool $flagGetRecord Value that set the getting
|
||||||
*
|
*
|
||||||
* return array Return an array with data of a Message-Event-Task-Relation
|
* return array Return an array with data of a Element-Task-Relation
|
||||||
*/
|
*/
|
||||||
public function getMessageEventTaskRelation($messageEventTaskRelationUid, $flagGetRecord = false)
|
public function getElementTaskRelation($elementTaskRelationUid, $flagGetRecord = false)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
//Verify data
|
//Verify data
|
||||||
$this->throwExceptionIfNotExistsMessageEventTaskRelation($messageEventTaskRelationUid, $this->arrayFieldNameForException["messageEventTaskRelationUid"]);
|
$this->throwExceptionIfNotExistsElementTaskRelation($elementTaskRelationUid, $this->arrayFieldNameForException["elementTaskRelationUid"]);
|
||||||
|
|
||||||
//Get data
|
//Get data
|
||||||
$criteria = $this->getMessageEventTaskRelationCriteria();
|
$criteria = $this->getElementTaskRelationCriteria();
|
||||||
|
|
||||||
$criteria->add(\MessageEventTaskRelationPeer::MSGETR_UID, $messageEventTaskRelationUid, \Criteria::EQUAL);
|
$criteria->add(\ElementTaskRelationPeer::ETR_UID, $elementTaskRelationUid, \Criteria::EQUAL);
|
||||||
|
|
||||||
$rsCriteria = \MessageEventTaskRelationPeer::doSelectRS($criteria);
|
$rsCriteria = \ElementTaskRelationPeer::doSelectRS($criteria);
|
||||||
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||||
|
|
||||||
$rsCriteria->next();
|
$rsCriteria->next();
|
||||||
@@ -312,25 +315,25 @@ class MessageEventTaskRelation
|
|||||||
$row = $rsCriteria->getRow();
|
$row = $rsCriteria->getRow();
|
||||||
|
|
||||||
//Return
|
//Return
|
||||||
return (!$flagGetRecord)? $this->getMessageEventTaskRelationDataFromRecord($row) : $row;
|
return (!$flagGetRecord)? $this->getElementTaskRelationDataFromRecord($row) : $row;
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get data of a Message-Event-Task-Relation
|
* Get data of a Element-Task-Relation
|
||||||
*
|
*
|
||||||
* @param array $arrayCondition Conditions
|
* @param array $arrayCondition Conditions
|
||||||
* @param bool $flagGetRecord Value that set the getting
|
* @param bool $flagGetRecord Value that set the getting
|
||||||
*
|
*
|
||||||
* return array Return an array with data of a Message-Event-Task-Relation, otherwise null
|
* return array Return an array with data of a Element-Task-Relation, otherwise null
|
||||||
*/
|
*/
|
||||||
public function getMessageEventTaskRelationWhere(array $arrayCondition, $flagGetRecord = false)
|
public function getElementTaskRelationWhere(array $arrayCondition, $flagGetRecord = false)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
//Get data
|
//Get data
|
||||||
$criteria = $this->getMessageEventTaskRelationCriteria();
|
$criteria = $this->getElementTaskRelationCriteria();
|
||||||
|
|
||||||
foreach ($arrayCondition as $key => $value) {
|
foreach ($arrayCondition as $key => $value) {
|
||||||
if (is_array($value)) {
|
if (is_array($value)) {
|
||||||
@@ -340,14 +343,14 @@ class MessageEventTaskRelation
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$rsCriteria = \MessageEventTaskRelationPeer::doSelectRS($criteria);
|
$rsCriteria = \ElementTaskRelationPeer::doSelectRS($criteria);
|
||||||
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||||
|
|
||||||
if ($rsCriteria->next()) {
|
if ($rsCriteria->next()) {
|
||||||
$row = $rsCriteria->getRow();
|
$row = $rsCriteria->getRow();
|
||||||
|
|
||||||
//Return
|
//Return
|
||||||
return (!$flagGetRecord)? $this->getMessageEventTaskRelationDataFromRecord($row) : $row;
|
return (!$flagGetRecord)? $this->getElementTaskRelationDataFromRecord($row) : $row;
|
||||||
} else {
|
} else {
|
||||||
//Return
|
//Return
|
||||||
return null;
|
return null;
|
||||||
@@ -340,7 +340,7 @@ class MessageApplication
|
|||||||
$criteria->addSelectColumn(\MessageEventDefinitionPeer::MSGED_USR_UID);
|
$criteria->addSelectColumn(\MessageEventDefinitionPeer::MSGED_USR_UID);
|
||||||
$criteria->addSelectColumn(\MessageEventDefinitionPeer::MSGED_VARIABLES);
|
$criteria->addSelectColumn(\MessageEventDefinitionPeer::MSGED_VARIABLES);
|
||||||
$criteria->addSelectColumn(\MessageEventDefinitionPeer::MSGED_CORRELATION);
|
$criteria->addSelectColumn(\MessageEventDefinitionPeer::MSGED_CORRELATION);
|
||||||
$criteria->addSelectColumn(\MessageEventTaskRelationPeer::TAS_UID);
|
$criteria->addSelectColumn(\ElementTaskRelationPeer::TAS_UID);
|
||||||
|
|
||||||
$arrayEventType = array("START", "INTERMEDIATE");
|
$arrayEventType = array("START", "INTERMEDIATE");
|
||||||
$arrayEventMarker = array("MESSAGECATCH");
|
$arrayEventMarker = array("MESSAGECATCH");
|
||||||
@@ -351,7 +351,8 @@ class MessageApplication
|
|||||||
|
|
||||||
$criteria->addJoin(\MessageApplicationPeer::EVN_UID_CATCH, \MessageEventDefinitionPeer::EVN_UID, \Criteria::INNER_JOIN);
|
$criteria->addJoin(\MessageApplicationPeer::EVN_UID_CATCH, \MessageEventDefinitionPeer::EVN_UID, \Criteria::INNER_JOIN);
|
||||||
|
|
||||||
$criteria->addJoin(\MessageApplicationPeer::EVN_UID_CATCH, \MessageEventTaskRelationPeer::EVN_UID, \Criteria::INNER_JOIN);
|
$criteria->addJoin(\MessageApplicationPeer::EVN_UID_CATCH, \ElementTaskRelationPeer::ELEMENT_UID, \Criteria::INNER_JOIN);
|
||||||
|
$criteria->add(\ElementTaskRelationPeer::ELEMENT_TYPE, "bpmnEvent", \Criteria::EQUAL);
|
||||||
|
|
||||||
if (!is_null($arrayFilterData) && is_array($arrayFilterData) && isset($arrayFilterData["messageApplicationStatus"]) && trim($arrayFilterData["messageApplicationStatus"]) != "") {
|
if (!is_null($arrayFilterData) && is_array($arrayFilterData) && isset($arrayFilterData["messageApplicationStatus"]) && trim($arrayFilterData["messageApplicationStatus"]) != "") {
|
||||||
$criteria->add(\MessageApplicationPeer::MSGAPP_STATUS, $arrayFilterData["messageApplicationStatus"], \Criteria::EQUAL);
|
$criteria->add(\MessageApplicationPeer::MSGAPP_STATUS, $arrayFilterData["messageApplicationStatus"], \Criteria::EQUAL);
|
||||||
|
|||||||
@@ -288,7 +288,7 @@ class WebEntryEvent
|
|||||||
throw new \Exception(\G::LoadTranslation("ID_EVENT_NOT_EXIST", array($this->arrayFieldNameForException["eventUid"], $arrayData["EVN_UID"])));
|
throw new \Exception(\G::LoadTranslation("ID_EVENT_NOT_EXIST", array($this->arrayFieldNameForException["eventUid"], $arrayData["EVN_UID"])));
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($obj->getEvnType() != "START") {
|
if (($obj->getEvnType() != "START") || ($obj->getEvnType() == "START" && $obj->getEvnMarker() != "EMPTY")) {
|
||||||
throw new \Exception(\G::LoadTranslation("ID_EVENT_NOT_IS_START_EVENT", array($this->arrayFieldNameForException["eventUid"], $arrayData["EVN_UID"])));
|
throw new \Exception(\G::LoadTranslation("ID_EVENT_NOT_IS_START_EVENT", array($this->arrayFieldNameForException["eventUid"], $arrayData["EVN_UID"])));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
"intermediate-catch-message-event" => array("type" => "INTERMEDIATE-CATCH-MESSAGE-EVENT", "prefix" => "icme-")
|
"intermediate-catch-message-event" => array("type" => "INTERMEDIATE-CATCH-MESSAGE-EVENT", "prefix" => "icme-")
|
||||||
);
|
);
|
||||||
|
|
||||||
private $arrayMessageEventTaskRelation = array();
|
private $arrayElementTaskRelation = array();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* OVERRIDES
|
* OVERRIDES
|
||||||
@@ -212,30 +212,49 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function removeGateway($gatUid)
|
public function removeElementTaskRelation($elementUid, $elementType)
|
||||||
{
|
{
|
||||||
// $gatewayData = $this->getGateway($gatUid);
|
try {
|
||||||
// $flowsDest = \BpmnFlow::findAllBy(\BpmnFlowPeer::FLO_ELEMENT_DEST, $gatUid);
|
$elementTaskRelation = new \ProcessMaker\BusinessModel\ElementTaskRelation();
|
||||||
|
|
||||||
// foreach ($flowsDest as $flowDest) {
|
$arrayElementTaskRelationData = $elementTaskRelation->getElementTaskRelationWhere(
|
||||||
// switch ($flowDest->getFloElementOriginType()) {
|
array(
|
||||||
// case "bpmnActivity":
|
\ElementTaskRelationPeer::PRJ_UID => $this->wp->getUid(),
|
||||||
// $actUid = $flowDest->getFloElementOrigin();
|
\ElementTaskRelationPeer::ELEMENT_UID => $elementUid,
|
||||||
// $flowsOrigin = \BpmnFlow::findAllBy(\BpmnFlowPeer::FLO_ELEMENT_ORIGIN, $gatUid);
|
\ElementTaskRelationPeer::ELEMENT_TYPE => $elementType
|
||||||
//
|
),
|
||||||
// foreach ($flowsOrigin as $flowOrigin) {
|
true
|
||||||
// switch ($flowOrigin->getFloElementDestType()) {
|
);
|
||||||
// case "bpmnActivity":
|
|
||||||
// $toActUid = $flowOrigin->getFloElementDest();
|
|
||||||
// $this->wp->removeRouteFromTo($actUid, $toActUid);
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
parent::removeGateway($gatUid);
|
if (!is_null($arrayElementTaskRelationData)) {
|
||||||
|
//Task - Delete
|
||||||
|
$arrayTaskData = $this->wp->getTask($arrayElementTaskRelationData["TAS_UID"]);
|
||||||
|
|
||||||
|
if (!is_null($arrayTaskData)) {
|
||||||
|
$this->wp->removeTask($arrayElementTaskRelationData["TAS_UID"]);
|
||||||
|
}
|
||||||
|
|
||||||
|
//Element-Task-Relation - Delete
|
||||||
|
$elementTaskRelation->deleteWhere(array(\ElementTaskRelationPeer::ETR_UID => $arrayElementTaskRelationData["ETR_UID"]));
|
||||||
|
|
||||||
|
//Array - Delete element
|
||||||
|
unset($this->arrayElementTaskRelation[$elementUid]);
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeGateway($gatewayUid)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
//Element-Task-Relation - Delete
|
||||||
|
$this->removeElementTaskRelation($gatewayUid, "bpmnGateway");
|
||||||
|
|
||||||
|
parent::removeGateway($gatewayUid);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function addFlow($data)
|
public function addFlow($data)
|
||||||
@@ -249,7 +268,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
case "bpmnActivity":
|
case "bpmnActivity":
|
||||||
$event = \BpmnEventPeer::retrieveByPK($data["FLO_ELEMENT_ORIGIN"]);
|
$event = \BpmnEventPeer::retrieveByPK($data["FLO_ELEMENT_ORIGIN"]);
|
||||||
|
|
||||||
// setting as start task
|
//Setting as start Task
|
||||||
if (!is_null($event) && $event->getEvnType() == "START" && $event->getEvnMarker() == "EMPTY") {
|
if (!is_null($event) && $event->getEvnType() == "START" && $event->getEvnMarker() == "EMPTY") {
|
||||||
$this->wp->setStartTask($data["FLO_ELEMENT_DEST"]);
|
$this->wp->setStartTask($data["FLO_ELEMENT_DEST"]);
|
||||||
}
|
}
|
||||||
@@ -269,7 +288,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
case "bpmnEvent":
|
case "bpmnEvent":
|
||||||
$event = \BpmnEventPeer::retrieveByPK($data["FLO_ELEMENT_DEST"]);
|
$event = \BpmnEventPeer::retrieveByPK($data["FLO_ELEMENT_DEST"]);
|
||||||
|
|
||||||
// setting as end task
|
//Setting as end Task
|
||||||
if (!is_null($event) && $event->getEvnType() == "END" && $event->getEvnMarker() == "EMPTY") {
|
if (!is_null($event) && $event->getEvnType() == "END" && $event->getEvnMarker() == "EMPTY") {
|
||||||
$this->wp->setEndTask($data["FLO_ELEMENT_ORIGIN"]);
|
$this->wp->setEndTask($data["FLO_ELEMENT_ORIGIN"]);
|
||||||
}
|
}
|
||||||
@@ -298,10 +317,10 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$event = \BpmnEventPeer::retrieveByPK($flowBefore->getFloElementOrigin());
|
$event = \BpmnEventPeer::retrieveByPK($flowBefore->getFloElementOrigin());
|
||||||
|
|
||||||
if (!is_null($event) && $event->getEvnType() == "START" && $event->getEvnMarker() == "EMPTY") {
|
if (!is_null($event) && $event->getEvnType() == "START" && $event->getEvnMarker() == "EMPTY") {
|
||||||
//Remove as start task
|
//Remove as start Task
|
||||||
$this->wp->setStartTask($flowBefore->getFloElementDest(), false);
|
$this->wp->setStartTask($flowBefore->getFloElementDest(), false);
|
||||||
|
|
||||||
//Setting as start task
|
//Setting as start Task
|
||||||
$this->wp->setStartTask($flowCurrent->getFloElementDest());
|
$this->wp->setStartTask($flowCurrent->getFloElementDest());
|
||||||
|
|
||||||
$this->updateEventStartObjects($flowCurrent->getFloElementOrigin(), $flowCurrent->getFloElementDest());
|
$this->updateEventStartObjects($flowCurrent->getFloElementOrigin(), $flowCurrent->getFloElementDest());
|
||||||
@@ -320,10 +339,10 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$event = \BpmnEventPeer::retrieveByPK($flowBefore->getFloElementDest());
|
$event = \BpmnEventPeer::retrieveByPK($flowBefore->getFloElementDest());
|
||||||
|
|
||||||
if (!is_null($event) && $event->getEvnType() == "END" && $event->getEvnMarker() == "EMPTY") {
|
if (!is_null($event) && $event->getEvnType() == "END" && $event->getEvnMarker() == "EMPTY") {
|
||||||
//Remove as end task
|
//Remove as end Task
|
||||||
$this->wp->setEndTask($flowBefore->getFloElementOrigin(), false);
|
$this->wp->setEndTask($flowBefore->getFloElementOrigin(), false);
|
||||||
|
|
||||||
//Setting as end task
|
//Setting as end Task
|
||||||
$this->wp->setEndTask($flowCurrent->getFloElementOrigin());
|
$this->wp->setEndTask($flowCurrent->getFloElementOrigin());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -336,7 +355,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$event = \BpmnEventPeer::retrieveByPK($flowBefore->getFloElementDest());
|
$event = \BpmnEventPeer::retrieveByPK($flowBefore->getFloElementDest());
|
||||||
|
|
||||||
if (!is_null($event) && $event->getEvnType() == "END" && $event->getEvnMarker() == "EMPTY") {
|
if (!is_null($event) && $event->getEvnType() == "END" && $event->getEvnMarker() == "EMPTY") {
|
||||||
//Remove as end task
|
//Remove as end Task
|
||||||
$this->wp->setEndTask($flowBefore->getFloElementOrigin(), false);
|
$this->wp->setEndTask($flowBefore->getFloElementOrigin(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -395,6 +414,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
if (!is_null($event) && $event->getEvnType() == "START" && $event->getEvnMarker() == "EMPTY") {
|
if (!is_null($event) && $event->getEvnType() == "START" && $event->getEvnMarker() == "EMPTY") {
|
||||||
$activity = \BpmnActivityPeer::retrieveByPK($flow->getFloElementDest());
|
$activity = \BpmnActivityPeer::retrieveByPK($flow->getFloElementDest());
|
||||||
|
|
||||||
|
//Remove as start Task
|
||||||
if (!is_null($activity)) {
|
if (!is_null($activity)) {
|
||||||
$this->wp->setStartTask($activity->getActUid(), false);
|
$this->wp->setStartTask($activity->getActUid(), false);
|
||||||
}
|
}
|
||||||
@@ -416,6 +436,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
if (!is_null($event) && $event->getEvnType() == "END" && $event->getEvnMarker() == "EMPTY") {
|
if (!is_null($event) && $event->getEvnType() == "END" && $event->getEvnMarker() == "EMPTY") {
|
||||||
$activity = \BpmnActivityPeer::retrieveByPK($flow->getFloElementOrigin());
|
$activity = \BpmnActivityPeer::retrieveByPK($flow->getFloElementOrigin());
|
||||||
|
|
||||||
|
//Remove as end Task
|
||||||
if (! is_null($activity)) {
|
if (! is_null($activity)) {
|
||||||
$this->wp->setEndTask($activity->getActUid(), false);
|
$this->wp->setEndTask($activity->getActUid(), false);
|
||||||
}
|
}
|
||||||
@@ -453,6 +474,79 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
// TODO Complete for other routes, activity->activity, activity->gateway and viceversa
|
// TODO Complete for other routes, activity->activity, activity->gateway and viceversa
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function updateEventActivityDefinition(\BpmnEvent $bpmnEvent, $flagStartTask)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
if ($bpmnEvent->getEvnType() == "START") {
|
||||||
|
//Flows
|
||||||
|
$arrayFlow = \BpmnFlow::findAllBy(array(
|
||||||
|
\BpmnFlowPeer::FLO_TYPE => array("MESSAGE", \Criteria::NOT_EQUAL),
|
||||||
|
\BpmnFlowPeer::FLO_ELEMENT_ORIGIN => $bpmnEvent->getEvnUid(),
|
||||||
|
\BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE => "bpmnEvent"
|
||||||
|
));
|
||||||
|
|
||||||
|
foreach ($arrayFlow as $value) {
|
||||||
|
$arrayFlowData = $value->toArray();
|
||||||
|
|
||||||
|
switch ($arrayFlowData["FLO_ELEMENT_DEST_TYPE"]) {
|
||||||
|
case "bpmnActivity":
|
||||||
|
//Setting as start Task
|
||||||
|
//or
|
||||||
|
//Remove as start Task
|
||||||
|
$this->wp->setStartTask($arrayFlowData["FLO_ELEMENT_DEST"], $flagStartTask);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public function removeEventDefinition(\BpmnEvent $bpmnEvent)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
//Case-Scheduler - Delete
|
||||||
|
if ($bpmnEvent->getEvnType() == "START" && $bpmnEvent->getEvnMarker() == "TIMER") {
|
||||||
|
$caseScheduler = new \CaseScheduler();
|
||||||
|
|
||||||
|
if ($caseScheduler->Exists($bpmnEvent->getEvnUid())) {
|
||||||
|
$this->wp->removeCaseScheduler($bpmnEvent->getEvnUid());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//WebEntry-Event - Delete
|
||||||
|
if ($bpmnEvent->getEvnType() == "START" && $bpmnEvent->getEvnMarker() == "EMPTY") {
|
||||||
|
$webEntryEvent = new \ProcessMaker\BusinessModel\WebEntryEvent();
|
||||||
|
|
||||||
|
if ($webEntryEvent->existsEvent($bpmnEvent->getPrjUid(), $bpmnEvent->getEvnUid())) {
|
||||||
|
$arrayWebEntryEventData = $webEntryEvent->getWebEntryEventByEvent($bpmnEvent->getPrjUid(), $bpmnEvent->getEvnUid(), true);
|
||||||
|
|
||||||
|
$webEntryEvent->delete($arrayWebEntryEventData["WEE_UID"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Message-Event-Definition - Delete
|
||||||
|
$arrayEventType = array("START", "END", "INTERMEDIATE");
|
||||||
|
$arrayEventMarker = array("MESSAGETHROW", "MESSAGECATCH");
|
||||||
|
|
||||||
|
if (in_array($bpmnEvent->getEvnType(), $arrayEventType) && in_array($bpmnEvent->getEvnMarker(), $arrayEventMarker)) {
|
||||||
|
$messageEventDefinition = new \ProcessMaker\BusinessModel\MessageEventDefinition();
|
||||||
|
|
||||||
|
if ($messageEventDefinition->existsEvent($bpmnEvent->getPrjUid(), $bpmnEvent->getEvnUid())) {
|
||||||
|
$arrayMessageEventDefinitionData = $messageEventDefinition->getMessageEventDefinitionByEvent($bpmnEvent->getPrjUid(), $bpmnEvent->getEvnUid(), true);
|
||||||
|
|
||||||
|
$messageEventDefinition->delete($arrayMessageEventDefinitionData["MSGED_UID"]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Element-Task-Relation - Delete
|
||||||
|
$this->removeElementTaskRelation($bpmnEvent->getEvnUid(), "bpmnEvent");
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function addEvent($data)
|
public function addEvent($data)
|
||||||
{
|
{
|
||||||
if (! array_key_exists("EVN_TYPE", $data)) {
|
if (! array_key_exists("EVN_TYPE", $data)) {
|
||||||
@@ -475,80 +569,49 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
return $eventUid;
|
return $eventUid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function updateEvent($eventUid, array $arrayEventData)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
$bpmnEvent = \BpmnEventPeer::retrieveByPK($eventUid);
|
||||||
|
|
||||||
|
if ((isset($arrayEventData["EVN_TYPE"]) && $arrayEventData["EVN_TYPE"] != $bpmnEvent->getEvnType()) ||
|
||||||
|
(isset($arrayEventData["EVN_MARKER"]) && $arrayEventData["EVN_MARKER"] != $bpmnEvent->getEvnMarker())
|
||||||
|
) {
|
||||||
|
$this->updateEventActivityDefinition($bpmnEvent, false);
|
||||||
|
$this->removeEventDefinition($bpmnEvent);
|
||||||
|
}
|
||||||
|
|
||||||
|
parent::updateEvent($eventUid, $arrayEventData);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public function removeEvent($eventUid)
|
public function removeEvent($eventUid)
|
||||||
{
|
{
|
||||||
$event = \BpmnEventPeer::retrieveByPK($eventUid);
|
try {
|
||||||
|
$bpmnEvent = \BpmnEventPeer::retrieveByPK($eventUid);
|
||||||
|
|
||||||
//Delete case scheduler
|
$this->updateEventActivityDefinition($bpmnEvent, false);
|
||||||
if ($event && $event->getEvnMarker() == "TIMER" && $event->getEvnType() == "START") {
|
$this->removeEventDefinition($bpmnEvent);
|
||||||
$this->wp->removeCaseScheduler($eventUid);
|
|
||||||
|
parent::removeEvent($eventUid);
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw $e;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_null($event)) {
|
|
||||||
//WebEntry-Event - Delete
|
|
||||||
if ($event->getEvnType() == "START") {
|
|
||||||
$webEntryEvent = new \ProcessMaker\BusinessModel\WebEntryEvent();
|
|
||||||
|
|
||||||
if ($webEntryEvent->existsEvent($event->getPrjUid(), $eventUid)) {
|
|
||||||
$arrayWebEntryEventData = $webEntryEvent->getWebEntryEventByEvent($event->getPrjUid(), $eventUid, true);
|
|
||||||
|
|
||||||
$webEntryEvent->delete($arrayWebEntryEventData["WEE_UID"]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Message-Event-Definition - Delete
|
|
||||||
$arrayEventType = array("START", "END", "INTERMEDIATE");
|
|
||||||
$arrayEventMarker = array("MESSAGETHROW", "MESSAGECATCH");
|
|
||||||
|
|
||||||
if (!is_null($event) &&
|
|
||||||
in_array($event->getEvnType(), $arrayEventType) && in_array($event->getEvnMarker(), $arrayEventMarker)
|
|
||||||
) {
|
|
||||||
$messageEventDefinition = new \ProcessMaker\BusinessModel\MessageEventDefinition();
|
|
||||||
|
|
||||||
if ($messageEventDefinition->existsEvent($event->getPrjUid(), $eventUid)) {
|
|
||||||
$arrayMessageEventDefinitionData = $messageEventDefinition->getMessageEventDefinitionByEvent($event->getPrjUid(), $eventUid, true);
|
|
||||||
|
|
||||||
$messageEventDefinition->delete($arrayMessageEventDefinitionData["MSGED_UID"]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//Message-Event-Task-Relation - Delete
|
|
||||||
$messageEventTaskRelation = new \ProcessMaker\BusinessModel\MessageEventTaskRelation();
|
|
||||||
|
|
||||||
$arrayMessageEventTaskRelationData = $messageEventTaskRelation->getMessageEventTaskRelationWhere(
|
|
||||||
array(
|
|
||||||
\MessageEventTaskRelationPeer::PRJ_UID => $event->getPrjUid(),
|
|
||||||
\MessageEventTaskRelationPeer::EVN_UID => $event->getEvnUid()
|
|
||||||
),
|
|
||||||
true
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!is_null($arrayMessageEventTaskRelationData)) {
|
|
||||||
//Task - Delete
|
|
||||||
$arrayTaskData = $this->wp->getTask($arrayMessageEventTaskRelationData["TAS_UID"]);
|
|
||||||
|
|
||||||
if (!is_null($arrayTaskData)) {
|
|
||||||
$this->wp->removeTask($arrayMessageEventTaskRelationData["TAS_UID"]);
|
|
||||||
}
|
|
||||||
|
|
||||||
//Message-Event-Task-Relation - Delete
|
|
||||||
$messageEventTaskRelation->deleteWhere(array(\MessageEventTaskRelationPeer::MSGETR_UID => $arrayMessageEventTaskRelationData["MSGETR_UID"]));
|
|
||||||
|
|
||||||
//Array - Delete element
|
|
||||||
unset($this->arrayMessageEventTaskRelation[$eventUid]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
parent::removeEvent($eventUid);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateEventStartObjects($eventUid, $taskUid)
|
public function updateEventStartObjects($eventUid, $taskUid)
|
||||||
{
|
{
|
||||||
$event = \BpmnEventPeer::retrieveByPK($eventUid);
|
$event = \BpmnEventPeer::retrieveByPK($eventUid);
|
||||||
|
|
||||||
//Update case scheduler
|
//Case-Scheduler - Update
|
||||||
if (!is_null($event) && $event->getEvnType() == "START" && $event->getEvnMarker() == "TIMER") {
|
if (!is_null($event) && $event->getEvnType() == "START" && $event->getEvnMarker() == "TIMER") {
|
||||||
$this->wp->updateCaseScheduler($eventUid, array("TAS_UID" => $taskUid));
|
$caseScheduler = new \CaseScheduler();
|
||||||
|
|
||||||
|
if ($caseScheduler->Exists($eventUid)) {
|
||||||
|
$this->wp->updateCaseScheduler($eventUid, array("TAS_UID" => $taskUid));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Update web entry
|
//Update web entry
|
||||||
@@ -560,8 +623,8 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
public function createTaskByElement($elementUid, $elementType, $key)
|
public function createTaskByElement($elementUid, $elementType, $key)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if (isset($this->arrayMessageEventTaskRelation[$elementUid])) {
|
if (isset($this->arrayElementTaskRelation[$elementUid])) {
|
||||||
$taskUid = $this->arrayMessageEventTaskRelation[$elementUid];
|
$taskUid = $this->arrayElementTaskRelation[$elementUid];
|
||||||
} else {
|
} else {
|
||||||
$taskPosX = 0;
|
$taskPosX = 0;
|
||||||
$taskPosY = 0;
|
$taskPosY = 0;
|
||||||
@@ -604,7 +667,6 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
if ($elementType == "bpmnEvent" &&
|
if ($elementType == "bpmnEvent" &&
|
||||||
in_array($key, array("end-message-event", "start-message-event", "intermediate-catch-message-event"))
|
in_array($key, array("end-message-event", "start-message-event", "intermediate-catch-message-event"))
|
||||||
) {
|
) {
|
||||||
|
|
||||||
if (in_array($key, array("start-message-event", "intermediate-catch-message-event"))) {
|
if (in_array($key, array("start-message-event", "intermediate-catch-message-event"))) {
|
||||||
//Task - User
|
//Task - User
|
||||||
//Assign to admin
|
//Assign to admin
|
||||||
@@ -612,21 +674,22 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
|
|
||||||
$result = $task->assignUser($taskUid, "00000000000000000000000000000001", 1);
|
$result = $task->assignUser($taskUid, "00000000000000000000000000000001", 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Message-Event-Task-Relation - Create
|
|
||||||
$messageEventTaskRelation = new \ProcessMaker\BusinessModel\MessageEventTaskRelation();
|
|
||||||
|
|
||||||
$arrayResult = $messageEventTaskRelation->create(
|
|
||||||
$this->wp->getUid(),
|
|
||||||
array(
|
|
||||||
"EVN_UID" => $elementUid,
|
|
||||||
"TAS_UID" => $taskUid
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
//Array - Add element
|
|
||||||
$this->arrayMessageEventTaskRelation[$elementUid] = $taskUid;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Element-Task-Relation - Create
|
||||||
|
$elementTaskRelation = new \ProcessMaker\BusinessModel\ElementTaskRelation();
|
||||||
|
|
||||||
|
$arrayResult = $elementTaskRelation->create(
|
||||||
|
$this->wp->getUid(),
|
||||||
|
array(
|
||||||
|
"ELEMENT_UID" => $elementUid,
|
||||||
|
"ELEMENT_TYPE" => $elementType,
|
||||||
|
"TAS_UID" => $taskUid
|
||||||
|
)
|
||||||
|
);
|
||||||
|
|
||||||
|
//Array - Add element
|
||||||
|
$this->arrayElementTaskRelation[$elementUid] = $taskUid;
|
||||||
}
|
}
|
||||||
|
|
||||||
//Return
|
//Return
|
||||||
@@ -695,9 +758,9 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
\BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE => "bpmnGateway"
|
\BpmnFlowPeer::FLO_ELEMENT_ORIGIN_TYPE => "bpmnGateway"
|
||||||
));
|
));
|
||||||
|
|
||||||
if ($arrayFlow > 0) {
|
//if ($arrayFlow > 0) {
|
||||||
$this->wp->resetTaskRoutes($activityUid);
|
// $this->wp->resetTaskRoutes($activityUid);
|
||||||
}
|
//}
|
||||||
|
|
||||||
foreach ($arrayFlow as $value) {
|
foreach ($arrayFlow as $value) {
|
||||||
$arrayFlowData = $value->toArray();
|
$arrayFlowData = $value->toArray();
|
||||||
@@ -734,9 +797,6 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
case "END":
|
case "END":
|
||||||
//$event->getEvnMarker(): EMPTY or MESSAGETHROW
|
//$event->getEvnMarker(): EMPTY or MESSAGETHROW
|
||||||
switch ($event->getEvnMarker()) {
|
switch ($event->getEvnMarker()) {
|
||||||
case "EMPTY":
|
|
||||||
$result = $this->wp->addRoute($activityUid, -1, $routeType, $routeCondition, $routeDefault);
|
|
||||||
break;
|
|
||||||
case "MESSAGETHROW":
|
case "MESSAGETHROW":
|
||||||
$taskUid = $this->createTaskByElement(
|
$taskUid = $this->createTaskByElement(
|
||||||
$event->getEvnUid(),
|
$event->getEvnUid(),
|
||||||
@@ -747,9 +807,14 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$result = $this->wp->addRoute($activityUid, $taskUid, $routeType, $routeCondition, $routeDefault);
|
$result = $this->wp->addRoute($activityUid, $taskUid, $routeType, $routeCondition, $routeDefault);
|
||||||
$result = $this->wp->addRoute($taskUid, -1, "SEQUENTIAL");
|
$result = $this->wp->addRoute($taskUid, -1, "SEQUENTIAL");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
//EMPTY //and others types
|
||||||
|
$result = $this->wp->addRoute($activityUid, -1, $routeType, $routeCondition, $routeDefault);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "INTERMEDIATE":
|
default:
|
||||||
|
//INTERMEDIATE //and others types
|
||||||
$this->mapBpmnEventToWorkflowRoutes($activityUid, $arrayFlowData["FLO_ELEMENT_DEST"], $routeType, $routeCondition, $routeDefault);
|
$this->mapBpmnEventToWorkflowRoutes($activityUid, $arrayFlowData["FLO_ELEMENT_DEST"], $routeType, $routeCondition, $routeDefault);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -774,12 +839,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
try {
|
try {
|
||||||
$arrayEventData = \BpmnEvent::findOneBy(\BpmnEventPeer::EVN_UID, $eventUid)->toArray();
|
$arrayEventData = \BpmnEvent::findOneBy(\BpmnEventPeer::EVN_UID, $eventUid)->toArray();
|
||||||
|
|
||||||
$arrayEventType = array("START", "INTERMEDIATE");
|
if (!is_null($arrayEventData)) {
|
||||||
$arrayEventMarker = array("MESSAGETHROW", "MESSAGECATCH");
|
|
||||||
|
|
||||||
if (!is_null($arrayEventData) &&
|
|
||||||
in_array($arrayEventData["EVN_TYPE"], $arrayEventType) && in_array($arrayEventData["EVN_MARKER"], $arrayEventMarker)
|
|
||||||
) {
|
|
||||||
//Event - INTERMEDIATE-CATCH-MESSAGE-EVENT
|
//Event - INTERMEDIATE-CATCH-MESSAGE-EVENT
|
||||||
if ($arrayEventData["EVN_TYPE"] == "INTERMEDIATE" && $arrayEventData["EVN_MARKER"] == "MESSAGECATCH") {
|
if ($arrayEventData["EVN_TYPE"] == "INTERMEDIATE" && $arrayEventData["EVN_MARKER"] == "MESSAGECATCH") {
|
||||||
$taskUid = $this->createTaskByElement(
|
$taskUid = $this->createTaskByElement(
|
||||||
@@ -828,9 +888,6 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
case "END":
|
case "END":
|
||||||
//$event->getEvnMarker(): EMPTY or MESSAGETHROW
|
//$event->getEvnMarker(): EMPTY or MESSAGETHROW
|
||||||
switch ($event->getEvnMarker()) {
|
switch ($event->getEvnMarker()) {
|
||||||
case "EMPTY":
|
|
||||||
$result = $this->wp->addRoute($activityUid, -1, $routeType, $routeCondition, $routeDefault);
|
|
||||||
break;
|
|
||||||
case "MESSAGETHROW":
|
case "MESSAGETHROW":
|
||||||
$taskUid = $this->createTaskByElement(
|
$taskUid = $this->createTaskByElement(
|
||||||
$event->getEvnUid(),
|
$event->getEvnUid(),
|
||||||
@@ -841,9 +898,14 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$result = $this->wp->addRoute($activityUid, $taskUid, $routeType, $routeCondition, $routeDefault);
|
$result = $this->wp->addRoute($activityUid, $taskUid, $routeType, $routeCondition, $routeDefault);
|
||||||
$result = $this->wp->addRoute($taskUid, -1, "SEQUENTIAL");
|
$result = $this->wp->addRoute($taskUid, -1, "SEQUENTIAL");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
//EMPTY //and others types
|
||||||
|
$result = $this->wp->addRoute($activityUid, -1, $routeType, $routeCondition, $routeDefault);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "INTERMEDIATE":
|
default:
|
||||||
|
//INTERMEDIATE //and others types
|
||||||
$this->mapBpmnEventToWorkflowRoutes($activityUid, $arrayFlowData["FLO_ELEMENT_DEST"], $routeType, $routeCondition, $routeDefault);
|
$this->mapBpmnEventToWorkflowRoutes($activityUid, $arrayFlowData["FLO_ELEMENT_DEST"], $routeType, $routeCondition, $routeDefault);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -866,18 +928,18 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
|
|
||||||
public function mapBpmnFlowsToWorkflowRoutes()
|
public function mapBpmnFlowsToWorkflowRoutes()
|
||||||
{
|
{
|
||||||
//Task - Delete dummies
|
//Task dummies //Delete Task Routes
|
||||||
$this->wp->deleteTaskByArrayType(
|
foreach ($this->arrayElementTaskRelation as $value) {
|
||||||
$this->wp->getUid(),
|
$this->wp->resetTaskRoutes($value);
|
||||||
array(
|
}
|
||||||
$this->arrayTaskAttribute["gateway-to-gateway"]["type"]
|
|
||||||
)
|
|
||||||
);
|
|
||||||
|
|
||||||
//Activities
|
//Activities
|
||||||
foreach ($this->getActivities() as $value) {
|
foreach ($this->getActivities() as $value) {
|
||||||
$activity = $value;
|
$activity = $value;
|
||||||
|
|
||||||
|
//Delete Task Routes
|
||||||
|
$this->wp->resetTaskRoutes($activity["ACT_UID"]);
|
||||||
|
|
||||||
//Flows
|
//Flows
|
||||||
$arrayFlow = \BpmnFlow::findAllBy(array(
|
$arrayFlow = \BpmnFlow::findAllBy(array(
|
||||||
\BpmnFlowPeer::FLO_TYPE => array("MESSAGE", \Criteria::NOT_EQUAL),
|
\BpmnFlowPeer::FLO_TYPE => array("MESSAGE", \Criteria::NOT_EQUAL),
|
||||||
@@ -910,9 +972,6 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
case "END":
|
case "END":
|
||||||
//$event->getEvnMarker(): EMPTY or MESSAGETHROW
|
//$event->getEvnMarker(): EMPTY or MESSAGETHROW
|
||||||
switch ($event->getEvnMarker()) {
|
switch ($event->getEvnMarker()) {
|
||||||
case "EMPTY":
|
|
||||||
//This it's already implemented
|
|
||||||
break;
|
|
||||||
case "MESSAGETHROW":
|
case "MESSAGETHROW":
|
||||||
$taskUid = $this->createTaskByElement(
|
$taskUid = $this->createTaskByElement(
|
||||||
$event->getEvnUid(),
|
$event->getEvnUid(),
|
||||||
@@ -923,9 +982,15 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$result = $this->wp->addRoute($activity["ACT_UID"], $taskUid, "SEQUENTIAL");
|
$result = $this->wp->addRoute($activity["ACT_UID"], $taskUid, "SEQUENTIAL");
|
||||||
$result = $this->wp->addRoute($taskUid, -1, "SEQUENTIAL");
|
$result = $this->wp->addRoute($taskUid, -1, "SEQUENTIAL");
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
//EMPTY //This it's already implemented
|
||||||
|
//and others types
|
||||||
|
$result = $this->wp->addRoute($activity["ACT_UID"], -1, "SEQUENTIAL");
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "INTERMEDIATE":
|
default:
|
||||||
|
//INTERMEDIATE //and others types
|
||||||
$this->mapBpmnEventToWorkflowRoutes($activity["ACT_UID"], $flow->getFloElementDest());
|
$this->mapBpmnEventToWorkflowRoutes($activity["ACT_UID"], $flow->getFloElementDest());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -935,31 +1000,33 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//Events - Message-Event
|
//Events
|
||||||
$arrayEventType = array("START", "END", "INTERMEDIATE");
|
|
||||||
$arrayEventMarker = array("MESSAGETHROW", "MESSAGECATCH");
|
|
||||||
|
|
||||||
foreach ($this->getEvents() as $value) {
|
foreach ($this->getEvents() as $value) {
|
||||||
$event = $value;
|
$event = $value;
|
||||||
|
|
||||||
if (in_array($event["EVN_TYPE"], $arrayEventType) && in_array($event["EVN_MARKER"], $arrayEventMarker)) {
|
switch ($event["EVN_TYPE"]) {
|
||||||
switch ($event["EVN_TYPE"]) {
|
case "START":
|
||||||
case "START":
|
switch ($event["EVN_MARKER"]) {
|
||||||
$taskUid = $this->createTaskByElement(
|
case "MESSAGECATCH":
|
||||||
$event["EVN_UID"],
|
$taskUid = $this->createTaskByElement(
|
||||||
"bpmnEvent",
|
$event["EVN_UID"],
|
||||||
"start-message-event"
|
"bpmnEvent",
|
||||||
);
|
"start-message-event"
|
||||||
|
);
|
||||||
|
|
||||||
$this->wp->setStartTask($taskUid);
|
$this->wp->setStartTask($taskUid);
|
||||||
|
|
||||||
$this->mapBpmnEventToWorkflowRoutes($taskUid, $event["EVN_UID"]);
|
$this->mapBpmnEventToWorkflowRoutes($taskUid, $event["EVN_UID"]);
|
||||||
break;
|
break;
|
||||||
case "END":
|
case "EMPTY":
|
||||||
break;
|
$this->updateEventActivityDefinition(\BpmnEventPeer::retrieveByPK($event["EVN_UID"]), true);
|
||||||
case "INTERMEDIATE":
|
break;
|
||||||
break;
|
}
|
||||||
}
|
break;
|
||||||
|
case "END":
|
||||||
|
break;
|
||||||
|
case "INTERMEDIATE":
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1102,6 +1169,29 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
return $project;
|
return $project;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function updateBoundByArrayUid(array $arrayObjectData, array $arrayUid)
|
||||||
|
{
|
||||||
|
try {
|
||||||
|
unset($arrayObjectData["BOU_UID"]);
|
||||||
|
|
||||||
|
if ($arrayObjectData["BOU_CONTAINER"] == "bpmnPool" ||
|
||||||
|
$arrayObjectData["BOU_CONTAINER"] == "bpmnLane" ||
|
||||||
|
$arrayObjectData["BOU_CONTAINER"] == "bpmnActivity"
|
||||||
|
) {
|
||||||
|
foreach ($arrayUid as $value) {
|
||||||
|
if ($arrayObjectData["BOU_ELEMENT"] == $value["old_uid"]) {
|
||||||
|
$arrayObjectData["BOU_ELEMENT"] = $value["new_uid"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//Return
|
||||||
|
return $arrayObjectData;
|
||||||
|
} catch (\Exception $e) {
|
||||||
|
throw $e;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update project from a struct defined.
|
* Update project from a struct defined.
|
||||||
*
|
*
|
||||||
@@ -1164,24 +1254,24 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$bwp->update($projectRecord);
|
$bwp->update($projectRecord);
|
||||||
|
|
||||||
//Array - Set empty
|
//Array - Set empty
|
||||||
$bwp->arrayMessageEventTaskRelation = array();
|
$bwp->arrayElementTaskRelation = array();
|
||||||
|
|
||||||
//Message-Event-Task-Relation - Get all records
|
//Element-Task-Relation - Get all records
|
||||||
$criteria = new \Criteria("workflow");
|
$criteria = new \Criteria("workflow");
|
||||||
|
|
||||||
$criteria->addSelectColumn(\MessageEventTaskRelationPeer::EVN_UID);
|
$criteria->addSelectColumn(\ElementTaskRelationPeer::ELEMENT_UID);
|
||||||
$criteria->addSelectColumn(\MessageEventTaskRelationPeer::TAS_UID);
|
$criteria->addSelectColumn(\ElementTaskRelationPeer::TAS_UID);
|
||||||
|
|
||||||
$criteria->add(\MessageEventTaskRelationPeer::PRJ_UID, $bwp->wp->getUid(), \Criteria::EQUAL);
|
$criteria->add(\ElementTaskRelationPeer::PRJ_UID, $bwp->wp->getUid(), \Criteria::EQUAL);
|
||||||
|
|
||||||
$rsCriteria = \MessageEventTaskRelationPeer::doSelectRS($criteria);
|
$rsCriteria = \ElementTaskRelationPeer::doSelectRS($criteria);
|
||||||
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
||||||
|
|
||||||
while ($rsCriteria->next()) {
|
while ($rsCriteria->next()) {
|
||||||
$row = $rsCriteria->getRow();
|
$row = $rsCriteria->getRow();
|
||||||
|
|
||||||
//Array - Add element
|
//Array - Add element
|
||||||
$bwp->arrayMessageEventTaskRelation[$row["EVN_UID"]] = $row["TAS_UID"];
|
$bwp->arrayElementTaskRelation[$row["ELEMENT_UID"]] = $row["TAS_UID"];
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -1195,7 +1285,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
|
|
||||||
if ($forceInsert || is_null($dataObject)) {
|
if ($forceInsert || is_null($dataObject)) {
|
||||||
if ($generateUid) {
|
if ($generateUid) {
|
||||||
//Laneset
|
//Generate and update UID
|
||||||
unset($lanesetData["BOU_UID"]);
|
unset($lanesetData["BOU_UID"]);
|
||||||
|
|
||||||
$uidOld = $lanesetData["LNS_UID"];
|
$uidOld = $lanesetData["LNS_UID"];
|
||||||
@@ -1246,7 +1336,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
|
|
||||||
if ($forceInsert || is_null($dataObject)) {
|
if ($forceInsert || is_null($dataObject)) {
|
||||||
if ($generateUid) {
|
if ($generateUid) {
|
||||||
//Laneset
|
//Generate and update UID
|
||||||
unset($laneData["BOU_UID"]);
|
unset($laneData["BOU_UID"]);
|
||||||
|
|
||||||
$uidOld = $laneData["LAN_UID"];
|
$uidOld = $laneData["LAN_UID"];
|
||||||
@@ -1295,20 +1385,10 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($forceInsert || is_null($activity)) {
|
if ($forceInsert || is_null($activity)) {
|
||||||
|
|
||||||
if ($generateUid) {
|
if ($generateUid) {
|
||||||
//Activity
|
//Generate and update UID
|
||||||
|
$activityData = $bwp->updateBoundByArrayUid($activityData, $result);
|
||||||
|
|
||||||
//Update UIDs
|
|
||||||
if ($activityData["BOU_CONTAINER"] == "bpmnPool" || $activityData["BOU_CONTAINER"] == "bpmnLane" || $activityData["BOU_CONTAINER"] == "bpmnActivity") {
|
|
||||||
foreach ($result as $value) {
|
|
||||||
if ($activityData["BOU_ELEMENT"] == $value["old_uid"]) {
|
|
||||||
$activityData["BOU_ELEMENT"] = $value["new_uid"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($activityData["BOU_UID"]);
|
|
||||||
$uidOld = $activityData["ACT_UID"];
|
$uidOld = $activityData["ACT_UID"];
|
||||||
$activityData["ACT_UID"] = Util\Common::generateUID();
|
$activityData["ACT_UID"] = Util\Common::generateUID();
|
||||||
|
|
||||||
@@ -1356,18 +1436,8 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
|
|
||||||
if ($forceInsert || is_null($artifact)) {
|
if ($forceInsert || is_null($artifact)) {
|
||||||
if ($generateUid) {
|
if ($generateUid) {
|
||||||
//Artifact
|
//Generate and update UID
|
||||||
|
$artifactData = $bwp->updateBoundByArrayUid($artifactData, $result);
|
||||||
//Update UIDs
|
|
||||||
if ($artifactData["BOU_CONTAINER"] == "bpmnPool" || $artifactData["BOU_CONTAINER"] == "bpmnLane" || $artifactData["BOU_CONTAINER"] == "bpmnActivity") {
|
|
||||||
foreach ($result as $value) {
|
|
||||||
if ($artifactData["BOU_ELEMENT"] == $value["old_uid"]) {
|
|
||||||
$artifactData["BOU_ELEMENT"] = $value["new_uid"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($artifactData["BOU_UID"]);
|
|
||||||
|
|
||||||
$uidOld = $artifactData["ART_UID"];
|
$uidOld = $artifactData["ART_UID"];
|
||||||
$artifactData["ART_UID"] = Util\Common::generateUID();
|
$artifactData["ART_UID"] = Util\Common::generateUID();
|
||||||
@@ -1401,6 +1471,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
/*
|
/*
|
||||||
* Diagram's Gateways Handling
|
* Diagram's Gateways Handling
|
||||||
*/
|
*/
|
||||||
|
$arrayGatewayUid = array();
|
||||||
$arrayUidGatewayParallel = array();
|
$arrayUidGatewayParallel = array();
|
||||||
$flagGatewayParallel = false;
|
$flagGatewayParallel = false;
|
||||||
|
|
||||||
@@ -1420,18 +1491,8 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
|
|
||||||
if ($forceInsert || is_null($gateway)) {
|
if ($forceInsert || is_null($gateway)) {
|
||||||
if ($generateUid) {
|
if ($generateUid) {
|
||||||
//Gateway
|
//Generate and update UID
|
||||||
|
$gatewayData = $bwp->updateBoundByArrayUid($gatewayData, $result);
|
||||||
//Update UIDs
|
|
||||||
if ($gatewayData["BOU_CONTAINER"] == "bpmnPool" || $gatewayData["BOU_CONTAINER"] == "bpmnLane" || $gatewayData["BOU_CONTAINER"] == "bpmnActivity") {
|
|
||||||
foreach ($result as $value) {
|
|
||||||
if ($gatewayData["BOU_ELEMENT"] == $value["old_uid"]) {
|
|
||||||
$gatewayData["BOU_ELEMENT"] = $value["new_uid"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($gatewayData["BOU_UID"]);
|
|
||||||
|
|
||||||
$uidOld = $gatewayData["GAT_UID"];
|
$uidOld = $gatewayData["GAT_UID"];
|
||||||
$gatewayData["GAT_UID"] = Util\Common::generateUID();
|
$gatewayData["GAT_UID"] = Util\Common::generateUID();
|
||||||
@@ -1463,6 +1524,8 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$arrayGatewayUid[$gatewayData["GAT_UID"]] = 1;
|
||||||
|
|
||||||
$diagram["gateways"][$i] = $gatewayData;
|
$diagram["gateways"][$i] = $gatewayData;
|
||||||
$whiteList[] = $gatewayData["GAT_UID"];
|
$whiteList[] = $gatewayData["GAT_UID"];
|
||||||
}
|
}
|
||||||
@@ -1482,10 +1545,13 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$whiteList = array();
|
$whiteList = array();
|
||||||
foreach ($diagram["events"] as $i => $eventData) {
|
foreach ($diagram["events"] as $i => $eventData) {
|
||||||
$eventData = array_change_key_case($eventData, CASE_UPPER);
|
$eventData = array_change_key_case($eventData, CASE_UPPER);
|
||||||
|
|
||||||
unset($eventData["_EXTENDED"]);
|
unset($eventData["_EXTENDED"]);
|
||||||
|
|
||||||
if (array_key_exists("EVN_CANCEL_ACTIVITY", $eventData)) {
|
if (array_key_exists("EVN_CANCEL_ACTIVITY", $eventData)) {
|
||||||
$eventData["EVN_CANCEL_ACTIVITY"] = $eventData["EVN_CANCEL_ACTIVITY"] ? 1 : 0;
|
$eventData["EVN_CANCEL_ACTIVITY"] = $eventData["EVN_CANCEL_ACTIVITY"] ? 1 : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (array_key_exists("EVN_WAIT_FOR_COMPLETION", $eventData)) {
|
if (array_key_exists("EVN_WAIT_FOR_COMPLETION", $eventData)) {
|
||||||
$eventData["EVN_WAIT_FOR_COMPLETION"] = $eventData["EVN_WAIT_FOR_COMPLETION"] ? 1 : 0;
|
$eventData["EVN_WAIT_FOR_COMPLETION"] = $eventData["EVN_WAIT_FOR_COMPLETION"] ? 1 : 0;
|
||||||
}
|
}
|
||||||
@@ -1498,18 +1564,8 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
|
|
||||||
if ($forceInsert || is_null($event)) {
|
if ($forceInsert || is_null($event)) {
|
||||||
if ($generateUid) {
|
if ($generateUid) {
|
||||||
//Event
|
//Generate and update UID
|
||||||
|
$eventData = $bwp->updateBoundByArrayUid($eventData, $result);
|
||||||
//Update UIDs
|
|
||||||
if ($eventData["BOU_CONTAINER"] == "bpmnPool" || $eventData["BOU_CONTAINER"] == "bpmnLane" || $eventData["BOU_CONTAINER"] == "bpmnActivity") {
|
|
||||||
foreach ($result as $value) {
|
|
||||||
if ($eventData["BOU_ELEMENT"] == $value["old_uid"]) {
|
|
||||||
$eventData["BOU_ELEMENT"] = $value["new_uid"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($eventData["BOU_UID"]);
|
|
||||||
|
|
||||||
$uidOld = $eventData["EVN_UID"];
|
$uidOld = $eventData["EVN_UID"];
|
||||||
$eventData["EVN_UID"] = Util\Common::generateUID();
|
$eventData["EVN_UID"] = Util\Common::generateUID();
|
||||||
@@ -1558,18 +1614,8 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
|
|
||||||
if ($forceInsert || is_null($dataObject)) {
|
if ($forceInsert || is_null($dataObject)) {
|
||||||
if ($generateUid) {
|
if ($generateUid) {
|
||||||
//Data
|
//Generate and update UID
|
||||||
|
$dataObjectData = $bwp->updateBoundByArrayUid($dataObjectData, $result);
|
||||||
//Update UIDs
|
|
||||||
if ($dataObjectData["BOU_CONTAINER"] == "bpmnPool" || $dataObjectData["BOU_CONTAINER"] == "bpmnLane" || $dataObjectData["BOU_CONTAINER"] == "bpmnActivity") {
|
|
||||||
foreach ($result as $value) {
|
|
||||||
if ($dataObjectData["BOU_ELEMENT"] == $value["old_uid"]) {
|
|
||||||
$dataObjectData["BOU_ELEMENT"] = $value["new_uid"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($dataObjectData["BOU_UID"]);
|
|
||||||
|
|
||||||
$uidOld = $dataObjectData["DAT_UID"];
|
$uidOld = $dataObjectData["DAT_UID"];
|
||||||
$dataObjectData["DAT_UID"] = Util\Common::generateUID();
|
$dataObjectData["DAT_UID"] = Util\Common::generateUID();
|
||||||
@@ -1618,18 +1664,8 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
|
|
||||||
if ($forceInsert || is_null($participant)) {
|
if ($forceInsert || is_null($participant)) {
|
||||||
if ($generateUid) {
|
if ($generateUid) {
|
||||||
//Participant
|
//Generate and update UID
|
||||||
|
$participantData = $bwp->updateBoundByArrayUid($participantData, $result);
|
||||||
//Update UIDs
|
|
||||||
if ($participantData["BOU_CONTAINER"] == "bpmnPool" || $participantData["BOU_CONTAINER"] == "bpmnLane" || $participantData["BOU_CONTAINER"] == "bpmnActivity") {
|
|
||||||
foreach ($result as $value) {
|
|
||||||
if ($participantData["BOU_ELEMENT"] == $value["old_uid"]) {
|
|
||||||
$participantData["BOU_ELEMENT"] = $value["new_uid"];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
unset($participantData["BOU_UID"]);
|
|
||||||
|
|
||||||
$uidOld = $participantData["PAR_UID"];
|
$uidOld = $participantData["PAR_UID"];
|
||||||
$participantData["PAR_UID"] = Util\Common::generateUID();
|
$participantData["PAR_UID"] = Util\Common::generateUID();
|
||||||
@@ -1665,9 +1701,9 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
/*
|
/*
|
||||||
* Diagram's Flows Handling
|
* Diagram's Flows Handling
|
||||||
*/
|
*/
|
||||||
|
$arrayGatewayGatDefaultFlow = array();
|
||||||
|
|
||||||
$whiteList = array();
|
$whiteList = array();
|
||||||
$defaultFlow = array();
|
|
||||||
$pos = 0;
|
|
||||||
|
|
||||||
foreach ($diagram["flows"] as $i => $flowData) {
|
foreach ($diagram["flows"] as $i => $flowData) {
|
||||||
$flowData = array_change_key_case($flowData, CASE_UPPER);
|
$flowData = array_change_key_case($flowData, CASE_UPPER);
|
||||||
@@ -1675,8 +1711,8 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
// if it is a new flow record
|
// if it is a new flow record
|
||||||
if ($forceInsert || ($generateUid && !\BpmnFlow::exists($flowData["FLO_UID"]))) {
|
if ($forceInsert || ($generateUid && !\BpmnFlow::exists($flowData["FLO_UID"]))) {
|
||||||
$uidOld = $flowData["FLO_UID"];
|
$uidOld = $flowData["FLO_UID"];
|
||||||
|
|
||||||
$flowData["FLO_UID"] = Util\Common::generateUID();
|
$flowData["FLO_UID"] = Util\Common::generateUID();
|
||||||
|
|
||||||
$result[] = array(
|
$result[] = array(
|
||||||
"object" => "flow",
|
"object" => "flow",
|
||||||
"old_uid" => $uidOld,
|
"old_uid" => $uidOld,
|
||||||
@@ -1695,12 +1731,6 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$flowData["FLO_ELEMENT_DEST"] = $mappedUid;
|
$flowData["FLO_ELEMENT_DEST"] = $mappedUid;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//Save the default flow Uid's
|
|
||||||
if($flowData["FLO_TYPE"] == 'DEFAULT'){
|
|
||||||
$defaultFlow[$pos]['GAT_UID'] = $flowData["FLO_ELEMENT_ORIGIN"];
|
|
||||||
$defaultFlow[$pos]['GAT_DEFAULT_FLOW'] = $flowData["FLO_UID"];
|
|
||||||
$pos++;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Update UIDs
|
//Update UIDs
|
||||||
foreach ($result as $value) {
|
foreach ($result as $value) {
|
||||||
@@ -1718,6 +1748,11 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$flowData["FLO_CONDITION"] = "";
|
$flowData["FLO_CONDITION"] = "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Add element to array Gateway default flow
|
||||||
|
if ($flowData["FLO_TYPE"] == "DEFAULT" && isset($arrayGatewayUid[$flowData["FLO_ELEMENT_ORIGIN"]])) {
|
||||||
|
$arrayGatewayGatDefaultFlow[$flowData["FLO_ELEMENT_ORIGIN"]] = $flowData["FLO_UID"];
|
||||||
|
}
|
||||||
|
|
||||||
$diagram["flows"][$i] = $flowData;
|
$diagram["flows"][$i] = $flowData;
|
||||||
$whiteList[] = $flowData["FLO_UID"];
|
$whiteList[] = $flowData["FLO_UID"];
|
||||||
}
|
}
|
||||||
@@ -1742,19 +1777,14 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$bwp->mapBpmnFlowsToWorkflowRoutes();
|
//Update BPMN_GATEWAY.GAT_DEFAULT_FLOW
|
||||||
|
foreach ($arrayGatewayGatDefaultFlow as $key => $value) {
|
||||||
//Update the Default gateway
|
$bwp->updateGateway($key, array("GAT_DEFAULT_FLOW" => $value));
|
||||||
$gateways = $bwp->getGateways();
|
|
||||||
foreach ($gateways as $gatewayData) {
|
|
||||||
foreach ($defaultFlow as $def) {
|
|
||||||
if($gatewayData["GAT_UID"] == $def["GAT_UID"]){
|
|
||||||
$gatewayData["GAT_DEFAULT_FLOW"] = $def["GAT_DEFAULT_FLOW"];
|
|
||||||
$bwp->updateGateway($gatewayData["GAT_UID"], $gatewayData);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$bwp->mapBpmnFlowsToWorkflowRoutes();
|
||||||
|
|
||||||
|
//Return
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1780,7 +1810,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
try {
|
try {
|
||||||
$bpmnEvent = \BpmnEventPeer::retrieveByPK($eventUid);
|
$bpmnEvent = \BpmnEventPeer::retrieveByPK($eventUid);
|
||||||
|
|
||||||
if (!is_null($bpmnEvent) && $bpmnEvent->getEvnType() == "START") {
|
if (!is_null($bpmnEvent) && $bpmnEvent->getEvnType() == "START" && $bpmnEvent->getEvnMarker() == "EMPTY") {
|
||||||
$webEntryEvent = new \ProcessMaker\BusinessModel\WebEntryEvent();
|
$webEntryEvent = new \ProcessMaker\BusinessModel\WebEntryEvent();
|
||||||
|
|
||||||
if ($webEntryEvent->existsEvent($bpmnEvent->getPrjUid(), $bpmnEvent->getEvnUid())) {
|
if ($webEntryEvent->existsEvent($bpmnEvent->getPrjUid(), $bpmnEvent->getEvnUid())) {
|
||||||
|
|||||||
@@ -828,9 +828,9 @@ class Workflow extends Handler
|
|||||||
$messageEventRelation->deleteWhere(array(\MessageEventRelationPeer::PRJ_UID => $sProcessUID));
|
$messageEventRelation->deleteWhere(array(\MessageEventRelationPeer::PRJ_UID => $sProcessUID));
|
||||||
|
|
||||||
//Delete Message-Event-Task-Relation
|
//Delete Message-Event-Task-Relation
|
||||||
$messageEventTaskRelation = new \ProcessMaker\BusinessModel\MessageEventTaskRelation();
|
$elementTaskRelation = new \ProcessMaker\BusinessModel\ElementTaskRelation();
|
||||||
|
|
||||||
$messageEventTaskRelation->deleteWhere(array(\MessageEventTaskRelationPeer::PRJ_UID => $sProcessUID));
|
$elementTaskRelation->deleteWhere(array(\ElementTaskRelationPeer::PRJ_UID => $sProcessUID));
|
||||||
|
|
||||||
//Delete Message-Event-Definition
|
//Delete Message-Event-Definition
|
||||||
$messageEventDefinition = new \ProcessMaker\BusinessModel\MessageEventDefinition();
|
$messageEventDefinition = new \ProcessMaker\BusinessModel\MessageEventDefinition();
|
||||||
@@ -1286,33 +1286,5 @@ class Workflow extends Handler
|
|||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function deleteTaskByArrayType($processUid, array $arrayTaskType)
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
$task = new \Tasks();
|
|
||||||
|
|
||||||
$criteria = new \Criteria("workflow");
|
|
||||||
|
|
||||||
$criteria->addSelectColumn(\TaskPeer::TAS_UID);
|
|
||||||
$criteria->add(\TaskPeer::PRO_UID, $processUid, \Criteria::EQUAL);
|
|
||||||
$criteria->add(\TaskPeer::TAS_TYPE, $arrayTaskType, \Criteria::IN);
|
|
||||||
|
|
||||||
$rsCriteria = \TaskPeer::doSelectRS($criteria);
|
|
||||||
$rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
|
|
||||||
|
|
||||||
while ($rsCriteria->next()) {
|
|
||||||
$row = $rsCriteria->getRow();
|
|
||||||
|
|
||||||
$taskUid = $row["TAS_UID"];
|
|
||||||
|
|
||||||
$task->deleteTask($taskUid);
|
|
||||||
}
|
|
||||||
} catch (\Exception $e) {
|
|
||||||
self::log("Exception: ", $e->getMessage(), "Trace: ", $e->getTraceAsString());
|
|
||||||
|
|
||||||
throw $e;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -770,7 +770,7 @@ Ext.onReady( function() {
|
|||||||
items : [
|
items : [
|
||||||
{
|
{
|
||||||
xtype : 'displayfield',
|
xtype : 'displayfield',
|
||||||
width : 192,
|
width : 90,
|
||||||
value : ''
|
value : ''
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -780,6 +780,7 @@ Ext.onReady( function() {
|
|||||||
hideLabel : true,
|
hideLabel : true,
|
||||||
name : 'label1',
|
name : 'label1',
|
||||||
checked : true,
|
checked : true,
|
||||||
|
style : 'margin-left: 10px',
|
||||||
boxLabel : _('ID_ACTIVE')
|
boxLabel : _('ID_ACTIVE')
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -71,6 +71,13 @@ Ext.onReady(function(){
|
|||||||
disabled: true
|
disabled: true
|
||||||
});
|
});
|
||||||
|
|
||||||
|
NoSupervisorButton = new Ext.Action({
|
||||||
|
text: _('ID_SET_NO_MANAGER'),
|
||||||
|
iconCls: 'button_menu_ext ss_sprite ss_user_edit',
|
||||||
|
handler: RemoveSupervisor,
|
||||||
|
disabled: true
|
||||||
|
});
|
||||||
|
|
||||||
backButton = new Ext.Action({
|
backButton = new Ext.Action({
|
||||||
text : _('ID_BACK'),
|
text : _('ID_BACK'),
|
||||||
iconCls: 'button_menu_ext ss_sprite ss_arrow_redo',
|
iconCls: 'button_menu_ext ss_sprite ss_arrow_redo',
|
||||||
@@ -133,12 +140,15 @@ Ext.onReady(function(){
|
|||||||
switch(sm.getCount()){
|
switch(sm.getCount()){
|
||||||
case 0: Ext.getCmp('removeButton').disable();
|
case 0: Ext.getCmp('removeButton').disable();
|
||||||
supervisorButton.disable();
|
supervisorButton.disable();
|
||||||
|
NoSupervisorButton.disable();
|
||||||
break;
|
break;
|
||||||
case 1: Ext.getCmp('removeButton').enable();
|
case 1: Ext.getCmp('removeButton').enable();
|
||||||
supervisorButton.enable();
|
supervisorButton.enable();
|
||||||
|
NoSupervisorButton.enable();
|
||||||
break;
|
break;
|
||||||
default: Ext.getCmp('removeButton').enable();
|
default: Ext.getCmp('removeButton').enable();
|
||||||
supervisorButton.disable();
|
supervisorButton.disable();
|
||||||
|
NoSupervisorButton.disable();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -248,7 +258,7 @@ Ext.onReady(function(){
|
|||||||
frame : false,
|
frame : false,
|
||||||
columnLines : false,
|
columnLines : false,
|
||||||
viewConfig : {forceFit:true},
|
viewConfig : {forceFit:true},
|
||||||
tbar: [editMembersButton,'-',supervisorButton,{xtype: 'tbfill'},'-',searchTextP,clearTextButtonP],
|
tbar: [editMembersButton,'-',supervisorButton, NoSupervisorButton,{xtype: 'tbfill'},'-',searchTextP,clearTextButtonP],
|
||||||
//bbar: [{xtype: 'tbfill'},editMembersButton],
|
//bbar: [{xtype: 'tbfill'},editMembersButton],
|
||||||
listeners: {rowdblclick: function(){
|
listeners: {rowdblclick: function(){
|
||||||
(availableGrid.hidden)? DoNothing() : RemoveGroupsAction();
|
(availableGrid.hidden)? DoNothing() : RemoveGroupsAction();
|
||||||
@@ -493,6 +503,7 @@ EditMembersAction = function(){
|
|||||||
buttonsPanel.show();
|
buttonsPanel.show();
|
||||||
editMembersButton.disable();
|
editMembersButton.disable();
|
||||||
supervisorButton.disable();
|
supervisorButton.disable();
|
||||||
|
//NoSupervisorButton.disable();
|
||||||
UsersPanel.doLayout();
|
UsersPanel.doLayout();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -502,10 +513,14 @@ CancelEditMembersAction = function(){
|
|||||||
buttonsPanel.hide();
|
buttonsPanel.hide();
|
||||||
editMembersButton.enable();
|
editMembersButton.enable();
|
||||||
rowsSelected = assignedGrid.getSelectionModel().getSelections();
|
rowsSelected = assignedGrid.getSelectionModel().getSelections();
|
||||||
if (rowsSelected.length == 1)
|
if (rowsSelected.length == 1){
|
||||||
supervisorButton.enable();
|
supervisorButton.enable();
|
||||||
else
|
NoSupervisorButton.enable();
|
||||||
supervisorButton.disable();
|
}
|
||||||
|
else{
|
||||||
|
supervisorButton.disable();
|
||||||
|
NoSupervisorButton.disable();
|
||||||
|
}
|
||||||
UsersPanel.doLayout();
|
UsersPanel.doLayout();
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -516,6 +531,26 @@ show_user = function(v,i,s){
|
|||||||
return sName;
|
return sName;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//Removes assignment Manager on Department(Desetea)
|
||||||
|
RemoveSupervisor = function(){
|
||||||
|
rowsSelected = assignedGrid.getSelectionModel().getSelections();
|
||||||
|
viewport.getEl().mask(_('ID_PROCESSING'));
|
||||||
|
Ext.Ajax.request({
|
||||||
|
url: 'departments_Ajax',
|
||||||
|
params: {action: 'updateSupervisor', USR_UID: rowsSelected[0].get('USR_UID'), DEP_UID: DEPARTMENT.DEP_UID, NO_DEP_MANAGER:'0'},
|
||||||
|
success: function(r,o){
|
||||||
|
viewport.getEl().unmask();
|
||||||
|
supervisorButton.disable();
|
||||||
|
NoSupervisorButton.disable();
|
||||||
|
DoSearchP();
|
||||||
|
PMExt.notify(_('ID_DEPARTMENTS'),_('ID_NO_SET_MANAGER_SUCCES'));
|
||||||
|
},
|
||||||
|
failure: function (r,o){
|
||||||
|
viewport.getEl().unmask();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
//Update Department Supervisor
|
//Update Department Supervisor
|
||||||
UpdateSupervisor = function(){
|
UpdateSupervisor = function(){
|
||||||
rowsSelected = assignedGrid.getSelectionModel().getSelections();
|
rowsSelected = assignedGrid.getSelectionModel().getSelections();
|
||||||
@@ -526,6 +561,7 @@ UpdateSupervisor = function(){
|
|||||||
success: function(r,o){
|
success: function(r,o){
|
||||||
viewport.getEl().unmask();
|
viewport.getEl().unmask();
|
||||||
supervisorButton.disable();
|
supervisorButton.disable();
|
||||||
|
NoSupervisorButton.disable();
|
||||||
DoSearchP();
|
DoSearchP();
|
||||||
PMExt.notify(_('ID_DEPARTMENTS'),_('ID_SET_MANAGER_SUCCESS'));
|
PMExt.notify(_('ID_DEPARTMENTS'),_('ID_SET_MANAGER_SUCCESS'));
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user