Adding merge support for the Process Definition, Variables, Dynaforms, Input and output documents.
This commit is contained in:
@@ -20,6 +20,7 @@ class ProcessVariables extends BaseProcessVariables {
|
||||
{
|
||||
$con = Propel::getConnection( ProcessVariablesPeer::DATABASE_NAME );
|
||||
try {
|
||||
$con->begin();
|
||||
$this->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||
if ($this->validate()) {
|
||||
$result = $this->save();
|
||||
@@ -36,6 +37,28 @@ class ProcessVariables extends BaseProcessVariables {
|
||||
}
|
||||
}
|
||||
|
||||
public function update ($aData)
|
||||
{
|
||||
$con = Propel::getConnection( ProcessVariablesPeer::DATABASE_NAME );
|
||||
try {
|
||||
$con->begin();
|
||||
$variable = ProcessVariablesPeer::retrieveByPK($aData['VAR_UID']);
|
||||
$variable->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||
if ($variable->validate()) {
|
||||
$result = $variable->save();
|
||||
} else {
|
||||
$e = new Exception( "Failed Validation in class " . get_class( $variable ) . "." );
|
||||
$e->aValidationFailures = $variable->getValidationFailures();
|
||||
throw ($e);
|
||||
}
|
||||
$con->commit();
|
||||
return $result;
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
public function remove($sVarUid)
|
||||
{
|
||||
$oConnection = Propel::getConnection(ProcessVariablesPeer::DATABASE_NAME);
|
||||
|
||||
Reference in New Issue
Block a user