CODE STYLE class/model/ files
This commit is contained in:
@@ -297,7 +297,7 @@ class InputDocument extends BaseInputDocument
|
||||
* @param string $sUid the uid of the Prolication
|
||||
*/
|
||||
|
||||
function InputExists ($sUid)
|
||||
public function InputExists ($sUid)
|
||||
{
|
||||
$con = Propel::getConnection( InputDocumentPeer::DATABASE_NAME );
|
||||
try {
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class InputDocumentPeer extends BaseInputDocumentPeer {
|
||||
class InputDocumentPeer extends BaseInputDocumentPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // InputDocumentPeer
|
||||
|
||||
@@ -38,26 +38,30 @@ require_once 'classes/model/om/BaseIsoCountry.php';
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class IsoCountry extends BaseIsoCountry {
|
||||
function findById($UID){
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(IsoCountryPeer::IC_UID);
|
||||
$oCriteria->addSelectColumn(IsoCountryPeer::IC_NAME);
|
||||
$oCriteria->add(IsoCountryPeer::IC_UID, $UID);
|
||||
$oDataset = IsoCountryPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
class IsoCountry extends BaseIsoCountry
|
||||
{
|
||||
public function findById($UID)
|
||||
{
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(IsoCountryPeer::IC_UID);
|
||||
$oCriteria->addSelectColumn(IsoCountryPeer::IC_NAME);
|
||||
$oCriteria->add(IsoCountryPeer::IC_UID, $UID);
|
||||
$oDataset = IsoCountryPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
|
||||
public function findByIcName($IC_NAME)
|
||||
{
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(IsoCountryPeer::IC_UID);
|
||||
$oCriteria->addSelectColumn(IsoCountryPeer::IC_NAME);
|
||||
$oCriteria->add(IsoCountryPeer::IC_NAME, $IC_NAME);
|
||||
$oDataset = IsoCountryPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
}
|
||||
|
||||
function findByIcName($IC_NAME){
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(IsoCountryPeer::IC_UID);
|
||||
$oCriteria->addSelectColumn(IsoCountryPeer::IC_NAME);
|
||||
$oCriteria->add(IsoCountryPeer::IC_NAME, $IC_NAME);
|
||||
$oDataset = IsoCountryPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
} // IsoCountry
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class IsoCountryPeer extends BaseIsoCountryPeer {
|
||||
class IsoCountryPeer extends BaseIsoCountryPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // IsoCountryPeer
|
||||
|
||||
@@ -38,59 +38,58 @@ require_once 'classes/model/om/BaseIsoLocation.php';
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class IsoLocation extends BaseIsoLocation {
|
||||
|
||||
function findById($IC_UID, $IS_UID, $IL_UID){
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IC_UID);
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IS_UID);
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IL_UID);
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IL_NAME);
|
||||
$oCriteria->add(IsoLocationPeer::IC_UID, $IC_UID);
|
||||
$oCriteria->add(IsoLocationPeer::IS_UID, $IS_UID);
|
||||
$oCriteria->add(IsoLocationPeer::IL_UID, $IL_UID);
|
||||
$oDataset = IsoLocationPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
|
||||
function findByIcName($IL_NAME){
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IC_UID);
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IS_UID);
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IL_UID);
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IL_NAME);
|
||||
$oCriteria->add(IsoLocationPeer::IL_NAME, $IL_NAME);
|
||||
$oDataset = IsoLocationPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
|
||||
function getAllRowsLike($word)
|
||||
class IsoLocation extends BaseIsoLocation
|
||||
{
|
||||
public function findById($IC_UID, $IS_UID, $IL_UID)
|
||||
{
|
||||
try {
|
||||
//require_once 'classes/model/IsoLocation.php';
|
||||
|
||||
$c = new Criteria('workflow');
|
||||
$c->addSelectColumn(IsoLocationPeer::IC_UID);
|
||||
$c->addSelectColumn(IsoLocationPeer::IL_NORMAL_NAME);
|
||||
$c->add(IsoLocationPeer::IL_NORMAL_NAME, $word."%", Criteria::LIKE);
|
||||
|
||||
$rs = IsoLocationPeer::doSelectRS($c);
|
||||
//$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$rows = Array();
|
||||
while($rs->next()){
|
||||
array_push($rows, $rs->getRow());
|
||||
}
|
||||
|
||||
return $rows;
|
||||
}
|
||||
catch (Exception $oException) {
|
||||
throw $oException;
|
||||
}
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IC_UID);
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IS_UID);
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IL_UID);
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IL_NAME);
|
||||
$oCriteria->add(IsoLocationPeer::IC_UID, $IC_UID);
|
||||
$oCriteria->add(IsoLocationPeer::IS_UID, $IS_UID);
|
||||
$oCriteria->add(IsoLocationPeer::IL_UID, $IL_UID);
|
||||
$oDataset = IsoLocationPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
|
||||
} // IsoLocation
|
||||
public function findByIcName($IL_NAME)
|
||||
{
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IC_UID);
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IS_UID);
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IL_UID);
|
||||
$oCriteria->addSelectColumn(IsoLocationPeer::IL_NAME);
|
||||
$oCriteria->add(IsoLocationPeer::IL_NAME, $IL_NAME);
|
||||
$oDataset = IsoLocationPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
|
||||
public function getAllRowsLike($word)
|
||||
{
|
||||
try {
|
||||
$c = new Criteria('workflow');
|
||||
$c->addSelectColumn(IsoLocationPeer::IC_UID);
|
||||
$c->addSelectColumn(IsoLocationPeer::IL_NORMAL_NAME);
|
||||
$c->add(IsoLocationPeer::IL_NORMAL_NAME, $word."%", Criteria::LIKE);
|
||||
|
||||
$rs = IsoLocationPeer::doSelectRS($c);
|
||||
//$rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
|
||||
$rows = Array();
|
||||
while ($rs->next()) {
|
||||
array_push($rows, $rs->getRow());
|
||||
}
|
||||
|
||||
return $rows;
|
||||
} catch (Exception $oException) {
|
||||
throw $oException;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class IsoLocationPeer extends BaseIsoLocationPeer {
|
||||
class IsoLocationPeer extends BaseIsoLocationPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // IsoLocationPeer
|
||||
|
||||
@@ -38,29 +38,33 @@ require_once 'classes/model/om/BaseIsoSubdivision.php';
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class IsoSubdivision extends BaseIsoSubdivision {
|
||||
function findById($IC_UID, $IS_UID){
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IC_UID);
|
||||
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_UID);
|
||||
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_NAME);
|
||||
$oCriteria->add(IsoSubdivisionPeer::IC_UID, $IC_UID);
|
||||
$oCriteria->add(IsoSubdivisionPeer::IS_UID, $IS_UID);
|
||||
$oDataset = IsoSubdivisionPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
class IsoSubdivision extends BaseIsoSubdivision
|
||||
{
|
||||
public function findById($IC_UID, $IS_UID)
|
||||
{
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IC_UID);
|
||||
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_UID);
|
||||
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_NAME);
|
||||
$oCriteria->add(IsoSubdivisionPeer::IC_UID, $IC_UID);
|
||||
$oCriteria->add(IsoSubdivisionPeer::IS_UID, $IS_UID);
|
||||
$oDataset = IsoSubdivisionPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
|
||||
public function findByIcName($IS_NAME)
|
||||
{
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IC_UID);
|
||||
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_UID);
|
||||
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_NAME);
|
||||
$oCriteria->add(IsoSubdivisionPeer::IS_NAME, $IS_UID);
|
||||
$oDataset = IsoSubdivisionPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
}
|
||||
|
||||
function findByIcName($IS_NAME){
|
||||
$oCriteria = new Criteria('workflow');
|
||||
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IC_UID);
|
||||
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_UID);
|
||||
$oCriteria->addSelectColumn(IsoSubdivisionPeer::IS_NAME);
|
||||
$oCriteria->add(IsoSubdivisionPeer::IS_NAME, $IS_UID);
|
||||
$oDataset = IsoSubdivisionPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
} // IsoSubdivision
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class IsoSubdivisionPeer extends BaseIsoSubdivisionPeer {
|
||||
class IsoSubdivisionPeer extends BaseIsoSubdivisionPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // IsoSubdivisionPeer
|
||||
|
||||
@@ -45,7 +45,7 @@ require_once 'classes/model/Translation.php';
|
||||
class Language extends BaseLanguage
|
||||
{
|
||||
|
||||
function load ($sLanUid)
|
||||
public function load ($sLanUid)
|
||||
{
|
||||
try {
|
||||
$oRow = LanguagePeer::retrieveByPK( $sLanUid );
|
||||
@@ -62,7 +62,7 @@ class Language extends BaseLanguage
|
||||
}
|
||||
}
|
||||
|
||||
function update ($aFields)
|
||||
public function update ($aFields)
|
||||
{
|
||||
$oConnection = Propel::getConnection( LanguagePeer::DATABASE_NAME );
|
||||
try {
|
||||
@@ -82,8 +82,9 @@ class Language extends BaseLanguage
|
||||
throw ($e);
|
||||
}
|
||||
}
|
||||
|
||||
//SELECT LAN_ID, LAN_NAME FROM LANGUAGE WHERE LAN_ENABLED = '1' ORDER BY LAN_WEIGHT DESC
|
||||
function getActiveLanguages ()
|
||||
public function getActiveLanguages ()
|
||||
{
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( LanguagePeer::LAN_ID );
|
||||
@@ -103,7 +104,7 @@ class Language extends BaseLanguage
|
||||
return $rows;
|
||||
}
|
||||
|
||||
function findById ($LAN_ID)
|
||||
public function findById ($LAN_ID)
|
||||
{
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( LanguagePeer::LAN_NAME );
|
||||
@@ -114,7 +115,7 @@ class Language extends BaseLanguage
|
||||
return $oDataset->getRow();
|
||||
}
|
||||
|
||||
function findByLanName ($LAN_NAME)
|
||||
public function findByLanName ($LAN_NAME)
|
||||
{
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( LanguagePeer::LAN_ID );
|
||||
@@ -179,9 +180,7 @@ class Language extends BaseLanguage
|
||||
$errorMsg = '';
|
||||
|
||||
while ($rowTranslation = $POFile->getTranslation()) {
|
||||
|
||||
$countItems ++;
|
||||
|
||||
if (! isset( $POFile->translatorComments[0] ) || ! isset( $POFile->translatorComments[1] ) || ! isset( $POFile->references[0] )) {
|
||||
throw new Exception( 'The .po file doesn\'t have valid directives for Processmaker!' );
|
||||
}
|
||||
@@ -223,7 +222,6 @@ class Language extends BaseLanguage
|
||||
}
|
||||
} // is a Xml update
|
||||
elseif ($updateXml) {
|
||||
|
||||
$xmlForm = $context;
|
||||
//erik: expresion to prevent and hable correctly dropdown values like -1, -2 etc.
|
||||
preg_match( '/^([\w_]+)\s-\s([\w_]+)\s*-*\s*([\w\W]*)$/', $reference, $match );
|
||||
@@ -287,17 +285,11 @@ class Language extends BaseLanguage
|
||||
}
|
||||
|
||||
//export
|
||||
function export ()
|
||||
public function export ()
|
||||
{
|
||||
//G::LoadThirdParty('pear', 'Benchmark/Timer');
|
||||
G::LoadSystem( 'i18n_po' );
|
||||
G::LoadClass( "system" );
|
||||
|
||||
//echo G::getMemoryUsage();
|
||||
//$timer = new Benchmark_Timer();
|
||||
//$timer->start();
|
||||
|
||||
|
||||
//creating the .po file
|
||||
$sPOFile = PATH_CORE . 'content' . PATH_SEP . 'translations' . PATH_SEP . MAIN_POFILE . '.' . $_GET['LOCALE'] . '.po';
|
||||
|
||||
@@ -347,10 +339,6 @@ class Language extends BaseLanguage
|
||||
$poFile->addHeader( 'X-Poedit-SourceCharset', 'utf-8' );
|
||||
$poFile->addHeader( 'Content-Transfer-Encoding', '8bit' );
|
||||
|
||||
//$timer->setMarker('end making po headers');
|
||||
//export translation
|
||||
|
||||
|
||||
$aLabels = array ();
|
||||
$aMsgids = array ('' => true
|
||||
);
|
||||
@@ -429,9 +417,6 @@ class Language extends BaseLanguage
|
||||
|
||||
|
||||
//now find labels in xmlforms
|
||||
/**
|
||||
* *********
|
||||
*/
|
||||
$aExceptionFields = array ('','javascript','hidden','phpvariable','private','toolbar','xmlmenu','toolbutton','cellmark','grid','CheckboxTable'
|
||||
);
|
||||
|
||||
@@ -545,26 +530,12 @@ class Language extends BaseLanguage
|
||||
}
|
||||
}
|
||||
} //end foreach
|
||||
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
//$timer->setMarker('end xml files processed');
|
||||
//$profiling = $timer->getProfiling();
|
||||
//$timer->stop(); $timer->display();
|
||||
//echo G::getMemoryUsage();
|
||||
//die;
|
||||
//g::pr($profiling);
|
||||
|
||||
|
||||
G::streamFile( $sPOFile, true );
|
||||
|
||||
}
|
||||
}
|
||||
// Language
|
||||
|
||||
|
||||
function getMatchDropdownOptionValue ($name, $options)
|
||||
{
|
||||
foreach ($options as $option) {
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class LanguagePeer extends BaseLanguagePeer {
|
||||
class LanguagePeer extends BaseLanguagePeer
|
||||
{
|
||||
}
|
||||
|
||||
} // LanguagePeer
|
||||
|
||||
@@ -38,6 +38,7 @@ require_once 'classes/model/om/BaseLexico.php';
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class Lexico extends BaseLexico {
|
||||
class Lexico extends BaseLexico
|
||||
{
|
||||
}
|
||||
|
||||
} // Lexico
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class LexicoPeer extends BaseLexicoPeer {
|
||||
class LexicoPeer extends BaseLexicoPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // LexicoPeer
|
||||
|
||||
@@ -18,8 +18,10 @@ require_once 'classes/model/om/BaseLogCasesScheduler.php';
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class LogCasesScheduler extends BaseLogCasesScheduler {
|
||||
function getAllCriteria() {
|
||||
class LogCasesScheduler extends BaseLogCasesScheduler
|
||||
{
|
||||
public function getAllCriteria()
|
||||
{
|
||||
$c = new Criteria('workflow');
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn(LogCasesSchedulerPeer::LOG_CASE_UID);
|
||||
@@ -35,13 +37,14 @@ class LogCasesScheduler extends BaseLogCasesScheduler {
|
||||
return $c;
|
||||
}
|
||||
|
||||
function getAll(){
|
||||
public function getAll()
|
||||
{
|
||||
$oCriteria = $this->getAllCriteria();
|
||||
$oDataset = LogCasesSchedulerPeer::doSelectRS($oCriteria);
|
||||
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
|
||||
$oDataset->next();
|
||||
$aRows = Array();
|
||||
while( $aRow = $oDataset->getRow() ) {
|
||||
while ($aRow = $oDataset->getRow() ) {
|
||||
$aRows[] = $aRow;
|
||||
$oDataset->next();
|
||||
}
|
||||
@@ -53,16 +56,19 @@ class LogCasesScheduler extends BaseLogCasesScheduler {
|
||||
$aRows[$k] = array_merge($aRow, $aProcessRow, $aTaskRow);
|
||||
}*/
|
||||
|
||||
return $aRows;
|
||||
return $aRows;
|
||||
}
|
||||
|
||||
function saveLogParameters($params){
|
||||
|
||||
if ( isset ( $params['LOG_CASE_UID'] ) && $params['LOG_CASE_UID']== '' )
|
||||
public function saveLogParameters($params)
|
||||
{
|
||||
if ( isset ( $params['LOG_CASE_UID'] ) && $params['LOG_CASE_UID']== '' ) {
|
||||
unset ( $params['LOG_CASE_UID'] );
|
||||
if ( !isset ( $params['LOG_CASE_UID'] ) )
|
||||
$params['LOG_CASE_UID'] = G::generateUniqueID();
|
||||
$this->setLogCaseUid($params['LOG_CASE_UID']);
|
||||
}
|
||||
if ( !isset ( $params['LOG_CASE_UID'] ) ) {
|
||||
$params['LOG_CASE_UID'] = G::generateUniqueID();
|
||||
}
|
||||
|
||||
$this->setLogCaseUid($params['LOG_CASE_UID']);
|
||||
$this->setProUid($params['PRO_UID']);
|
||||
$this->setTasUid($params['TAS_UID']);
|
||||
$this->setSchUid($params['SCH_UID']);
|
||||
@@ -72,8 +78,6 @@ class LogCasesScheduler extends BaseLogCasesScheduler {
|
||||
$this->setResult($params['RESULT']);
|
||||
$this->setWsCreateCaseStatus($params['WS_CREATE_CASE_STATUS']);
|
||||
$this->setWsRouteCaseStatus($params['WS_ROUTE_CASE_STATUS']);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // LogCasesScheduler
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class LogCasesSchedulerPeer extends BaseLogCasesSchedulerPeer {
|
||||
class LogCasesSchedulerPeer extends BaseLogCasesSchedulerPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // LogCasesSchedulerPeer
|
||||
|
||||
@@ -20,8 +20,7 @@ require_once 'classes/model/om/BaseLoginLog.php';
|
||||
*/
|
||||
class LoginLog extends BaseLoginLog
|
||||
{
|
||||
|
||||
function create ($aData)
|
||||
public function create ($aData)
|
||||
{
|
||||
$con = Propel::getConnection( LoginLogPeer::DATABASE_NAME );
|
||||
try {
|
||||
@@ -79,7 +78,7 @@ class LoginLog extends BaseLoginLog
|
||||
}
|
||||
}
|
||||
|
||||
function remove ($LogUid)
|
||||
public function remove ($LogUid)
|
||||
{
|
||||
$con = Propel::getConnection( LoginLogPeer::DATABASE_NAME );
|
||||
try {
|
||||
@@ -95,7 +94,7 @@ class LoginLog extends BaseLoginLog
|
||||
}
|
||||
|
||||
//Added by Qennix
|
||||
function getLastLoginByUser ($sUID)
|
||||
public function getLastLoginByUser ($sUID)
|
||||
{
|
||||
$c = new Criteria();
|
||||
$c->addSelectColumn( LoginLogPeer::LOG_INIT_DATE );
|
||||
@@ -110,7 +109,7 @@ class LoginLog extends BaseLoginLog
|
||||
}
|
||||
|
||||
//Added by Qennix
|
||||
function getLastLoginAllUsers ()
|
||||
public function getLastLoginAllUsers ()
|
||||
{
|
||||
$c = new Criteria();
|
||||
$c->addSelectColumn( LoginLogPeer::USR_UID );
|
||||
@@ -126,5 +125,4 @@ class LoginLog extends BaseLoginLog
|
||||
return $aRows;
|
||||
}
|
||||
}
|
||||
// LoginLog
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class LoginLogPeer extends BaseLoginLogPeer {
|
||||
class LoginLogPeer extends BaseLoginLogPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // LoginLogPeer
|
||||
|
||||
@@ -20,7 +20,6 @@ require_once 'classes/model/om/BaseObjectPermission.php';
|
||||
*/
|
||||
class ObjectPermission extends BaseObjectPermission
|
||||
{
|
||||
|
||||
public function load ($UID)
|
||||
{
|
||||
try {
|
||||
@@ -38,7 +37,7 @@ class ObjectPermission extends BaseObjectPermission
|
||||
}
|
||||
}
|
||||
|
||||
function create ($aData)
|
||||
public function create ($aData)
|
||||
{
|
||||
try {
|
||||
$this->fromArray( $aData, BasePeer::TYPE_FIELDNAME );
|
||||
@@ -49,7 +48,7 @@ class ObjectPermission extends BaseObjectPermission
|
||||
}
|
||||
}
|
||||
|
||||
function Exists ($Uid)
|
||||
public function Exists ($Uid)
|
||||
{
|
||||
try {
|
||||
$oPro = ObjectPermissionPeer::retrieveByPk( $Uid );
|
||||
@@ -63,7 +62,7 @@ class ObjectPermission extends BaseObjectPermission
|
||||
}
|
||||
}
|
||||
|
||||
function remove ($Uid)
|
||||
public function remove ($Uid)
|
||||
{
|
||||
$con = Propel::getConnection( ObjectPermissionPeer::DATABASE_NAME );
|
||||
try {
|
||||
@@ -82,7 +81,7 @@ class ObjectPermission extends BaseObjectPermission
|
||||
}
|
||||
}
|
||||
|
||||
function update ($aFields)
|
||||
public function update ($aFields)
|
||||
{
|
||||
$oConnection = Propel::getConnection( ObjectPermissionPeer::DATABASE_NAME );
|
||||
try {
|
||||
@@ -103,7 +102,7 @@ class ObjectPermission extends BaseObjectPermission
|
||||
}
|
||||
}
|
||||
|
||||
function removeByObject ($sType, $sObjUid)
|
||||
public function removeByObject ($sType, $sObjUid)
|
||||
{
|
||||
try {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
@@ -115,7 +114,7 @@ class ObjectPermission extends BaseObjectPermission
|
||||
}
|
||||
}
|
||||
|
||||
function loadInfo ($sObjUID)
|
||||
public function loadInfo ($sObjUID)
|
||||
{
|
||||
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
@@ -127,5 +126,4 @@ class ObjectPermission extends BaseObjectPermission
|
||||
return ($aRow);
|
||||
}
|
||||
}
|
||||
// ObjectPermission
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class ObjectPermissionPeer extends BaseObjectPermissionPeer {
|
||||
class ObjectPermissionPeer extends BaseObjectPermissionPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // ObjectPermissionPeer
|
||||
|
||||
@@ -504,9 +504,9 @@ class OutputDocument extends BaseOutputDocument
|
||||
$sPath,
|
||||
$sFilename,
|
||||
$sContent,
|
||||
$sLandscape=false,
|
||||
$sTypeDocToGener='BOTH',
|
||||
$aProperties=array()
|
||||
$sLandscape = false,
|
||||
$sTypeDocToGener = 'BOTH',
|
||||
$aProperties = array()
|
||||
) {
|
||||
if (($sUID != '') && is_array($aFields) && ($sPath != '')) {
|
||||
$nrt = array("\n", "\r", "\t");
|
||||
@@ -945,5 +945,4 @@ class OutputDocument extends BaseOutputDocument
|
||||
}
|
||||
}
|
||||
}
|
||||
// OutputDocument
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class OutputDocumentPeer extends BaseOutputDocumentPeer {
|
||||
class OutputDocumentPeer extends BaseOutputDocumentPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // OutputDocumentPeer
|
||||
|
||||
@@ -150,7 +150,7 @@ class Process extends BaseProcess
|
||||
* @return void
|
||||
*/
|
||||
|
||||
function create ($aData)
|
||||
public function create ($aData)
|
||||
{
|
||||
if (! isset( $aData['USR_UID'] )) {
|
||||
throw (new PropelException( 'The process cannot be created. The USR_UID is empty.' ));
|
||||
@@ -212,7 +212,6 @@ class Process extends BaseProcess
|
||||
}
|
||||
throw (new PropelException( 'The row cannot be created!', new PropelException( $msg ) ));
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
@@ -224,8 +223,7 @@ class Process extends BaseProcess
|
||||
*
|
||||
* @param string $sProUid the uid of the Prolication
|
||||
*/
|
||||
|
||||
function processExists ($ProUid)
|
||||
public function processExists ($ProUid)
|
||||
{
|
||||
$con = Propel::getConnection( ProcessPeer::DATABASE_NAME );
|
||||
try {
|
||||
@@ -246,10 +244,8 @@ class Process extends BaseProcess
|
||||
* @param string $ProUid the uid of the Prolication
|
||||
* @return array $Fields the fields
|
||||
*/
|
||||
|
||||
function load ($ProUid, $getAllLang = false)
|
||||
public function load ($ProUid, $getAllLang = false)
|
||||
{
|
||||
|
||||
$con = Propel::getConnection( ProcessPeer::DATABASE_NAME );
|
||||
try {
|
||||
$oPro = ProcessPeer::retrieveByPk( $ProUid );
|
||||
@@ -262,7 +258,6 @@ class Process extends BaseProcess
|
||||
// $this->pro_title = $aFields['PRO_TITLE'];
|
||||
// $this->pro_description = $aFields['PRO_DESCRIPTION'];
|
||||
|
||||
|
||||
$lang = defined( 'SYS_LANG' ) ? SYS_LANG : 'en';
|
||||
|
||||
$c = new Criteria();
|
||||
@@ -335,9 +330,8 @@ class Process extends BaseProcess
|
||||
}
|
||||
}
|
||||
|
||||
function getAll ()
|
||||
public function getAll ()
|
||||
{
|
||||
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
|
||||
$oCriteria->addSelectColumn( ProcessPeer::PRO_UID );
|
||||
@@ -403,7 +397,6 @@ class Process extends BaseProcess
|
||||
* @return variant
|
||||
*
|
||||
*/
|
||||
|
||||
public function update ($aData)
|
||||
{
|
||||
if (isset( $aData['PRO_DYNAFORMS'] ) && is_array( $aData['PRO_DYNAFORMS'] )) {
|
||||
@@ -453,7 +446,6 @@ class Process extends BaseProcess
|
||||
* @return variant
|
||||
*
|
||||
*/
|
||||
|
||||
public function createRow ($aData)
|
||||
{
|
||||
$con = Propel::getConnection( ProcessPeer::DATABASE_NAME );
|
||||
@@ -577,8 +569,7 @@ class Process extends BaseProcess
|
||||
return $aRow['PROCESS'] ? true : false;
|
||||
}
|
||||
|
||||
//new functions
|
||||
function getAllProcessesCount ()
|
||||
public function getAllProcessesCount ()
|
||||
{
|
||||
$c = $this->tmpCriteria;
|
||||
$c->clearSelectColumns();
|
||||
@@ -594,7 +585,7 @@ class Process extends BaseProcess
|
||||
}
|
||||
}
|
||||
|
||||
function getAllProcesses ($start, $limit, $category = null, $processName = null, $counters = true, $reviewSubProcess = false)
|
||||
public function getAllProcesses ($start, $limit, $category = null, $processName = null, $counters = true, $reviewSubProcess = false)
|
||||
{
|
||||
require_once PATH_RBAC . "model/RbacUsers.php";
|
||||
require_once "classes/model/ProcessCategory.php";
|
||||
@@ -753,7 +744,7 @@ class Process extends BaseProcess
|
||||
return $aProcesses;
|
||||
}
|
||||
|
||||
function getCasesCountInAllProcesses ()
|
||||
public function getCasesCountInAllProcesses ()
|
||||
{
|
||||
/*SELECT PRO_UID, APP_STATUS, COUNT( * )
|
||||
FROM APPLICATION
|
||||
@@ -783,7 +774,7 @@ class Process extends BaseProcess
|
||||
return $aProcesses;
|
||||
}
|
||||
|
||||
function getAllProcessesByCategory ()
|
||||
public function getAllProcessesByCategory ()
|
||||
{
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
$oCriteria->addSelectColumn( ProcessPeer::PRO_CATEGORY );
|
||||
@@ -799,7 +790,7 @@ class Process extends BaseProcess
|
||||
return $aProc;
|
||||
}
|
||||
|
||||
function getTriggerWebBotProcess ($proUid, $action)
|
||||
public function getTriggerWebBotProcess ($proUid, $action)
|
||||
{
|
||||
require_once ("classes/model/Triggers.php");
|
||||
|
||||
@@ -856,12 +847,9 @@ class Process extends BaseProcess
|
||||
}
|
||||
}
|
||||
}
|
||||
//Process
|
||||
|
||||
|
||||
function ordProcessByProTitle ($a, $b)
|
||||
{
|
||||
|
||||
if ($a['PRO_TITLE'] > $b['PRO_TITLE']) {
|
||||
return 1;
|
||||
} elseif ($a['PRO_TITLE'] < $b['PRO_TITLE']) {
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
require_once 'classes/model/om/BaseProcessCategory.php';
|
||||
|
||||
|
||||
/**
|
||||
* Skeleton subclass for representing a row from the 'PROCESS_CATEGORY' table.
|
||||
*
|
||||
@@ -18,48 +17,42 @@ require_once 'classes/model/om/BaseProcessCategory.php';
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class ProcessCategory extends BaseProcessCategory {
|
||||
class ProcessCategory extends BaseProcessCategory
|
||||
{
|
||||
public function getAll ($type = 'criteria')
|
||||
{
|
||||
$c = new Criteria('workflow');
|
||||
$c->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID);
|
||||
$c->addSelectColumn(ProcessCategoryPeer::CATEGORY_NAME);
|
||||
$dataset = ProcessCategoryPeer::doSelectRS($c);
|
||||
$dataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
||||
|
||||
function getAll($type='criteria')
|
||||
{
|
||||
$c = new Criteria('workflow');
|
||||
$c->addSelectColumn(ProcessCategoryPeer::CATEGORY_UID);
|
||||
$c->addSelectColumn(ProcessCategoryPeer::CATEGORY_NAME);
|
||||
$dataset = ProcessCategoryPeer::doSelectRS($c);
|
||||
$dataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
||||
|
||||
if( $type == 'array' ){
|
||||
$result = Array();
|
||||
while ( $dataset->next() ) {
|
||||
$result[] = $dataset->getRow();
|
||||
}
|
||||
return $result;
|
||||
if ($type == 'array') {
|
||||
$result = Array();
|
||||
while ( $dataset->next() ) {
|
||||
$result[] = $dataset->getRow();
|
||||
}
|
||||
return $result;
|
||||
} else {
|
||||
return $c;
|
||||
}
|
||||
}
|
||||
else {
|
||||
return $c;
|
||||
|
||||
public function loadByCategoryName($sCategoryName)
|
||||
{
|
||||
$c = new Criteria('workflow');
|
||||
$del = DBAdapter::getStringDelimiter();
|
||||
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn( ProcessCategoryPeer::CATEGORY_UID );
|
||||
$c->addSelectColumn( ProcessCategoryPeer::CATEGORY_NAME);
|
||||
|
||||
$c->add(ProcessCategoryPeer::CATEGORY_NAME, $sCategoryName);
|
||||
$dataset = ProcessCategoryPeer::doSelectRS($c);
|
||||
$dataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
return $aRow;
|
||||
}
|
||||
}
|
||||
|
||||
function loadByCategoryName($sCategoryName)
|
||||
{
|
||||
$c = new Criteria('workflow');
|
||||
$del = DBAdapter::getStringDelimiter();
|
||||
|
||||
$c->clearSelectColumns();
|
||||
$c->addSelectColumn( ProcessCategoryPeer::CATEGORY_UID );
|
||||
$c->addSelectColumn( ProcessCategoryPeer::CATEGORY_NAME);
|
||||
|
||||
$c->add(ProcessCategoryPeer::CATEGORY_NAME, $sCategoryName);
|
||||
$dataset = ProcessCategoryPeer::doSelectRS($c);
|
||||
$dataset->setFetchmode ( ResultSet::FETCHMODE_ASSOC );
|
||||
$dataset->next();
|
||||
$aRow = $dataset->getRow();
|
||||
return $aRow;
|
||||
}
|
||||
|
||||
|
||||
} // ProcessCategory
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class ProcessCategoryPeer extends BaseProcessCategoryPeer {
|
||||
class ProcessCategoryPeer extends BaseProcessCategoryPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // ProcessCategoryPeer
|
||||
|
||||
@@ -38,6 +38,7 @@ require_once 'classes/model/om/BaseProcessOwner.php';
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class ProcessOwner extends BaseProcessOwner {
|
||||
class ProcessOwner extends BaseProcessOwner
|
||||
{
|
||||
}
|
||||
|
||||
} // ProcessOwner
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class ProcessOwnerPeer extends BaseProcessOwnerPeer {
|
||||
class ProcessOwnerPeer extends BaseProcessOwnerPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // ProcessOwnerPeer
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class ProcessPeer extends BaseProcessPeer {
|
||||
class ProcessPeer extends BaseProcessPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // ProcessPeer
|
||||
|
||||
@@ -18,83 +18,79 @@ require_once 'classes/model/om/BaseProcessUser.php';
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class ProcessUser extends BaseProcessUser {
|
||||
public function create($aData)
|
||||
{
|
||||
$oConnection = Propel::getConnection(ProcessUserPeer::DATABASE_NAME);
|
||||
try {
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->add(ProcessUserPeer::PU_UID, $aData['PU_UID'] );
|
||||
$criteria->add(ProcessUserPeer::PRO_UID, $aData['PRO_UID'] );
|
||||
$criteria->add(ProcessUserPeer::USR_UID, $aData['USR_UID'] );
|
||||
$criteria->add(ProcessUserPeer::PU_TYPE, $aData['PU_TYPE'] );
|
||||
$objects = ProcessUserPeer::doSelect($criteria, $oConnection);
|
||||
$oConnection->begin();
|
||||
foreach($objects as $row) {
|
||||
$this->remove($row->getTasUid(), $row->getUsrUid(), $row->getTuType(), $row->getTuRelation() );
|
||||
}
|
||||
$oConnection->commit();
|
||||
class ProcessUser extends BaseProcessUser
|
||||
{
|
||||
public function create($aData)
|
||||
{
|
||||
$oConnection = Propel::getConnection(ProcessUserPeer::DATABASE_NAME);
|
||||
try {
|
||||
$criteria = new Criteria('workflow');
|
||||
$criteria->add(ProcessUserPeer::PU_UID, $aData['PU_UID'] );
|
||||
$criteria->add(ProcessUserPeer::PRO_UID, $aData['PRO_UID'] );
|
||||
$criteria->add(ProcessUserPeer::USR_UID, $aData['USR_UID'] );
|
||||
$criteria->add(ProcessUserPeer::PU_TYPE, $aData['PU_TYPE'] );
|
||||
$objects = ProcessUserPeer::doSelect($criteria, $oConnection);
|
||||
$oConnection->begin();
|
||||
foreach ($objects as $row) {
|
||||
$this->remove($row->getTasUid(), $row->getUsrUid(), $row->getTuType(), $row->getTuRelation() );
|
||||
}
|
||||
$oConnection->commit();
|
||||
|
||||
|
||||
$oProcessUser = new ProcessUser();
|
||||
$oProcessUser->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||
if ($oProcessUser->validate()) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oProcessUser->save();
|
||||
$oConnection->commit();
|
||||
return $iResult;
|
||||
}
|
||||
else {
|
||||
$sMessage = '';
|
||||
$aValidationFailures = $oProcessUser->getValidationFailures();
|
||||
foreach($aValidationFailures as $oValidationFailure) {
|
||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||
$oProcessUser = new ProcessUser();
|
||||
$oProcessUser->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||
if ($oProcessUser->validate()) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oProcessUser->save();
|
||||
$oConnection->commit();
|
||||
return $iResult;
|
||||
} else {
|
||||
$sMessage = '';
|
||||
$aValidationFailures = $oProcessUser->getValidationFailures();
|
||||
foreach ($aValidationFailures as $oValidationFailure) {
|
||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||
}
|
||||
throw(new Exception('The registry cannot be created!<br />'.$sMessage));
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
}
|
||||
throw(new Exception('The registry cannot be created!<br />'.$sMessage));
|
||||
}
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the application document registry
|
||||
* @param string $sPuUid
|
||||
* @param string $sProUid
|
||||
* @param string $sUserUid
|
||||
* @return string
|
||||
**/
|
||||
public function remove($sPuUid)
|
||||
{
|
||||
$oConnection = Propel::getConnection(ProcessUserPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oProcessUser = ProcessUserPeer::retrieveByPK($sPuUid);
|
||||
if (!is_null($oProcessUser))
|
||||
{
|
||||
$oConnection->begin();
|
||||
$iResult = $oProcessUser->delete();
|
||||
$oConnection->commit();
|
||||
return $iResult;
|
||||
}
|
||||
else {
|
||||
throw(new Exception('This row doesn\'t exist!'));
|
||||
}
|
||||
/**
|
||||
* Remove the application document registry
|
||||
* @param string $sPuUid
|
||||
* @param string $sProUid
|
||||
* @param string $sUserUid
|
||||
* @return string
|
||||
**/
|
||||
public function remove($sPuUid)
|
||||
{
|
||||
$oConnection = Propel::getConnection(ProcessUserPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oProcessUser = ProcessUserPeer::retrieveByPK($sPuUid);
|
||||
if (!is_null($oProcessUser)) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oProcessUser->delete();
|
||||
$oConnection->commit();
|
||||
return $iResult;
|
||||
} else {
|
||||
throw(new Exception('This row doesn\'t exist!'));
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
|
||||
function Exists ( $sUid ) {
|
||||
try {
|
||||
$oObj = ProcessUserPeer::retrieveByPk($sUid);
|
||||
return (is_object($oObj) && get_class($oObj) == 'ProcessUser');
|
||||
public function Exists ($sUid)
|
||||
{
|
||||
try {
|
||||
$oObj = ProcessUserPeer::retrieveByPk($sUid);
|
||||
return (is_object($oObj) && get_class($oObj) == 'ProcessUser');
|
||||
} catch (Exception $oError) {
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
} // ProcessUser
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class ProcessUserPeer extends BaseProcessUserPeer {
|
||||
class ProcessUserPeer extends BaseProcessUserPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // ProcessUserPeer
|
||||
|
||||
@@ -223,5 +223,4 @@ class ReportTable extends BaseReportTable
|
||||
}
|
||||
}
|
||||
}
|
||||
// ReportTable
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class ReportTablePeer extends BaseReportTablePeer {
|
||||
class ReportTablePeer extends BaseReportTablePeer
|
||||
{
|
||||
}
|
||||
|
||||
} // ReportTablePeer
|
||||
|
||||
@@ -21,10 +21,10 @@ require_once 'classes/model/om/BaseReportVar.php';
|
||||
class ReportVar extends BaseReportVar
|
||||
{
|
||||
/*
|
||||
* Load the report var registry
|
||||
* @param string $sRepVarUid
|
||||
* @return variant
|
||||
*/
|
||||
* Load the report var registry
|
||||
* @param string $sRepVarUid
|
||||
* @return variant
|
||||
*/
|
||||
public function load ($sRepVarUid)
|
||||
{
|
||||
try {
|
||||
@@ -156,5 +156,4 @@ class ReportVar extends BaseReportVar
|
||||
}
|
||||
}
|
||||
}
|
||||
// ReportVar
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class ReportVarPeer extends BaseReportVarPeer {
|
||||
class ReportVarPeer extends BaseReportVarPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // ReportVarPeer
|
||||
|
||||
@@ -43,10 +43,10 @@ class Route extends BaseRoute
|
||||
{
|
||||
|
||||
/*
|
||||
* Load the application document registry
|
||||
* @param string $sRouUid
|
||||
* @return variant
|
||||
*/
|
||||
* Load the application document registry
|
||||
* @param string $sRouUid
|
||||
* @return variant
|
||||
*/
|
||||
public function load ($sRouUid)
|
||||
{
|
||||
try {
|
||||
@@ -106,6 +106,7 @@ class Route extends BaseRoute
|
||||
throw ($oError);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the application document registry
|
||||
*
|
||||
@@ -213,5 +214,4 @@ class Route extends BaseRoute
|
||||
return $value;
|
||||
}
|
||||
}
|
||||
// Route
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class RoutePeer extends BaseRoutePeer {
|
||||
class RoutePeer extends BaseRoutePeer
|
||||
{
|
||||
}
|
||||
|
||||
} // RoutePeer
|
||||
|
||||
@@ -18,6 +18,7 @@ require_once 'classes/model/om/BaseSession.php';
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class Session extends BaseSession {
|
||||
class Session extends BaseSession
|
||||
{
|
||||
}
|
||||
|
||||
} // Session
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class SessionPeer extends BaseSessionPeer {
|
||||
class SessionPeer extends BaseSessionPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // SessionPeer
|
||||
|
||||
@@ -18,74 +18,72 @@ require_once 'classes/model/om/BaseShadowTable.php';
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class ShadowTable extends BaseShadowTable {
|
||||
function load($sUID) {
|
||||
try {
|
||||
$oShadowTable = ShadowTablePeer::retrieveByPK($sUID);
|
||||
if (!is_null($oShadowTable)) {
|
||||
$this->fromArray($aFields, BasePeer::TYPE_FIELDNAME);
|
||||
return $aFields;
|
||||
}
|
||||
else {
|
||||
throw(new Exception('This row doesn\'t exist!'));
|
||||
}
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
|
||||
function create($aData) {
|
||||
if (!isset($aData['SHD_UID'])) {
|
||||
$aData['SHD_UID'] = G::generateUniqueID();
|
||||
}
|
||||
else {
|
||||
if ($aData['SHD_UID'] == '') {
|
||||
$aData['SHD_UID'] = G::generateUniqueID();
|
||||
}
|
||||
}
|
||||
$oConnection = Propel::getConnection(ShadowTablePeer::DATABASE_NAME);
|
||||
try {
|
||||
$oShadowTable = new ShadowTable();
|
||||
$oShadowTable->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||
if ($oShadowTable->validate()) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oShadowTable->save();
|
||||
$oConnection->commit();
|
||||
return $aData['SHD_UID'];
|
||||
}
|
||||
else {
|
||||
$sMessage = '';
|
||||
$aValidationFailures = $oShadowTable->getValidationFailures();
|
||||
foreach($aValidationFailures as $oValidationFailure) {
|
||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||
class ShadowTable extends BaseShadowTable
|
||||
{
|
||||
public function load($sUID)
|
||||
{
|
||||
try {
|
||||
$oShadowTable = ShadowTablePeer::retrieveByPK($sUID);
|
||||
if (!is_null($oShadowTable)) {
|
||||
$this->fromArray($aFields, BasePeer::TYPE_FIELDNAME);
|
||||
return $aFields;
|
||||
} else {
|
||||
throw(new Exception('This row doesn\'t exist!'));
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
throw($oError);
|
||||
}
|
||||
throw(new Exception('The registry cannot be created!<br />' . $sMessage));
|
||||
}
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
|
||||
function remove($sUID) {
|
||||
$oConnection = Propel::getConnection(ShadowTablePeer::DATABASE_NAME);
|
||||
try {
|
||||
$oShadowTable = ShadowTablePeer::retrieveByPK($sUID);
|
||||
if (!is_null($oShadowTable)) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oShadowTable->delete();
|
||||
$oConnection->commit();
|
||||
return $iResult;
|
||||
}
|
||||
else {
|
||||
throw(new Exception('This row doesn\'t exist!'));
|
||||
}
|
||||
public function create($aData)
|
||||
{
|
||||
if (!isset($aData['SHD_UID'])) {
|
||||
$aData['SHD_UID'] = G::generateUniqueID();
|
||||
} else {
|
||||
if ($aData['SHD_UID'] == '') {
|
||||
$aData['SHD_UID'] = G::generateUniqueID();
|
||||
}
|
||||
}
|
||||
$oConnection = Propel::getConnection(ShadowTablePeer::DATABASE_NAME);
|
||||
try {
|
||||
$oShadowTable = new ShadowTable();
|
||||
$oShadowTable->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||
if ($oShadowTable->validate()) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oShadowTable->save();
|
||||
$oConnection->commit();
|
||||
return $aData['SHD_UID'];
|
||||
} else {
|
||||
$sMessage = '';
|
||||
$aValidationFailures = $oShadowTable->getValidationFailures();
|
||||
foreach ($aValidationFailures as $oValidationFailure) {
|
||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||
}
|
||||
throw(new Exception('The registry cannot be created!<br />' . $sMessage));
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
|
||||
public function remove($sUID)
|
||||
{
|
||||
$oConnection = Propel::getConnection(ShadowTablePeer::DATABASE_NAME);
|
||||
try {
|
||||
$oShadowTable = ShadowTablePeer::retrieveByPK($sUID);
|
||||
if (!is_null($oShadowTable)) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oShadowTable->delete();
|
||||
$oConnection->commit();
|
||||
return $iResult;
|
||||
} else {
|
||||
throw(new Exception('This row doesn\'t exist!'));
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
}
|
||||
} // ShadowTable
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class ShadowTablePeer extends BaseShadowTablePeer {
|
||||
class ShadowTablePeer extends BaseShadowTablePeer
|
||||
{
|
||||
}
|
||||
|
||||
} // ShadowTablePeer
|
||||
|
||||
@@ -189,5 +189,4 @@ class Stage extends BaseStage
|
||||
}
|
||||
}
|
||||
}
|
||||
// Stage
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class StagePeer extends BaseStagePeer {
|
||||
class StagePeer extends BaseStagePeer
|
||||
{
|
||||
}
|
||||
|
||||
} // StagePeer
|
||||
|
||||
@@ -97,7 +97,6 @@ class Step extends BaseStep
|
||||
$con->rollback();
|
||||
throw (new Exception( "Failed Validation in class " . get_class( $this ) . "." ));
|
||||
}
|
||||
|
||||
} catch (Exception $e) {
|
||||
$con->rollback();
|
||||
throw ($e);
|
||||
@@ -141,12 +140,12 @@ class Step extends BaseStep
|
||||
}
|
||||
|
||||
/*
|
||||
* Load the step information using the Task UID, the type and the object UID
|
||||
* @param string $sTaskUID
|
||||
* @param string $sType
|
||||
* @param string $sUID
|
||||
* @return variant
|
||||
*/
|
||||
* Load the step information using the Task UID, the type and the object UID
|
||||
* @param string $sTaskUID
|
||||
* @param string $sType
|
||||
* @param string $sUID
|
||||
* @return variant
|
||||
*/
|
||||
public function loadByType ($sTasUid, $sType, $sUid)
|
||||
{
|
||||
try {
|
||||
@@ -166,10 +165,10 @@ class Step extends BaseStep
|
||||
}
|
||||
|
||||
/*
|
||||
* update the step information using an array with all values
|
||||
* @param array $fields
|
||||
* @return variant
|
||||
*/
|
||||
* update the step information using an array with all values
|
||||
* @param array $fields
|
||||
* @return variant
|
||||
*/
|
||||
public function update ($fields)
|
||||
{
|
||||
$con = Propel::getConnection( StepPeer::DATABASE_NAME );
|
||||
@@ -203,21 +202,6 @@ class Step extends BaseStep
|
||||
$aRow = $oDataset->getRow();
|
||||
$oStepTriggers->remove( $aRow['STEP_UID'], $aRow['TAS_UID'], $aRow['TRI_UID'], $aRow['ST_TYPE'] );
|
||||
}
|
||||
/*$con = Propel::getConnection(StepPeer::DATABASE_NAME);
|
||||
try
|
||||
{
|
||||
$con->begin();
|
||||
//$this->fromArray($fields,BasePeer::TYPE_FIELDNAME);
|
||||
$this->setStepUid($sStepUID);
|
||||
$result=$this->delete();
|
||||
$con->commit();
|
||||
return $result;
|
||||
}
|
||||
catch(Exception $e)
|
||||
{
|
||||
$con->rollback();
|
||||
throw($e);
|
||||
}*/
|
||||
$oConnection = Propel::getConnection( StepPeer::DATABASE_NAME );
|
||||
try {
|
||||
$oStep = StepPeer::retrieveByPK( $sStepUID );
|
||||
@@ -254,12 +238,6 @@ class Step extends BaseStep
|
||||
public function reOrder ($sStepUID, $iPosition)
|
||||
{
|
||||
try {
|
||||
/*$oCriteria1 = new Criteria('workflow');
|
||||
$oCriteria1->add(StepPeer::STEP_POSITION, StepPeer::STEP_POSITION);
|
||||
$oCriteria2 = new Criteria('workflow');
|
||||
$oCriteria2->add(StepPeer::TAS_UID, $sTaskUID);
|
||||
$oCriteria2->add(StepPeer::STEP_POSITION, $iPosition, '>');
|
||||
BasePeer::doUpdate($oCriteria2, $oCriteria1, Propel::getConnection('workflow'));*/
|
||||
$oStep = StepPeer::retrieveByPK( $sStepUID );
|
||||
$sTaskUID = $oStep->getTasUid();
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
@@ -352,7 +330,6 @@ class Step extends BaseStep
|
||||
*
|
||||
* @param string $sUid the uid of the
|
||||
*/
|
||||
|
||||
public function StepExists ($sUid)
|
||||
{
|
||||
$con = Propel::getConnection( StepPeer::DATABASE_NAME );
|
||||
@@ -376,7 +353,6 @@ class Step extends BaseStep
|
||||
*/
|
||||
public function loadInfoAssigDynaform ($sproUid, $sObjUID)
|
||||
{
|
||||
|
||||
require_once ("classes/model/DynaformPeer.php");
|
||||
G::LoadSystem( 'dynaformhandler' );
|
||||
|
||||
@@ -481,11 +457,11 @@ class Step extends BaseStep
|
||||
$check = 0;
|
||||
foreach ($dynFields as $field) {
|
||||
$ssqlConnection = $this->getAttribute( $field, 'sqlconnection' );
|
||||
if ($ssqlConnection == $sdbsUid)
|
||||
if ($ssqlConnection == $sdbsUid) {
|
||||
$swDynaform = false;
|
||||
}
|
||||
} //end foreach
|
||||
|
||||
|
||||
} //end if
|
||||
$oDataset->next();
|
||||
} //end while
|
||||
@@ -503,11 +479,9 @@ class Step extends BaseStep
|
||||
/**
|
||||
* Get related steps for a determinated case
|
||||
*
|
||||
* @author Erik A. O. <erik@colosa.com>
|
||||
*/
|
||||
public function getAllCaseSteps ($PRO_UID, $TAS_UID, $APP_UID)
|
||||
{
|
||||
|
||||
$c = new Criteria();
|
||||
$c->addSelectColumn( '*' );
|
||||
$c->add( StepPeer::PRO_UID, $PRO_UID );
|
||||
@@ -522,7 +496,6 @@ class Step extends BaseStep
|
||||
*
|
||||
* @param string $sproUid the uid of the process
|
||||
* @param string $sdbsUid the uid of the db connection
|
||||
* @author krlos <carlos@colosa.com>
|
||||
*/
|
||||
public function lookingforUidGrids ($sproUid, $sObjUID)
|
||||
{
|
||||
@@ -567,7 +540,5 @@ class Step extends BaseStep
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
// Step
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class StepPeer extends BaseStepPeer {
|
||||
class StepPeer extends BaseStepPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // StepPeer
|
||||
|
||||
@@ -225,5 +225,4 @@ class StepSupervisor extends BaseStepSupervisor
|
||||
return ($aRow);
|
||||
}
|
||||
}
|
||||
// StepSupervisor
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class StepSupervisorPeer extends BaseStepSupervisorPeer {
|
||||
class StepSupervisorPeer extends BaseStepSupervisorPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // StepSupervisorPeer
|
||||
|
||||
@@ -41,7 +41,7 @@ require_once 'classes/model/om/BaseStepTrigger.php';
|
||||
class StepTrigger extends BaseStepTrigger
|
||||
{
|
||||
|
||||
function create ($aData)
|
||||
public function create ($aData)
|
||||
{
|
||||
$con = Propel::getConnection( StepTriggerPeer::DATABASE_NAME );
|
||||
try {
|
||||
@@ -96,7 +96,7 @@ class StepTrigger extends BaseStepTrigger
|
||||
}
|
||||
}
|
||||
|
||||
function update ($fields)
|
||||
public function update ($fields)
|
||||
{
|
||||
$con = Propel::getConnection( StepTriggerPeer::DATABASE_NAME );
|
||||
try {
|
||||
@@ -117,7 +117,7 @@ class StepTrigger extends BaseStepTrigger
|
||||
}
|
||||
}
|
||||
|
||||
function remove ($StepUid, $TasUid, $TriUid, $StType)
|
||||
public function remove ($StepUid, $TasUid, $TriUid, $StType)
|
||||
{
|
||||
$oConnection = Propel::getConnection( StepTriggerPeer::DATABASE_NAME );
|
||||
try {
|
||||
@@ -136,7 +136,7 @@ class StepTrigger extends BaseStepTrigger
|
||||
}
|
||||
}
|
||||
|
||||
function stepTriggerExists ($StepUid, $TasUid, $TriUid, $StType)
|
||||
public function stepTriggerExists ($StepUid, $TasUid, $TriUid, $StType)
|
||||
{
|
||||
$con = Propel::getConnection( StepTriggerPeer::DATABASE_NAME );
|
||||
try {
|
||||
@@ -151,7 +151,7 @@ class StepTrigger extends BaseStepTrigger
|
||||
}
|
||||
}
|
||||
|
||||
function removeTrigger ($TriUid)
|
||||
public function removeTrigger ($TriUid)
|
||||
{
|
||||
$con = Propel::getConnection( StepTriggerPeer::DATABASE_NAME );
|
||||
try {
|
||||
@@ -173,7 +173,7 @@ class StepTrigger extends BaseStepTrigger
|
||||
}
|
||||
}
|
||||
|
||||
function getNextPosition ($sStepUID, $sType)
|
||||
public function getNextPosition ($sStepUID, $sType)
|
||||
{
|
||||
try {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
@@ -190,7 +190,7 @@ class StepTrigger extends BaseStepTrigger
|
||||
}
|
||||
}
|
||||
|
||||
function reOrder ($sStepUID, $sTaskUID, $sType, $iPosition)
|
||||
public function reOrder ($sStepUID, $sTaskUID, $sType, $iPosition)
|
||||
{
|
||||
try {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
@@ -212,7 +212,7 @@ class StepTrigger extends BaseStepTrigger
|
||||
}
|
||||
}
|
||||
|
||||
function up ($sStepUID = '', $sTaskUID = '', $sTriggerUID = '', $sType = '', $iPosition = 0)
|
||||
public function up ($sStepUID = '', $sTaskUID = '', $sTriggerUID = '', $sType = '', $iPosition = 0)
|
||||
{
|
||||
try {
|
||||
if ($iPosition > 1) {
|
||||
@@ -238,7 +238,7 @@ class StepTrigger extends BaseStepTrigger
|
||||
}
|
||||
}
|
||||
|
||||
function down ($sStepUID = '', $sTaskUID = '', $sTriggerUID = '', $sType = '', $iPosition = 0)
|
||||
public function down ($sStepUID = '', $sTaskUID = '', $sTriggerUID = '', $sType = '', $iPosition = 0)
|
||||
{
|
||||
try {
|
||||
$oCriteria = new Criteria( 'workflow' );
|
||||
@@ -273,7 +273,7 @@ class StepTrigger extends BaseStepTrigger
|
||||
}
|
||||
}
|
||||
|
||||
function createRow ($aData)
|
||||
public function createRow ($aData)
|
||||
{
|
||||
$con = Propel::getConnection( StepTriggerPeer::DATABASE_NAME );
|
||||
try {
|
||||
@@ -302,5 +302,4 @@ class StepTrigger extends BaseStepTrigger
|
||||
}
|
||||
}
|
||||
}
|
||||
// StepTrigger
|
||||
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class StepTriggerPeer extends BaseStepTriggerPeer {
|
||||
class StepTriggerPeer extends BaseStepTriggerPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // StepTriggerPeer
|
||||
|
||||
@@ -18,81 +18,77 @@ require_once 'classes/model/om/BaseSubApplication.php';
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class SubApplication extends BaseSubApplication {
|
||||
|
||||
public function load($sAppUID, $sAppParent, $iIndexParent, $iThreadParent) {
|
||||
try {
|
||||
$oRow = SubApplicationPeer::retrieveByPK($sAppUID, $sAppParent, $iIndexParent, $iThreadParent);
|
||||
if (!is_null($oRow)) {
|
||||
$aFields = $oRow->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
$this->fromArray($aFields,BasePeer::TYPE_FIELDNAME);
|
||||
$this->setNew(false);
|
||||
return $aFields;
|
||||
}
|
||||
else {
|
||||
throw new Exception("The row '$sAppUID, $sAppParent, $iIndexParent, $iThreadParent' in table SubApplication doesn't exist!");
|
||||
}
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
|
||||
public function create($aData) {
|
||||
$oConnection = Propel::getConnection(SubApplicationPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oSubApplication = new SubApplication();
|
||||
$oSubApplication->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||
if ($oSubApplication->validate()) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oSubApplication->save();
|
||||
$oConnection->commit();
|
||||
return $iResult;
|
||||
}
|
||||
else {
|
||||
$sMessage = '';
|
||||
$aValidationFailures = $oSubApplication->getValidationFailures();
|
||||
foreach($aValidationFailures as $oValidationFailure) {
|
||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||
class SubApplication extends BaseSubApplication
|
||||
{
|
||||
public function load($sAppUID, $sAppParent, $iIndexParent, $iThreadParent)
|
||||
{
|
||||
try {
|
||||
$oRow = SubApplicationPeer::retrieveByPK($sAppUID, $sAppParent, $iIndexParent, $iThreadParent);
|
||||
if (!is_null($oRow)) {
|
||||
$aFields = $oRow->toArray(BasePeer::TYPE_FIELDNAME);
|
||||
$this->fromArray($aFields,BasePeer::TYPE_FIELDNAME);
|
||||
$this->setNew(false);
|
||||
return $aFields;
|
||||
} else {
|
||||
throw new Exception("The row '$sAppUID, $sAppParent, $iIndexParent, $iThreadParent' in table SubApplication doesn't exist!");
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
throw($oError);
|
||||
}
|
||||
throw(new Exception('The registry cannot be created!<br />'.$sMessage));
|
||||
}
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
|
||||
public function update($aData) {
|
||||
$oConnection = Propel::getConnection(SubApplicationPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oSubApplication = SubApplicationPeer::retrieveByPK($aData['APP_UID'], $aData['APP_PARENT'], $aData['DEL_INDEX_PARENT'], $aData['DEL_THREAD_PARENT']);
|
||||
if (!is_null($oSubApplication)) {
|
||||
$oSubApplication->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||
if ($oSubApplication->validate()) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oSubApplication->save();
|
||||
$oConnection->commit();
|
||||
return $iResult;
|
||||
public function create($aData)
|
||||
{
|
||||
$oConnection = Propel::getConnection(SubApplicationPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oSubApplication = new SubApplication();
|
||||
$oSubApplication->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||
if ($oSubApplication->validate()) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oSubApplication->save();
|
||||
$oConnection->commit();
|
||||
return $iResult;
|
||||
} else {
|
||||
$sMessage = '';
|
||||
$aValidationFailures = $oSubApplication->getValidationFailures();
|
||||
foreach ($aValidationFailures as $oValidationFailure) {
|
||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||
}
|
||||
throw(new Exception('The registry cannot be created!<br />'.$sMessage));
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
}
|
||||
else {
|
||||
$sMessage = '';
|
||||
$aValidationFailures = $oSubApplication->getValidationFailures();
|
||||
foreach($aValidationFailures as $oValidationFailure) {
|
||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||
}
|
||||
throw(new Exception('The registry cannot be updated!<br />'.$sMessage));
|
||||
}
|
||||
}
|
||||
else {
|
||||
throw(new Exception('This row doesn\'t exist!'));
|
||||
}
|
||||
}
|
||||
catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
|
||||
} // SubApplication
|
||||
public function update($aData)
|
||||
{
|
||||
$oConnection = Propel::getConnection(SubApplicationPeer::DATABASE_NAME);
|
||||
try {
|
||||
$oSubApplication = SubApplicationPeer::retrieveByPK($aData['APP_UID'], $aData['APP_PARENT'], $aData['DEL_INDEX_PARENT'], $aData['DEL_THREAD_PARENT']);
|
||||
if (!is_null($oSubApplication)) {
|
||||
$oSubApplication->fromArray($aData, BasePeer::TYPE_FIELDNAME);
|
||||
if ($oSubApplication->validate()) {
|
||||
$oConnection->begin();
|
||||
$iResult = $oSubApplication->save();
|
||||
$oConnection->commit();
|
||||
return $iResult;
|
||||
} else {
|
||||
$sMessage = '';
|
||||
$aValidationFailures = $oSubApplication->getValidationFailures();
|
||||
foreach ($aValidationFailures as $oValidationFailure) {
|
||||
$sMessage .= $oValidationFailure->getMessage() . '<br />';
|
||||
}
|
||||
throw(new Exception('The registry cannot be updated!<br />'.$sMessage));
|
||||
}
|
||||
} else {
|
||||
throw(new Exception('This row doesn\'t exist!'));
|
||||
}
|
||||
} catch (Exception $oError) {
|
||||
$oConnection->rollback();
|
||||
throw($oError);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class SubApplicationPeer extends BaseSubApplicationPeer {
|
||||
class SubApplicationPeer extends BaseSubApplicationPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // SubApplicationPeer
|
||||
|
||||
@@ -149,5 +149,4 @@ class SubProcess extends BaseSubProcess
|
||||
}
|
||||
}
|
||||
}
|
||||
// SubProcess
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class SubProcessPeer extends BaseSubProcessPeer {
|
||||
class SubProcessPeer extends BaseSubProcessPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // SubProcessPeer
|
||||
|
||||
@@ -50,10 +50,10 @@ class SwimlanesElements extends BaseSwimlanesElements
|
||||
protected $swi_text = '';
|
||||
|
||||
/*
|
||||
* Load the application document registry
|
||||
* @param string $sAppDocUid
|
||||
* @return variant
|
||||
*/
|
||||
* Load the application document registry
|
||||
* @param string $sAppDocUid
|
||||
* @return variant
|
||||
*/
|
||||
public function load ($sSwiEleUid)
|
||||
{
|
||||
try {
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
*
|
||||
* @package workflow.engine.classes.model
|
||||
*/
|
||||
class SwimlanesElementsPeer extends BaseSwimlanesElementsPeer {
|
||||
class SwimlanesElementsPeer extends BaseSwimlanesElementsPeer
|
||||
{
|
||||
}
|
||||
|
||||
} // SwimlanesElementsPeer
|
||||
|
||||
Reference in New Issue
Block a user