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


PHP Task::taskExists方法代码示例

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


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

示例1: removeProcessRows

    /**

     * this function remove all Process except the PROCESS ROW

     *

     * @param string $sProUid

     * @return boolean

     */

    public function removeProcessRows ($sProUid)

    {

        try {

            //Instance all classes necesaries

            $oProcess = new Process();

            $oDynaform = new Dynaform();

            $oInputDocument = new InputDocument();

            $oOutputDocument = new OutputDocument();

            $oTrigger = new Triggers();

            $oStepTrigger = new StepTrigger();

            $oRoute = new Route();

            $oStep = new Step();

            $oSubProcess = new SubProcess();

            $oCaseTracker = new CaseTracker();

            $oCaseTrackerObject = new CaseTrackerObject();

            $oObjectPermission = new ObjectPermission();

            $oSwimlaneElement = new SwimlanesElements();

            $oConnection = new DbSource();

            $oStage = new Stage();

            $oEvent = new Event();

            $oCaseScheduler = new CaseScheduler();

            $oConfig = new Configuration();



            //Delete the tasks of process

            $oCriteria = new Criteria( 'workflow' );

            $oCriteria->add( TaskPeer::PRO_UID, $sProUid );

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

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

            $oDataset->next();

            $oTask = new Task();

            while ($aRow = $oDataset->getRow()) {

                $oCriteria = new Criteria( 'workflow' );

                $oCriteria->add( StepTriggerPeer::TAS_UID, $aRow['TAS_UID'] );

                StepTriggerPeer::doDelete( $oCriteria );

                if ($oTask->taskExists( $aRow['TAS_UID'] )) {

                    $oTask->remove( $aRow['TAS_UID'] );

                }

                $oDataset->next();

            }



            //Delete the dynaforms of process

            $oCriteria = new Criteria( 'workflow' );

            $oCriteria->add( DynaformPeer::PRO_UID, $sProUid );

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

//.........这里部分代码省略.........
开发者ID:rrsc,项目名称:processmaker,代码行数:101,代码来源:class.processes.php

示例2: getAllGeneratedDocumentsCriteriaTracker

    public function getAllGeneratedDocumentsCriteriaTracker($sProcessUID, $sApplicationUID, $sDocUID)

    {

        $oAppDocument = new AppDocument();

        $oCriteria = new Criteria('workflow');

        $oCriteria->add(AppDocumentPeer::APP_UID, $sApplicationUID);

        $oCriteria->add(AppDocumentPeer::APP_DOC_TYPE, 'OUTPUT');

        $oCriteria->add(AppDocumentPeer::APP_DOC_STATUS, array('ACTIVE'), Criteria::IN);

        $oCriteria->add(AppDocumentPeer::DOC_UID, $sDocUID);

        $aConditions = array();

        $aConditions[] = array(AppDocumentPeer::APP_UID, AppDelegationPeer::APP_UID);

        $aConditions[] = array(AppDocumentPeer::DEL_INDEX, AppDelegationPeer::DEL_INDEX);

        $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);

        $oCriteria->add(AppDelegationPeer::PRO_UID, $sProcessUID);

        $oCriteria->addAscendingOrderByColumn(AppDocumentPeer::APP_DOC_INDEX);

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

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

        $oDataset->next();

        $aOutputDocuments = array();

        $aOutputDocuments[] = array(

            'APP_DOC_UID' => 'char',

            'DOC_UID' => 'char',

            'APP_DOC_COMMENT' => 'char',

            'APP_DOC_FILENAME' => 'char',

            'APP_DOC_INDEX' => 'integer'

        );

        while ($aRow = $oDataset->getRow()) {

            $oCriteria2 = new Criteria('workflow');

            $oCriteria2->add(AppDelegationPeer::APP_UID, $sApplicationUID);

            $oCriteria2->add(AppDelegationPeer::DEL_INDEX, $aRow['DEL_INDEX']);

            $oDataset2 = AppDelegationPeer::doSelectRS($oCriteria2);

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

            $oDataset2->next();

            $aRow2 = $oDataset2->getRow();

            $oTask = new Task();

            if ($oTask->taskExists($aRow2['TAS_UID'])) {

                $aTask = $oTask->load($aRow2['TAS_UID']);

            } else {

                $aTask = array('TAS_TITLE' => '(TASK DELETED)');

            }

            $aAux = $oAppDocument->load($aRow['APP_DOC_UID'], $aRow['DOC_VERSION']);

            $aFields = array(

                'APP_DOC_UID' => $aAux['APP_DOC_UID'],

                'DOC_UID' => $aAux['DOC_UID'],

                'APP_DOC_COMMENT' => $aAux['APP_DOC_COMMENT'],

                'APP_DOC_FILENAME' => $aAux['APP_DOC_FILENAME'],

                'APP_DOC_INDEX' => $aAux['APP_DOC_INDEX'],

                'ORIGIN' => $aTask['TAS_TITLE']

            );

            if ($aFields['APP_DOC_FILENAME'] != '') {

                $aFields['TITLE'] = $aFields['APP_DOC_FILENAME'];

//.........这里部分代码省略.........
开发者ID:nhenderson,项目名称:processmaker,代码行数:101,代码来源:class.case.php

示例3: throwExceptionIfNotExistsTask

    /**
     * Verify if doesn't exist the Task in table TASK
     *
     * @param string $taskUid Unique id of Task
     *
     * return void Throw exception if doesn't exist the Task in table TASK
     */
    public function throwExceptionIfNotExistsTask($taskUid)
    {
        $task = new \Task();

        if (!$task->taskExists($taskUid)) {
            throw new \Exception(\G::LoadTranslation("ID_ACTIVITY_DOES_NOT_EXIST", array($this->arrayParamException["taskUid"], $taskUid)));
        }
    }
开发者ID:rrsc,项目名称:processmaker,代码行数:15,代码来源:Step.php

示例4: updateTaskRows

 /**
  * updates row tasks from an Task Array
  * @param string $aTasks
  * @return array
  */
 public function updateTaskRows($aTask)
 {
     foreach ($aTask as $key => $row) {
         $oTask = new Task();
         if ($oTask->taskExists($row['TAS_UID'])) {
             $oTask->remove($row['TAS_UID']);
         } else {
             $res = $oTask->update($row);
         }
     }
     return;
 }
开发者ID:nshong,项目名称:processmaker,代码行数:17,代码来源:class.tasks.php

示例5: validateTasUid

 /**
  * Validate Task Uid
  * @var string $tas_uid. Uid for task
  *
  * @author Brayan Pereyra (Cochalo) <brayan@colosa.com>
  * @copyright Colosa - Bolivia
  *
  * @return string
  */
 public function validateTasUid($tas_uid)
 {
     $tas_uid = trim($tas_uid);
     if ($tas_uid == '') {
         throw new \Exception(\G::LoadTranslation("ID_TASK_NOT_EXIST", array('tas_uid', '')));
     }
     $oTask = new \Task();
     if (!$oTask->taskExists($tas_uid)) {
         throw new \Exception(\G::LoadTranslation("ID_TASK_NOT_EXIST", array('tas_uid', $tas_uid)));
     }
     return $tas_uid;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:21,代码来源:Event.php

示例6: createAll

 /**
  * Assign Trigger to a Step
  *
  * @param string $stepUid    Unique id of Step
  * @param string $type       Type (BEFORE, AFTER, BEFORE_ASSIGNMENT, BEFORE_ROUTING, AFTER_ROUTING)
  * @param string $taskUid    Unique id of Task
  * @param string $triggerUid Unique id of Trigger
  * @param array  $arrayData  Data
  *
  * return array Data of the Trigger assigned to a Step
  */
 public function createAll($stepUid, $type, $taskUid, $triggerUid, $arrayData)
 {
     try {
         $stepUidIni = $stepUid;
         $typeIni = $type;
         $flagStepAssignTask = 0;
         if ($stepUid == "") {
             $flagStepAssignTask = 1;
             switch ($type) {
                 case "BEFORE_ASSIGNMENT":
                     $stepUid = "-1";
                     $type = "BEFORE";
                     break;
                 case "BEFORE_ROUTING":
                     $stepUid = "-2";
                     $type = "BEFORE";
                     break;
                 case "AFTER_ROUTING":
                     $stepUid = "-2";
                     $type = "AFTER";
                     break;
             }
         }
         //Verify data
         if ($flagStepAssignTask == 0) {
             $step = new \Step();
             if (!$step->StepExists($stepUid)) {
                 throw new \Exception(\G::LoadTranslation("ID_STEP_DOES_NOT_EXIST", array("step_uid", $stepUid)));
             }
         }
         $task = new \Task();
         if (!$task->taskExists($taskUid)) {
             throw new \Exception(\G::LoadTranslation("ID_ACTIVITY_DOES_NOT_EXIST", array("act_uid", $taskUid)));
         }
         $trigger = new \Triggers();
         if (!$trigger->TriggerExists($triggerUid)) {
             throw new \Exception(\G::LoadTranslation("ID_TRIGGER_DOES_NOT_EXIST", array("tri_uid", $triggerUid)));
         }
         if ($this->existsRecord($stepUid, $type, $taskUid, $triggerUid)) {
             throw new \Exception(\G::LoadTranslation("ID_RECORD_EXISTS_IN_TABLE", array($stepUid . ", " . $type . ", " . $taskUid . ", " . $triggerUid, "STEP_TRIGGER")));
         }
         //Create
         $stepTrigger = new \StepTrigger();
         //            $posIni = $stepTrigger->getNextPosition($stepUid, $type, $taskUid);
         $stepTrigger->createRow(array("STEP_UID" => $stepUid, "TAS_UID" => $taskUid, "TRI_UID" => $triggerUid, "ST_TYPE" => $type, "ST_CONDITION" => isset($arrayData['st_condition']) ? $arrayData['st_condition'] : '', "ST_POSITION" => $arrayData['st_position']));
         $arrayData = $this->updateAll($stepUid, $typeIni, $taskUid, $triggerUid, $arrayData);
         return $arrayData;
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:62,代码来源:Trigger.php


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