Adding Exporter for BPMN Projects (1st commit)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user