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


PHP Tasks::getStepsOfTask方法代码示例

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


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

示例1: getAvailableSteps

 /**
  * Get available Steps of a Task
  *
  * @param string $taskUid Unique id of Task
  *
  * return array Return an array with the Steps available of a Task
  */
 public function getAvailableSteps($taskUid)
 {
     try {
         $arrayAvailableStep = array();
         //Verify data
         $this->throwExceptionIfNotExistsTask("", $taskUid, $this->arrayParamException["taskUid"]);
         //Load Task
         $task = new \Task();
         $arrayTaskData = $task->load($taskUid);
         $processUid = $arrayTaskData["PRO_UID"];
         //Get data
         //Get Uids
         $arrayUid = array();
         $task = new \Tasks();
         $arrayStep = $task->getStepsOfTask($taskUid);
         foreach ($arrayStep as $step) {
             $arrayUid[] = $step["STEP_UID_OBJ"];
         }
         //Array DB
         $arraydbStep = array();
         $delimiter = \DBAdapter::getStringDelimiter();
         //DynaForms
         $criteria = new \Criteria("workflow");
         $criteria->addSelectColumn(\DynaformPeer::DYN_UID);
         $criteria->addAsColumn("DYN_TITLE", "CT.CON_VALUE");
         $criteria->addAsColumn("DYN_DESCRIPTION", "CD.CON_VALUE");
         $criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
         $criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
         $arrayCondition = array();
         $arrayCondition[] = array(\DynaformPeer::DYN_UID, "CT.CON_ID", \Criteria::EQUAL);
         $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "DYN_TITLE" . $delimiter, \Criteria::EQUAL);
         $arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
         $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
         $arrayCondition = array();
         $arrayCondition[] = array(\DynaformPeer::DYN_UID, "CD.CON_ID", \Criteria::EQUAL);
         $arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "DYN_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
         $arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
         $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
         $criteria->add(\DynaformPeer::PRO_UID, $processUid, \Criteria::EQUAL);
         $criteria->add(\DynaformPeer::DYN_UID, $arrayUid, \Criteria::NOT_IN);
         $criteria->add(\DynaformPeer::DYN_TYPE, "xmlform", \Criteria::EQUAL);
         $rsCriteria = \DynaformPeer::doSelectRS($criteria);
         $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
         while ($rsCriteria->next()) {
             $row = $rsCriteria->getRow();
             if ($row["DYN_TITLE"] . "" == "") {
                 //There is no transaltion for this Document name, try to get/regenerate the label
                 $row["DYN_TITLE"] = \Content::Load("DYN_TITLE", "", $row["DYN_UID"], SYS_LANG);
             }
             $arraydbStep[] = array($this->getFieldNameByFormatFieldName("OBJ_UID") => $row["DYN_UID"], $this->getFieldNameByFormatFieldName("OBJ_TITLE") => $row["DYN_TITLE"], $this->getFieldNameByFormatFieldName("OBJ_DESCRIPTION") => $row["DYN_DESCRIPTION"], $this->getFieldNameByFormatFieldName("OBJ_TYPE") => "DYNAFORM");
         }
         //InputDocuments
         $criteria = new \Criteria("workflow");
         $criteria->addSelectColumn(\InputDocumentPeer::INP_DOC_UID);
         $criteria->addAsColumn("INP_DOC_TITLE", "CT.CON_VALUE");
         $criteria->addAsColumn("INP_DOC_DESCRIPTION", "CD.CON_VALUE");
         $criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
         $criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
         $arrayCondition = array();
         $arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CT.CON_ID", \Criteria::EQUAL);
         $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "INP_DOC_TITLE" . $delimiter, \Criteria::EQUAL);
         $arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
         $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
         $arrayCondition = array();
         $arrayCondition[] = array(\InputDocumentPeer::INP_DOC_UID, "CD.CON_ID", \Criteria::EQUAL);
         $arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "INP_DOC_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
         $arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
         $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
         $criteria->add(\InputDocumentPeer::PRO_UID, $processUid, \Criteria::EQUAL);
         $criteria->add(\InputDocumentPeer::INP_DOC_UID, $arrayUid, \Criteria::NOT_IN);
         $rsCriteria = \InputDocumentPeer::doSelectRS($criteria);
         $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
         while ($rsCriteria->next()) {
             $row = $rsCriteria->getRow();
             if ($row["INP_DOC_TITLE"] . "" == "") {
                 //There is no transaltion for this Document name, try to get/regenerate the label
                 $row["INP_DOC_TITLE"] = \Content::Load("INP_DOC_TITLE", "", $row["INP_DOC_UID"], SYS_LANG);
             }
             $arraydbStep[] = array($this->getFieldNameByFormatFieldName("OBJ_UID") => $row["INP_DOC_UID"], $this->getFieldNameByFormatFieldName("OBJ_TITLE") => $row["INP_DOC_TITLE"], $this->getFieldNameByFormatFieldName("OBJ_DESCRIPTION") => $row["INP_DOC_DESCRIPTION"], $this->getFieldNameByFormatFieldName("OBJ_TYPE") => "INPUT_DOCUMENT");
         }
         //OutputDocuments
         $criteria = new \Criteria("workflow");
         $criteria->addSelectColumn(\OutputDocumentPeer::OUT_DOC_UID);
         $criteria->addAsColumn("OUT_DOC_TITLE", "CT.CON_VALUE");
         $criteria->addAsColumn("OUT_DOC_DESCRIPTION", "CD.CON_VALUE");
         $criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
         $criteria->addAlias("CD", \ContentPeer::TABLE_NAME);
         $arrayCondition = array();
         $arrayCondition[] = array(\OutputDocumentPeer::OUT_DOC_UID, "CT.CON_ID", \Criteria::EQUAL);
         $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "OUT_DOC_TITLE" . $delimiter, \Criteria::EQUAL);
         $arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
         $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);
         $arrayCondition = array();
