示例#1
0
 /**
  * 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 BpmnData object to this object
  * through the BpmnData foreign key attribute
  *
  * @param      BpmnData $l BpmnData
  * @return     void
  * @throws     PropelException
  */
 public function addBpmnData(BpmnData $l)
 {
     $this->collBpmnDatas[] = $l;
     $l->setBpmnProject($this);
 }
示例#3
0
    public function getDataCollection($start = null, $limit = null, $filter = '', $changeCaseTo = CASE_UPPER)
    {
        if (is_array($start)) {
            extract($start);
        }

        $filter = $changeCaseTo != CASE_UPPER ? array_map("strtolower", self::$excludeFields["data"]) : self::$excludeFields["data"];

        return self::filterCollectionArrayKeys(
            \BpmnData::getAll($this->getUid(), $start, $limit, $filter, $changeCaseTo),
            $filter
        );
    }