Adding new project type (bpmn) creation button and loading fe a be and some changes for method PUT /project/{prj_uid} (still not functional)

This commit is contained in:
Erik Amaru Ortiz
2014-01-23 21:29:03 -04:00
parent 0f234df1db
commit d850d666b6
8 changed files with 432 additions and 176 deletions

View File

@@ -645,13 +645,27 @@ class Process extends BaseProcess
$casesCnt = $this->getCasesCountInAllProcesses();
}
// getting bpmn projects
$c = new Criteria('workflow');
$c->addSelectColumn(BpmnProjectPeer::PRJ_UID);
$ds = ProcessPeer::doSelectRS($c);
$ds->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$bpmnProjects = array();
while ($ds->next()) {
$row = $ds->getRow();
$bpmnProjects[] = $row['PRJ_UID'];
}
//execute the query
$oDataset = ProcessPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$processes = Array ();
$uids = array ();
while ($oDataset->next()) {
$processes[] = $oDataset->getRow();
$row = $oDataset->getRow();
$row['PROJECT_TYPE'] = in_array($row['PRO_UID'], $bpmnProjects) ? 'bpmn' : 'classic';
$processes[] = $row;
$uids[] = $processes[sizeof( $processes ) - 1]['PRO_UID'];
}