//.........这里部分代码省略.........
开发者ID:emildev35,项目名称:processmaker,代码行数:101,代码来源:Task.php

示例2: Cases

 }
 //end plugin
 //update AppData with the current file uploaded
 $oCase = new Cases();
 $aAppDataFields = $oCase->loadCase($_GET['APP_UID']);
 $oCriteria = new Criteria('workflow');
 $oCriteria->addSelectColumn(AppDelegationPeer::TAS_UID);
 $oCriteria->add(AppDelegationPeer::APP_UID, $_GET['APP_UID'], CRITERIA::EQUAL);
 $oCriteria->addAscendingOrderByColumn(AppDelegationPeer::DEL_INDEX);
 $oDataset = AppDelegationPeer::doSelectRS($oCriteria);
 $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
 $oDataset->next();
 $oTask = new Tasks();
 $aDynaforms = array();
 while ($aRow = $oDataset->getRow()) {
     $aSteps = $oTask->getStepsOfTask($aRow['TAS_UID']);
     if (is_array($aSteps)) {
         foreach ($aSteps as $key => $value) {
             $oCriteriaStep = new Criteria('workflow');
             $oCriteriaStep->addSelectColumn(StepPeer::STEP_UID_OBJ);
             $sStepId = isset($value['STEP_UID']) ? $value['STEP_UID'] : 0;
             $oCriteriaStep->add(StepPeer::STEP_UID, $sStepId, CRITERIA::EQUAL);
             $oCriteriaStep->add(StepPeer::STEP_TYPE_OBJ, 'DYNAFORM', CRITERIA::EQUAL);
             $oDataSetStep = StepPeer::doSelectRS($oCriteriaStep);
             $oDataSetStep->setFetchmode(ResultSet::FETCHMODE_ASSOC);
             $oDataSetStep->next();
             $aRows = $oDataSetStep->getRow();
             if (is_array($aRows) && !in_array($aRows['STEP_UID_OBJ'], $aDynaforms)) {
                 $aDynaforms[] = $aRows['STEP_UID_OBJ'];
             }
         }
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:cases_SupervisorSaveDocument.php

示例3: newCase


//.........这里部分代码省略.........

            $_SESSION['USER_LOGGED'] = $userId;

            $_SESSION['USR_USERNAME'] = (isset($case['USR_USERNAME'])) ? $case['USR_USERNAME'] : '';

            $_SESSION['STEP_POSITION'] = 0;



            $caseId = $case['APPLICATION'];

            $caseNr = $case['CASE_NUMBER'];



            $oldFields = $oCase->loadCase( $caseId );



            $oldFields['APP_DATA'] = array_merge( $oldFields['APP_DATA'], $Fields );



            $oldFields['DEL_INDEX'] = $case['INDEX'];

            $oldFields['TAS_UID'] = $taskId;

            $up_case = $oCase->updateCase( $caseId, $oldFields );



            //Execute all triggers of the task, according to your steps

            if ($executeTriggers == 1) {

                $task = new Tasks();

                $arrayStep = $task->getStepsOfTask($taskId);



                foreach ($arrayStep as $step) {

                    $arrayField = $oCase->loadCase($caseId);



                    $arrayField["APP_DATA"] = $oCase->executeTriggers($taskId, $step["STEP_TYPE_OBJ"], $step["STEP_UID_OBJ"], "BEFORE", $arrayField["APP_DATA"]);

                    $arrayField["APP_DATA"] = $oCase->executeTriggers($taskId, $step["STEP_TYPE_OBJ"], $step["STEP_UID_OBJ"], "AFTER", $arrayField["APP_DATA"]);



                    unset($arrayField['APP_STATUS']);

                    unset($arrayField['APP_PROC_STATUS']);

                    unset($arrayField['APP_PROC_CODE']);

                    unset($arrayField['APP_PIN']);

                    $arrayField = $oCase->updateCase($caseId, $arrayField);

                }

            }



            //Response

            $result = new wsResponse( 0, G::loadTranslation( 'ID_STARTED_SUCCESSFULLY' ) );

            $result->caseId = $caseId;

            $result->caseNumber = $caseNr;



            $g->sessionVarRestore();



            return $result;

        } catch (Exception $e) {

            $result = new wsResponse( 100, $e->getMessage() );



            $g->sessionVarRestore();



            return $result;

        }

    }
