/** * Builds Project Data Structure * * @return array */ protected function buildData() { $data = array(); $data["metadata"] = $this->getMetadata(); $data["metadata"]["workspace"] = defined("SYS_SYS") ? SYS_SYS : "Unknown"; $data["metadata"]["name"] = $this->getProjectName(); $data["metadata"]["uid"] = $this->getProjectUid(); $bpmnStruct["ACTIVITY"] = \BpmnActivity::getAll($this->prjUid); $bpmnStruct["ARTIFACT"] = \BpmnArtifact::getAll($this->prjUid); $bpmnStruct["BOUND"] = \BpmnBound::getAll($this->prjUid); $bpmnStruct["DATA"] = \BpmnData::getAll($this->prjUid); $bpmnStruct["DIAGRAM"] = \BpmnDiagram::getAll($this->prjUid); $bpmnStruct["DOCUMENTATION"] = array(); $bpmnStruct["EVENT"] = \BpmnEvent::getAll($this->prjUid); $bpmnStruct["EXTENSION"] = array(); $bpmnStruct["FLOW"] = \BpmnFlow::getAll($this->prjUid, null, null, "", CASE_UPPER, false); $bpmnStruct["GATEWAY"] = \BpmnGateway::getAll($this->prjUid); $bpmnStruct["LANE"] = \BpmnLane::getAll($this->prjUid); $bpmnStruct["LANESET"] = \BpmnLaneset::getAll($this->prjUid); $bpmnStruct["PARTICIPANT"] = \BpmnParticipant::getAll($this->prjUid); $bpmnStruct["PROCESS"] = \BpmnProcess::getAll($this->prjUid); $bpmnStruct["PROJECT"] = array(\BpmnProjectPeer::retrieveByPK($this->prjUid)->toArray()); $workflow = new \ProcessMaker\Project\Workflow(); list($workflowData, $workflowFile) = $workflow->getData($this->prjUid); $data["bpmn-definition"] = $bpmnStruct; $data["workflow-definition"] = $workflowData; $data["workflow-files"] = $workflowFile; return $data; }
/** * Method called to associate a BpmnBound object to this object * through the BpmnBound foreign key attribute * * @param BpmnBound $l BpmnBound * @return void * @throws PropelException */ public function addBpmnBound(BpmnBound $l) { $this->collBpmnBounds[] = $l; $l->setBpmnProject($this); }
public function toArray($type = BasePeer::TYPE_FIELDNAME) { $data = parent::toArray($type); $bouUid = $this->bound->getBouUid(); if (empty($bouUid)) { $bound = BpmnBound::findByElement('Lane', $this->getLanUid()); if (is_object($bound)) { $this->bound = $bound; } } $data = array_merge($data, $this->bound->toArray($type)); return $data; }
/** * Method called to associate a BpmnBound object to this object * through the BpmnBound foreign key attribute * * @param BpmnBound $l BpmnBound * @return void * @throws PropelException */ public function addBpmnBound(BpmnBound $l) { $this->collBpmnBounds[] = $l; $l->setBpmnDiagram($this); }