当前位置: 首页>>代码示例>>PHP>>正文


PHP ProcessPeer::retrieveByPK方法代码示例

本文整理汇总了PHP中ProcessPeer::retrieveByPK方法的典型用法代码示例。如果您正苦于以下问题:PHP ProcessPeer::retrieveByPK方法的具体用法?PHP ProcessPeer::retrieveByPK怎么用?PHP ProcessPeer::retrieveByPK使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ProcessPeer的用法示例。


在下文中一共展示了ProcessPeer::retrieveByPK方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: index

 function index($httpData)
 {
     if (!isset($httpData->id)) {
         throw new Exception('The Process ID was not set!');
     }
     require_once 'classes/model/Process.php';
     $process = ProcessPeer::retrieveByPK($httpData->id);
     if (get_class($process) != 'Process') {
         throw new Exception("The Process with UID: {$httpData->id} doesn't exist!");
     }
     $_SESSION['PROCESS'] = $httpData->id;
     $_SESSION['PROCESSMAP'] = 'BPMN';
     $this->includeExtJS('bpmn/MyWorkflow', true);
     $this->includeExtJS('bpmn/pmosExt', true);
     $this->includeExtJS('bpmn/TaskContext', true);
     $this->includeExtJS('bpmn/designerComponents', true);
     $this->includeExtJS('bpmn/designer', true);
     $this->includeExtJS('bpmn/Annotation', true);
     $this->includeExtJS('bpmn/bpmnShapes', true);
     $this->includeExtJS('bpmn/EventEmptyStart');
     $this->includeExtJS('bpmn/EventMessageStart');
     $this->includeExtJS('bpmn/EventTimerStart');
     $this->includeExtJS('bpmn/EventEmptyInter');
     $this->includeExtJS('bpmn/EventMessageRecInter');
     $this->includeExtJS('bpmn/EventMessageSendInter');
     $this->includeExtJS('bpmn/EventTimerInter');
     $this->includeExtJS('bpmn/EventEmptyEnd');
     $this->includeExtJS('bpmn/EventMessageEnd');
     $this->includeExtJS('bpmn/GatewayInclusive');
     $this->includeExtJS('bpmn/GatewayExclusiveData');
     $this->includeExtJS('bpmn/GatewayParallel');
     $this->includeExtJS('bpmn/GridPanel');
     $this->includeExtJS('bpmn/SubProcess');
     $this->includeExtJS('bpmn/ProcessOptions', true);
     $this->includeExtJS('bpmn/ProcessMapContext', true);
     $this->includeExtJS('bpmn/ProcessOptions', true);
     $this->setJSVar('pro_uid', $httpData->id);
     $this->setJSVar('pro_title', $process->getProTitle());
     $this->setView('bpmn/designer');
     G::RenderPage('publish', 'extJs');
 }
开发者ID:nshong,项目名称:processmaker,代码行数:41,代码来源:bpmnDesigner.php

