Adding Exporter for BPMN Projects (1st commit)

This commit is contained in:
Erik Amaru Ortiz
2014-02-28 19:11:34 -04:00
parent cd5c861337
commit 1a4d3b0a21
8 changed files with 294 additions and 4 deletions

View File

@@ -2584,8 +2584,14 @@ class Processes
* @return boolean
*/
public function serializeProcess ($sProUid = '')
{
return serialize($this->getWorkflowData($sProUid));
}
public function getWorkflowData($sProUid = '')
{
$oProcess = new Process();
$oData = new StdClass();
$oData->process = $this->getProcessRow( $sProUid, false );
$oData->tasks = $this->getTaskRows( $sProUid );
$oData->routes = $this->getRouteRows( $sProUid );
@@ -2619,7 +2625,7 @@ class Processes
//$oJSON = new Services_JSON();
//krumo ( $oJSON->encode($oData) );
//return $oJSON->encode($oData);
return serialize( $oData );
return $oData;
}
/**

View File

@@ -41,4 +41,25 @@ class BpmnBound extends BaseBpmnBound
return BpmnBoundPeer::doSelectOne($c);
}
public static function getAll($prjUid = null, $start = null, $limit = null, $filter = '', $changeCaseTo = CASE_UPPER)
{
$c = new Criteria('workflow');
$c->addSelectColumn("BPMN_BOUND.*");
if (! is_null($prjUid)) {
$c->add(BpmnBoundPeer::PRJ_UID, $prjUid, Criteria::EQUAL);
}
$rs = BpmnBoundPeer::doSelectRS($c);
$rs->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
$activities = array();
while ($rs->next()) {
$activities[] = $changeCaseTo !== CASE_UPPER ? array_change_key_case($rs->getRow(), CASE_LOWER) : $rs->getRow();
}
return $activities;
}
} // BpmnBound

View File

@@ -114,7 +114,7 @@ class DbSource extends BaseDbSource
return $aRow[0];
}
public function Exists($Uid, $ProUID)
public function Exists($Uid, $ProUID = "")
{
try {
$oPro = DbSourcePeer::retrieveByPk($Uid, $ProUID);