开发者ID:nhenderson,项目名称:processmaker,代码行数:101,代码来源:class.wsBase.php

示例4: getExtAvailableBBCriteria

 /**
  * Return the available building blocks list criteria object
  * @param string $sProcessUID
  * @param string $sTaskUID
  * @return object
  */
 public function getExtAvailableBBCriteria($sProcessUID = '', $sTaskUID = '')
 {
     try {
         $_SESSION['TASK'] = $sTaskUID;
         $oTasks = new Tasks();
         $_SESSION['TASK'] = $sTaskUID;
         $aSteps = $oTasks->getStepsOfTask($sTaskUID);
         $sUIDs = array();
         foreach ($aSteps as $aStep) {
             $sUIDs[] = $aStep['STEP_UID_OBJ'];
         }
         $aBB = array();
         $aBB[] = array('STEP_UID' => 'char', 'STEP_TITLE' => 'char', 'STEP_TYPE_OBJ' => 'char', 'STEP_MODE' => 'char', 'STEP_UID_OBJ' => 'char');
         $sDelimiter = DBAdapter::getStringDelimiter();
         $oCriteria = new Criteria('workflow');
         $oCriteria->addSelectColumn(DynaformPeer::DYN_UID);
         $oCriteria->addAsColumn('DYN_TITLE', 'C.CON_VALUE');
         $oCriteria->addAlias('C', 'CONTENT');
         $aConditions = array();
         $aConditions[] = array(DynaformPeer::DYN_UID, 'C.CON_ID');
         $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'DYN_TITLE' . $sDelimiter);
         $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
         $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
         $oCriteria->add(DynaformPeer::PRO_UID, $sProcessUID);
         $oCriteria->add(DynaformPeer::DYN_UID, $sUIDs, Criteria::NOT_IN);
         $oCriteria->add(DynaformPeer::DYN_TYPE, 'xmlform');
         $oDataset = DynaformPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         $i = 0;
         while ($aRow = $oDataset->getRow()) {
             $i++;
             /*$aBB [] = array ('STEP_UID' => $aRow ['DYN_UID'], 'STEP_TITLE' => $aRow ['DYN_TITLE'], 'STEP_TYPE_OBJ' => 'DYNAFORM', 'STEP_MODE' => '<select id="STEP_MODE_' . $aRow ['DYN_UID'] . '">
                <option value="EDIT">Edit</option>
                <option value="VIEW">View</option>
               </select>' );*/
             $aBB[] = array('STEP_UID' => $aRow['DYN_UID'], 'STEP_TITLE' => $aRow['DYN_TITLE'], 'STEP_TYPE_OBJ' => 'DYNAFORM', 'STEP_MODE' => 'EDIT', 'STEP_UID_OBJ' => $aRow['DYN_UID']);
             $oDataset->next();
         }
         $oCriteria = new Criteria('workflow');
         $oCriteria->addSelectColumn(InputDocumentPeer::INP_DOC_UID);
         $oCriteria->addAsColumn('INP_DOC_TITLE', 'C.CON_VALUE');
         $oCriteria->addAlias('C', 'CONTENT');
         $aConditions = array();
         $aConditions[] = array(InputDocumentPeer::INP_DOC_UID, 'C.CON_ID');
         $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'INP_DOC_TITLE' . $sDelimiter);
         $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
         $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
         $oCriteria->add(InputDocumentPeer::PRO_UID, $sProcessUID);
         $oCriteria->add(InputDocumentPeer::INP_DOC_UID, $sUIDs, Criteria::NOT_IN);
         $oDataset = InputDocumentPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $aBB[] = array('STEP_UID' => $aRow['INP_DOC_UID'], 'STEP_UID_OBJ' => $aRow['INP_DOC_UID'], 'STEP_TITLE' => $aRow['INP_DOC_TITLE'], 'STEP_TYPE_OBJ' => 'INPUT_DOCUMENT', 'STEP_MODE' => '<input type="hidden" id="STEP_MODE_' . $aRow['INP_DOC_UID'] . '">');
             $oDataset->next();
         }
         $oCriteria = new Criteria('workflow');
         $oCriteria->addSelectColumn(OutputDocumentPeer::OUT_DOC_UID);
         $oCriteria->addAsColumn('OUT_DOC_TITLE', 'C.CON_VALUE');
         $oCriteria->addAlias('C', 'CONTENT');
         $aConditions = array();
         $aConditions[] = array(OutputDocumentPeer::OUT_DOC_UID, 'C.CON_ID');
         $aConditions[] = array('C.CON_CATEGORY', $sDelimiter . 'OUT_DOC_TITLE' . $sDelimiter);
         $aConditions[] = array('C.CON_LANG', $sDelimiter . SYS_LANG . $sDelimiter);
         $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
         $oCriteria->add(OutputDocumentPeer::PRO_UID, $sProcessUID);
         $oCriteria->add(OutputDocumentPeer::OUT_DOC_UID, $sUIDs, Criteria::NOT_IN);
         $oDataset = OutputDocumentPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $aBB[] = array('STEP_UID' => $aRow['OUT_DOC_UID'], 'STEP_UID_OBJ' => $aRow['OUT_DOC_UID'], 'STEP_TITLE' => $aRow['OUT_DOC_TITLE'], 'STEP_TYPE_OBJ' => 'OUTPUT_DOCUMENT', 'STEP_MODE' => '<input type="hidden" id="STEP_MODE_' . $aRow['OUT_DOC_UID'] . '">');
             $oDataset->next();
         }
         //call plugin
         $oPluginRegistry =& PMPluginRegistry::getSingleton();
         $externalSteps = $oPluginRegistry->getSteps();
         if (is_array($externalSteps) && count($externalSteps) > 0) {
             foreach ($externalSteps as $key => $stepVar) {
                 $aBB[] = array('STEP_UID' => $stepVar->sStepId, 'STEP_TITLE' => $stepVar->sStepTitle, 'STEP_TYPE_OBJ' => 'EXTERNAL', 'STEP_MODE' => '<input type="hidden" id="STEP_MODE_' . $stepVar->sStepId . '">');
             }
         }
         global $_DBArray;
         $_DBArray = isset($_SESSION['_DBArray']) ? $_SESSION['_DBArray'] : '';
         $_DBArray['availableBB'] = $aBB;
         $_SESSION['_DBArray'] = $_DBArray;
         G::LoadClass('ArrayPeer');
         $oCriteria = new Criteria('dbarray');
         $oCriteria->setDBArrayTable('availableBB');
         $oCriteria->addAscendingOrderByColumn('STEP_TYPE_OBJ');
         $oCriteria->addAscendingOrderByColumn('STEP_TITLE');
         //return $oCriteria;
         return $_SESSION['_DBArray']['availableBB'];
//.........这里部分代码省略.........
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:101,代码来源:class.processMap.php


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