示例2: remove

 /**
  * Remove the Prolication document registry
  *
  * @param array $aData or string $ProUid
  * @return string
  *
  */
 public function remove($ProUid)
 {
     if (is_array($ProUid)) {
         $ProUid = isset($ProUid['PRO_UID']) ? $ProUid['PRO_UID'] : '';
     }
     try {
         $oPro = ProcessPeer::retrieveByPK($ProUid);
         if (!is_null($oPro)) {
             Content::removeContent('PRO_TITLE', '', $oPro->getProUid());
             Content::removeContent('PRO_DESCRIPTION', '', $oPro->getProUid());
             $this->memcachedDelete();
             return $oPro->delete();
         } else {
             throw new Exception("The row '{$ProUid}' in table Process doesn't exist!");
         }
     } catch (Exception $oError) {
         throw $oError;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:26,代码来源:Process.php

示例3: getProcessCategoryRow

    /**

     * Gets processCategory record, if the process had one

     *

     * @param $sProUid string for the process Uid

     * @return $processCategory array

     */

    public function getProcessCategoryRow ($sProUid)

    {

        $process = ProcessPeer::retrieveByPK( $sProUid );



        if ($process->getProCategory() == '') {

            return null;

        }



        $oCriteria = new Criteria( 'workflow' );

        $oCriteria->add( ProcessCategoryPeer::CATEGORY_UID, $process->getProCategory() );

        $oDataset = ProcessCategoryPeer::doSelectRS( $oCriteria );

        $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );

        $oDataset->next();



        return $oDataset->getRow();

    }
开发者ID:rrsc,项目名称:processmaker,代码行数:43,代码来源:class.processes.php

示例4: delete

 /**
  * Implementation for 'DELETE' method for Rest API
  *
  * @param  mixed $proUid Primary key
  *
  * @return array $result Returns array within multiple records or a single record depending if
  *                       a single selection was requested passing id(s) as param
  */
 protected function delete($proUid)
 {
     $conn = Propel::getConnection(ProcessPeer::DATABASE_NAME);
     try {
         $conn->begin();
         $obj = ProcessPeer::retrieveByPK($proUid);
         if (!is_object($obj)) {
             throw new RestException(412, 'Record does not exist.');
         }
         $obj->delete();
         $conn->commit();
     } catch (Exception $e) {
         $conn->rollback();
         throw new RestException(412, $e->getMessage());
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:24,代码来源:Process.php

示例5: removeIfExists

 public static function removeIfExists($proUid)
 {
     $process = \ProcessPeer::retrieveByPK($proUid);
     if ($process) {
         $me = new self();
         $me->proUid = $process->getProUid();
         $me->remove();
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:9,代码来源:Workflow.php

示例6: generateBpmn

    public function generateBpmn($processUid, $processUidFieldNameForException, $userUid = "")
    {
        $bpmnProjectUid = "";

        try {
            //Verify data
            $obj = \ProcessPeer::retrieveByPK($processUid);

            if (is_null($obj)) {
                throw new \Exception(\G::LoadTranslation("ID_PROCESS_DOES_NOT_EXIST", array($processUidFieldNameForException, $processUid)));
            }

            //Verify data
            $criteria = new \Criteria("workflow");

            $criteria->addSelectColumn(\BpmnProjectPeer::PRJ_UID);
            $criteria->add(\BpmnProjectPeer::PRJ_UID, $processUid, \Criteria::EQUAL);

            $rsCriteria = \BpmnProjectPeer::doSelectRS($criteria);

            if ($rsCriteria->next()) {
                throw new \Exception(\G::LoadTranslation("ID_PROJECT_IS_BPMN", array($processUidFieldNameForException, $processUid)));
            }

            //Set data
            $processUidBk = $processUid;

            list($arrayWorkflowData, $arrayWorkflowFile) = $this->getData($processUid); //Get workflow data

            $arrayWorkflowData["process"] = $arrayWorkflowData["process"][0];

            $arrayWorkflowData["groupwfs"] = array();

            //Create WorkflowBpmn
            $arrayUid  = array();
            $arrayUid2 = array();

            //Process
            $arrayProcessData = $arrayWorkflowData["process"];

            unset(
                $arrayProcessData["PRO_UID"],
                $arrayProcessData["PRO_UPDATE_DATE"]
            );

            $arrayProcessData["PRO_PARENT"] = $processUidBk;
            $arrayProcessData["PRO_TITLE"]  = $arrayProcessData["PRO_TITLE"] . " - New version - " . date("M d, H:i:s");
            $arrayProcessData["PRO_CREATE_USER"] = ($userUid != "")? $userUid : "00000000000000000000000000000001";

            $this->create($arrayProcessData);

            $processUid = $this->getUid();

            $bpmnProjectUid = $processUid;

            //Task
            foreach ($arrayWorkflowData["tasks"] as $value) {
                $arrayTaskData = $value;

                $taskUidOld = $arrayTaskData["TAS_UID"];

                //Add
                unset($arrayTaskData["TAS_UID"]);

                $taskUid = $this->addTask($arrayTaskData);

                //Add new UID
                $arrayUid["task"][$taskUidOld] = $taskUid;

                $arrayUid2[] = array(
                    "old_uid" => $taskUidOld,
                    "new_uid" => $taskUid
                );
            }

            //$arrayWorkflowData["tasks"] = array();

            //Route
            $arrayRouteSecJoin = array();

            foreach ($arrayWorkflowData["routes"] as $value) {
                $arrayRouteData = $value;

                $arrayRouteData["TAS_UID"] = $arrayUid["task"][$arrayRouteData["TAS_UID"]];
                $arrayRouteData["ROU_NEXT_TASK"] = ($arrayRouteData["ROU_NEXT_TASK"] != "-1")? $arrayUid["task"][$arrayRouteData["ROU_NEXT_TASK"]] : $arrayRouteData["ROU_NEXT_TASK"];

                if ($arrayRouteData["ROU_TYPE"] != "SEC-JOIN") {
                    //Add
                    $result = $this->addRoute($arrayRouteData["TAS_UID"], $arrayRouteData["ROU_NEXT_TASK"], $arrayRouteData["ROU_TYPE"], $arrayRouteData["ROU_CONDITION"]);
                } else {
                    $arrayRouteSecJoin[] = $arrayRouteData;
                }
            }

            $arrayWorkflowData["routes"] = array();

            //Route SEC-JOIN
            foreach ($arrayRouteSecJoin as $value) {
                $arrayRouteData = $value;

//.........这里部分代码省略.........
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:101,代码来源:WorkflowBpmn.php


注:本文中的ProcessPeer::retrieveByPK方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。