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


PHP TaskPeer::doSelectRS方法代码示例

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


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

示例1: throwExceptionIfNotExistsTask

 /**
  * Verify if doesn't exists the Task
  *
  * @param string $processUid            Unique id of Process
  * @param string $taskUid               Unique id of Task
  * @param string $fieldNameForException Field name for the exception
  *
  * return void Throw exception if doesn't exists the Task
  */
 public function throwExceptionIfNotExistsTask($processUid, $taskUid, $fieldNameForException)
 {
     try {
         $criteria = new \Criteria("workflow");
         $criteria->addSelectColumn(\TaskPeer::TAS_UID);
         if ($processUid != "") {
             $criteria->add(\TaskPeer::PRO_UID, $processUid, \Criteria::EQUAL);
         }
         $criteria->add(\TaskPeer::TAS_UID, $taskUid, \Criteria::EQUAL);
         $rsCriteria = \TaskPeer::doSelectRS($criteria);
         if (!$rsCriteria->next()) {
             throw new \Exception(\G::LoadTranslation("ID_ACTIVITY_DOES_NOT_EXIST", array($fieldNameForException, $taskUid)));
         }
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:26,代码来源:Task.php

示例2: getMaximunTaskX

 public function getMaximunTaskX($processUid)
 {
     $criteria = new Criteria('workflow');
     $criteria->addSelectColumn('MAX(TAS_POSX) AS MAX_X');
     $criteria->add(TaskPeer::PRO_UID, $processUid);
     $dataset = TaskPeer::doSelectRS($criteria);
     $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $dataset->next();
     $row = $dataset->getRow();
     return (int) $row['MAX_X'];
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:11,代码来源:class.processMap.php

示例3: getTaskUnassignedUsersGroupsData

 /**
  * Get the list of groups of unassigned users of the specified task from
  * database
  *
  * @param string $ProUID
  *          Process identifier
  * @param string $TaskUID
  *          task identifier
  * @return array of unassigned user groups
  */
 public function getTaskUnassignedUsersGroupsData($ProUID, $TaskUID)
 {
     $unassignedUsersGroups = array();
     $c = new Criteria();
     $c->addSelectColumn(TaskUserPeer::USR_UID);
     $c->addSelectColumn(TaskUserPeer::TU_RELATION);
     $aConditions = array();
     $aConditions[] = array(TaskPeer::TAS_UID, TaskUserPeer::TAS_UID);
     $aConditions[] = array(TaskPeer::TAS_ASSIGN_TYPE, DBAdapter::getStringDelimiter() . 'SELF_SERVICE' . DBAdapter::getStringDelimiter());
     $c->addJoinMC($aConditions, Criteria::JOIN);
     $c->add(TaskPeer::PRO_UID, $ProUID);
     $c->add(TaskPeer::TAS_UID, $TaskUID);
     $rs = TaskPeer::doSelectRS($c);
     $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     // echo $c->toString();
     $rs->next();
     $row = $rs->getRow();
     while (is_array($row)) {
         $unassignedUsersGroups[] = $row;
         $rs->next();
         $row = $rs->getRow();
     }
     return $unassignedUsersGroups;
 }
开发者ID:nshong,项目名称:processmaker,代码行数:34,代码来源:class.AppSolr.php

示例4: deleteProcess

    /**
     * Delete Process
     *
     * @param string $processUid
     * @param bool   $checkCases
     *
     * return bool   Return true, if is succesfully
     *
     * @access public

    DEPRECATED
    public function deleteProcess($processUid, $checkCases = true)
    {
        if ($checkCases) {
            $process = new \Process();

            $arrayCases = $process->getCasesCountInAllProcesses($processUid);

            $sum = 0;

            if (isset($arrayCases[$processUid]) && count($arrayCases[$processUid]) > 0) {
                foreach ($arrayCases[$processUid] as $value) {
                    $sum = $sum + $value;
                }
            }

            if ($sum > 0) {
                throw (new \Exception("You can't delete the process, because it has $sum cases"));
            }
        }

        $processMap = new \processMap();

        return $processMap->deleteProcess($processUid);

    }*/

    public function deleteProcess($sProcessUID)
    {
        try {
            G::LoadClass('case');
            G::LoadClass('reportTables');
            //Instance all classes necesaries
            $oProcess = new Process();
            $oDynaform = new Dynaform();
            $oInputDocument = new InputDocument();
            $oOutputDocument = new OutputDocument();
            $oTrigger = new Triggers();
            $oRoute = new Route();
            $oGateway = new Gateway();
            $oEvent = new Event();
            $oSwimlaneElement = new SwimlanesElements();
            $oConfiguration = new Configuration();
            $oDbSource = new DbSource();
            $oReportTable = new ReportTables();
            $oCaseTracker = new CaseTracker();
            $oCaseTrackerObject = new CaseTrackerObject();
            //Delete the applications of process
            $oCriteria = new Criteria('workflow');
            $oCriteria->add(ApplicationPeer::PRO_UID, $sProcessUID);
            $oDataset = ApplicationPeer::doSelectRS($oCriteria);
            $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
            $oDataset->next();
            $oCase = new Cases();
            while ($aRow = $oDataset->getRow()) {
                $oCase->removeCase($aRow['APP_UID']);
                $oDataset->next();
            }
            //Delete the tasks of process
            $oCriteria = new Criteria('workflow');
            $oCriteria->add(TaskPeer::PRO_UID, $sProcessUID);
            $oDataset = TaskPeer::doSelectRS($oCriteria);
            $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
            $oDataset->next();
            while ($aRow = $oDataset->getRow()) {
                $this->deleteTask($aRow['TAS_UID']);
                $oDataset->next();
            }
            //Delete the dynaforms of process
            $oCriteria = new Criteria('workflow');
            $oCriteria->add(DynaformPeer::PRO_UID, $sProcessUID);
            $oDataset = DynaformPeer::doSelectRS($oCriteria);
            $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
            $oDataset->next();
            while ($aRow = $oDataset->getRow()) {
                $oDynaform->remove($aRow['DYN_UID']);
                $oDataset->next();
            }
            //Delete the input documents of process
            $oCriteria = new Criteria('workflow');
            $oCriteria->add(InputDocumentPeer::PRO_UID, $sProcessUID);
            $oDataset = InputDocumentPeer::doSelectRS($oCriteria);
            $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
            $oDataset->next();
            while ($aRow = $oDataset->getRow()) {
                $oInputDocument->remove($aRow['INP_DOC_UID']);
                $oDataset->next();
            }
            //Delete the output documents of process
            $oCriteria = new Criteria('workflow');
//.........这里部分代码省略.........
开发者ID:rrsc,项目名称:processmaker,代码行数:101,代码来源:Process.php

示例5: 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

示例6: derivateCase

    /**

     * derivate Case moves the case to the next task in the process according to the routing rules

     *

     * @param string $userId

     * @param string $caseId

     * @param string $delIndex

     * @param array $tasks

     * @param bool   $bExecuteTriggersBeforeAssignment

     * @return $result will return an object

     */

    public function derivateCase ($userId, $caseId, $delIndex, $bExecuteTriggersBeforeAssignment = false, $tasks = array())

    {

        $g = new G();



        try {

            $g->sessionVarSave();



            $_SESSION["APPLICATION"] = $caseId;

            $_SESSION["INDEX"] = $delIndex;

            $_SESSION["USER_LOGGED"] = $userId;



            $sStatus = 'TO_DO';



            $varResponse = '';

            $varTriggers = "\n";



            if ($delIndex == '') {

                $oCriteria = new Criteria( 'workflow' );

                $oCriteria->addSelectColumn( AppDelegationPeer::DEL_INDEX );

                $oCriteria->add( AppDelegationPeer::APP_UID, $caseId );

                $oCriteria->add( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL );



                if (AppDelegationPeer::doCount( $oCriteria ) > 1) {

                    $result = new wsResponse( 20, G::loadTranslation( 'ID_SPECIFY_DELEGATION_INDEX' ) );

                    return $result;

                }



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

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

                $oDataset->next();

                $aRow = $oDataset->getRow();

                $delIndex = $aRow['DEL_INDEX'];

            }



            $oAppDel = new AppDelegation();

            $appdel = $oAppDel->Load( $caseId, $delIndex );



            if ($userId != $appdel['USR_UID']) {

                $result = new wsResponse( 17, G::loadTranslation( 'ID_CASE_ASSIGNED_ANOTHER_USER' ) );



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

示例7: getTaskUid

 /**
  * Get data of unique ids of a Task (Unique id of Process)
  *
  * @param string $taskUid Unique id of Task
  *
  * return array
  */
 public function getTaskUid($taskUid)
 {
     try {
         $criteria = new \Criteria("workflow");
         $criteria->addSelectColumn(\TaskPeer::TAS_UID);
         $criteria->add(\TaskPeer::TAS_UID, $taskUid, \Criteria::EQUAL);
         $rsCriteria = \TaskPeer::doSelectRS($criteria);
         $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
         $rsCriteria->next();
         return $rsCriteria->getRow();
     } catch (\Exception $e) {
         throw $e;
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:21,代码来源:CaseScheduler.php

示例8: Processes

            }

            G::LoadClass('processes');
            $infoProcess = new Processes();

            if(!$infoProcess->processExists($proUid)) {
                $oSL = new SwimlanesElements();
                if($oSL->swimlanesElementsExists($proUid)) {
                    $aFields = $oSL->load($proUid);
                    $proUid = $aFields['PRO_UID'];
                } else {
                    $k = new Criteria('workflow');
                    $k->clearSelectColumns();
                    $k->addSelectColumn(TaskPeer::PRO_UID);
                    $k->add(TaskPeer::TAS_UID, $uidAux );
                    $rs = TaskPeer::doSelectRS($k);
                    $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
                    $rs->next();
                    $row = $rs->getRow();
                    $proUid = $row['PRO_UID'];
                }
            }
            $resultProcess = $infoProcess->getProcessRow($proUid);
        } else {
            if(array_key_exists('PU_UID', $oDataAux)) {
                $c = new Criteria('workflow');
                $c->clearSelectColumns();
                $c->addSelectColumn(ProcessUserPeer::PRO_UID);
                $c->addSelectColumn(ProcessUserPeer::USR_UID);
                $c->add(ProcessUserPeer::PU_UID, $oData->PU_UID);
                $oDataset = AppDelegationPeer::doSelectRS($c);
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:31,代码来源:processes_Ajax.php

示例9: getTasks

    /**
     * Get all Tasks of Case
     * Based in: processmaker/workflow/engine/classes/class.processMap.php
     * Method:   processMap::load()
     *
     * @param string $applicationUid Unique id of Case
     *
     * return array Return an array with all Tasks of Case
     */
    public function getTasks($applicationUid)
    {
        try {
            $arrayTask = array();

            //Verify data
            $this->throwExceptionIfNotExistsCase($applicationUid, 0, $this->getFieldNameByFormatFieldName("APP_UID"));

            //Set variables
            $process = new \Process();
            $application = new \Application();
            $conf = new \Configurations();

            $arrayApplicationData = $application->Load($applicationUid);
            $processUid = $arrayApplicationData["PRO_UID"];

            $confEnvSetting = $conf->getFormats();

            $taskUid = "";

            //Get data
            //SQL
            $delimiter = \DBAdapter::getStringDelimiter();

            $criteria = new \Criteria("workflow");

            $criteria->addSelectColumn(\TaskPeer::TAS_UID);
            $criteria->addAsColumn("TAS_TITLE", "CT.CON_VALUE");
            $criteria->addAsColumn("TAS_DESCRIPTION", "CD.CON_VALUE");
            $criteria->addSelectColumn(\TaskPeer::TAS_START);
            $criteria->addSelectColumn(\TaskPeer::TAS_TYPE);
            $criteria->addSelectColumn(\TaskPeer::TAS_DERIVATION);
            $criteria->addSelectColumn(\TaskPeer::TAS_ASSIGN_TYPE);
            $criteria->addSelectColumn(\UsersPeer::USR_UID);
            $criteria->addSelectColumn(\UsersPeer::USR_USERNAME);
            $criteria->addSelectColumn(\UsersPeer::USR_FIRSTNAME);
            $criteria->addSelectColumn(\UsersPeer::USR_LASTNAME);

            $criteria->addAlias("CT", \ContentPeer::TABLE_NAME);
            $criteria->addAlias("CD", \ContentPeer::TABLE_NAME);

            $arrayCondition = array();
            $arrayCondition[] = array(\TaskPeer::TAS_UID, "CT.CON_ID", \Criteria::EQUAL);
            $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "TAS_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(\TaskPeer::TAS_UID, "CD.CON_ID", \Criteria::EQUAL);
            $arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "TAS_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
            $arrayCondition[] = array("CD.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
            $criteria->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);

            $criteria->addJoin(\TaskPeer::TAS_LAST_ASSIGNED, \UsersPeer::USR_UID, \Criteria::LEFT_JOIN);

            $criteria->add(\TaskPeer::PRO_UID, $processUid, \Criteria::EQUAL);

            $rsCriteria = \TaskPeer::doSelectRS($criteria);
            $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);

            while ($rsCriteria->next()) {
                $row = $rsCriteria->getRow();

                //Task
                if ($row["TAS_TYPE"] == "NORMAL") {
                    if (($row["TAS_TITLE"] . "" == "")) {
                        //There is no Label in Current SYS_LANG language so try to find in English - by default
                        $task = new \Task();
                        $task->setTasUid($row["TAS_UID"]);

                        $row["TAS_TITLE"] = $task->getTasTitle();
                    }
                } else {
                    $criteria2 = new \Criteria("workflow");

                    $criteria2->addSelectColumn(\SubProcessPeer::PRO_UID);
                    $criteria2->addAsColumn("TAS_TITLE", "CT.CON_VALUE");
                    $criteria2->addAsColumn("TAS_DESCRIPTION", "CD.CON_VALUE");

                    $criteria2->addAlias("CT", \ContentPeer::TABLE_NAME);
                    $criteria2->addAlias("CD", \ContentPeer::TABLE_NAME);

                    $arrayCondition = array();
                    $arrayCondition[] = array(\SubProcessPeer::TAS_PARENT, "CT.CON_ID", \Criteria::EQUAL);
                    $arrayCondition[] = array("CT.CON_CATEGORY", $delimiter . "TAS_TITLE" . $delimiter, \Criteria::EQUAL);
                    $arrayCondition[] = array("CT.CON_LANG", $delimiter . SYS_LANG . $delimiter, \Criteria::EQUAL);
                    $criteria2->addJoinMC($arrayCondition, \Criteria::LEFT_JOIN);

                    $arrayCondition = array();
                    $arrayCondition[] = array(\SubProcessPeer::TAS_PARENT, "CD.CON_ID", \Criteria::EQUAL);
                    $arrayCondition[] = array("CD.CON_CATEGORY", $delimiter . "TAS_DESCRIPTION" . $delimiter, \Criteria::EQUAL);
//.........这里部分代码省略.........
开发者ID:nhenderson,项目名称:processmaker,代码行数:101,代码来源:Cases.php

示例10: kgetassigType

 public function kgetassigType($pro_uid, $tas)
 {
     $k = new Criteria();
     $k->clearSelectColumns();
     $k->addSelectColumn(TaskPeer::TAS_UID);
     $k->addSelectColumn(TaskPeer::TAS_ASSIGN_TYPE);
     $k->add(TaskPeer::PRO_UID, $pro_uid);
     $k->add(TaskPeer::TAS_UID, $tas);
     $rs = TaskPeer::doSelectRS($k);
     $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $rs->next();
     $row = $rs->getRow();
     return $row;
 }
开发者ID:nshong,项目名称:processmaker,代码行数:14,代码来源:Task.php

示例11: getTaskPriority

 public function getTaskPriority($taskUid, $proUid, $appUid)
 {
     $criteria = new Criteria();
     $criteria->addSelectColumn(TaskPeer::TAS_PRIORITY_VARIABLE);
     $criteria->add(TaskPeer::TAS_UID, $taskUid, Criteria::EQUAL);
     $criteria->add(TaskPeer::PRO_UID, $proUid, Criteria::EQUAL);
     $dataset = TaskPeer::doSelectRS($criteria);
     $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $dataset->next();
     $aRow = $dataset->getRow();
     $priority = $aRow['TAS_PRIORITY_VARIABLE'];
     if (strlen($priority) > 2) {
         $oCase = new Cases();
         $aData = $oCase->loadCase($appUid);
         $priorityLabel = substr($priority, 2, strlen($priority));
         if (isset($aData['APP_DATA'][$priorityLabel])) {
             $priority = $aData['APP_DATA'][$priorityLabel];
         }
     }
     return $priority != "" ? $priority : 3;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:21,代码来源:ListInbox.php

示例12: getCasesListBookmarkStarCase

 /**
  * Get process list bookmark for start case
  *
  * @param string $usrUid id of user
  * @param string $typeView type of view
  *
  * return array Return an array with process list that the user can start.
  */
 public function getCasesListBookmarkStarCase($usrUid, $typeView)
 {
     try {
         Validator::usrUid($usrUid, '$usr_uid');
         $user = new \Users();
         $fields = $user->load($usrUid);
         $bookmark = empty($fields['USR_BOOKMARK_START_CASES']) ? array() : unserialize($fields['USR_BOOKMARK_START_CASES']);
         //Getting group id and adding the user id
         $group = new \Groups();
         $groups = $group->getActiveGroupsForAnUser($usrUid);
         $groups[] = $usrUid;
         $c = new \Criteria();
         $c->clearSelectColumns();
         $c->addSelectColumn(\TaskPeer::TAS_UID);
         $c->addSelectColumn(\TaskPeer::PRO_UID);
         $c->addJoin(\TaskPeer::PRO_UID, \ProcessPeer::PRO_UID, \Criteria::LEFT_JOIN);
         $c->addJoin(\TaskPeer::TAS_UID, \TaskUserPeer::TAS_UID, \Criteria::LEFT_JOIN);
         $c->add(\ProcessPeer::PRO_STATUS, 'ACTIVE');
         $c->add(\TaskPeer::TAS_START, 'TRUE');
         $c->add(\TaskUserPeer::USR_UID, $groups, \Criteria::IN);
         $c->add(\TaskPeer::TAS_UID, $bookmark, \Criteria::IN);
         $c->addAsColumn('TAS_TITLE', 'C1.CON_VALUE');
         $c->addAlias("C1", 'CONTENT');
         $tasTitleConds = array();
         $tasTitleConds[] = array(\TaskPeer::TAS_UID, 'C1.CON_ID');
         $tasTitleConds[] = array('C1.CON_CATEGORY', \DBAdapter::getStringDelimiter() . 'TAS_TITLE' . \DBAdapter::getStringDelimiter());
         $tasTitleConds[] = array('C1.CON_LANG', \DBAdapter::getStringDelimiter() . SYS_LANG . \DBAdapter::getStringDelimiter());
         $c->addJoinMC($tasTitleConds, \Criteria::LEFT_JOIN);
         $c->addAsColumn('PRO_TITLE', 'C2.CON_VALUE');
         $c->addAlias("C2", 'CONTENT');
         $proTitleConds = array();
         $proTitleConds[] = array(\ProcessPeer::PRO_UID, 'C2.CON_ID');
         $proTitleConds[] = array('C2.CON_CATEGORY', \DBAdapter::getStringDelimiter() . 'PRO_TITLE' . \DBAdapter::getStringDelimiter());
         $proTitleConds[] = array('C2.CON_LANG', \DBAdapter::getStringDelimiter() . SYS_LANG . \DBAdapter::getStringDelimiter());
         $c->addJoinMC($proTitleConds, \Criteria::LEFT_JOIN);
         if ($typeView == 'category') {
             $c->addAsColumn('PRO_CATEGORY', 'PCS.PRO_CATEGORY');
             $c->addAsColumn('CATEGORY_NAME', 'PCSCAT.CATEGORY_NAME');
             $c->addAlias('PCS', 'PROCESS');
             $c->addAlias('PCSCAT', 'PROCESS_CATEGORY');
             $aConditions = array();
             $aConditions[] = array(\TaskPeer::PRO_UID, 'PCS.PRO_UID');
             $c->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
             $aConditions = array();
             $aConditions[] = array('PCS.PRO_CATEGORY', 'PCSCAT.CATEGORY_UID');
             $c->addJoinMC($aConditions, \Criteria::LEFT_JOIN);
         }
         $c->setDistinct();
         $rs = \TaskPeer::doSelectRS($c);
         $rs->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
         $processList = array();
         while ($rs->next()) {
             $row = $rs->getRow();
             if ($typeView == 'category') {
                 $processList[] = array('tas_uid' => $row['TAS_UID'], 'pro_title' => $row['PRO_TITLE'] . '(' . $row['TAS_TITLE'] . ')', 'pro_uid' => $row['PRO_UID'], 'pro_category' => $row['PRO_CATEGORY'], 'category_name' => $row['CATEGORY_NAME']);
             } else {
                 $processList[] = array('tas_uid' => $row['TAS_UID'], 'pro_title' => $row['PRO_TITLE'] . '(' . $row['TAS_TITLE'] . ')', 'pro_uid' => $row['PRO_UID']);
             }
         }
         if (count($processList) == 0) {
             $processList['success'] = 'failure';
             $processList['message'] = G::LoadTranslation('ID_NOT_HAVE_BOOKMARKED_PROCESSES');
         }
         return $processList;
     } catch (\Exception $e) {
         throw new RestException(Api::STAT_APP_EXCEPTION, $e->getMessage());
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:76,代码来源:Cases.php

示例13: newExtObjectPermission

 /**
  * newExtObjectPermission
  *
  * @param  string           $sProcessUID
  * @param  string           $sAction
  * @return array depending on action
  */
 function newExtObjectPermission($sProcessUID, $sAction)
 {
     $aAllTasks = array();
     $aAllTasks[] = array('UID' => 'char', 'LABEL' => 'char');
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(TaskPeer::PRO_UID);
     $oCriteria->addSelectColumn(TaskPeer::TAS_UID);
     $oCriteria->addSelectColumn(ContentPeer::CON_VALUE);
     $aConditions = array();
     $aConditions[] = array(0 => TaskPeer::TAS_UID, 1 => ContentPeer::CON_ID);
     $aConditions[] = array(0 => ContentPeer::CON_CATEGORY, 1 => DBAdapter::getStringDelimiter() . 'TAS_TITLE' . DBAdapter::getStringDelimiter());
     $aConditions[] = array(0 => ContentPeer::CON_LANG, 1 => DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
     $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
     $oCriteria->add(TaskPeer::PRO_UID, $sProcessUID);
     $oDataset = TaskPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $oDataset->next();
     while ($aRow = $oDataset->getRow()) {
         $aAllTasks[] = array('UID' => $aRow['TAS_UID'], 'LABEL' => $aRow['CON_VALUE']);
         $oDataset->next();
     }
     $aUsersGroups = array();
     $aUsersGroups[] = array('UID' => 'char', 'LABEL' => 'char');
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(GroupwfPeer::GRP_UID);
     $oCriteria->addAsColumn('GRP_TITLE', ContentPeer::CON_VALUE);
     $aConditions = array();
     $aConditions[] = array(GroupwfPeer::GRP_UID, ContentPeer::CON_ID);
     $aConditions[] = array(ContentPeer::CON_CATEGORY, DBAdapter::getStringDelimiter() . 'GRP_TITLE' . DBAdapter::getStringDelimiter());
     $aConditions[] = array(ContentPeer::CON_LANG, DBAdapter::getStringDelimiter() . SYS_LANG . DBAdapter::getStringDelimiter());
     $oCriteria->addJoinMC($aConditions, Criteria::LEFT_JOIN);
     $oCriteria->add(GroupwfPeer::GRP_STATUS, 'ACTIVE');
     $oDataset = GroupwfPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $oDataset->next();
     while ($aRow = $oDataset->getRow()) {
         $aUsersGroups[] = array('UID' => '2|' . $aRow['GRP_UID'], 'LABEL' => $aRow['GRP_TITLE'] . ' (' . G::LoadTranslation('ID_GROUP') . ')');
         $oDataset->next();
     }
     $oCriteria = new Criteria('workflow');
     $oCriteria->addSelectColumn(UsersPeer::USR_UID);
     $oCriteria->addSelectColumn(UsersPeer::USR_USERNAME);
     $oCriteria->addSelectColumn(UsersPeer::USR_FIRSTNAME);
     $oCriteria->addSelectColumn(UsersPeer::USR_LASTNAME);
     $oCriteria->add(UsersPeer::USR_STATUS, 'ACTIVE');
     $oDataset = UsersPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $oDataset->next();
     while ($aRow = $oDataset->getRow()) {
         $aUsersGroups[] = array('UID' => '1|' . $aRow['USR_UID'], 'LABEL' => $aRow['USR_FIRSTNAME'] . ' ' . $aRow['USR_LASTNAME'] . ' (' . $aRow['USR_USERNAME'] . ')');
         $oDataset->next();
     }
     $aAllObjects = array();
     $aAllObjects[] = array('UID' => 'char', 'LABEL' => 'char');
     $aAllDynaforms = array();
     $aAllDynaforms[] = array('UID' => 'char', 'LABEL' => 'char');
     $aAllInputs = array();
     $aAllInputs[] = array('UID' => 'char', 'LABEL' => 'char');
     $aAllOutputs = array();
     $aAllOutputs[] = array('UID' => 'char', 'LABEL' => 'char');
     $oCriteria = $this->getDynaformsCriteria($sProcessUID);
     $oCriteria->add(DynaformPeer::DYN_TYPE, 'XMLFORM');
     $oDataset = DynaformPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $oDataset->next();
     while ($aRow = $oDataset->getRow()) {
         $aRow['DYN_TITLE'] = isset($aRow['DYN_TITLE']) ? $aRow['DYN_TITLE'] : '';
         $aAllObjects[] = array('UID' => 'DYNAFORM|' . $aRow['DYN_UID'], 'LABEL' => $aRow['DYN_TITLE'] . ' (' . G::LoadTranslation('ID_DYNAFORM') . ')');
         $aAllDynaforms[] = array('UID' => $aRow['DYN_UID'], 'LABEL' => $aRow['DYN_TITLE']);
         $oDataset->next();
     }
     G::LoadClass('ArrayPeer');
     $oDataset = ArrayBasePeer::doSelectRS($this->getInputDocumentsCriteria($sProcessUID));
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $oDataset->next();
     while ($aRow = $oDataset->getRow()) {
         $aAllObjects[] = array('UID' => 'INPUT_DOCUMENT|' . $aRow['INP_DOC_UID'], 'LABEL' => $aRow['INP_DOC_TITLE'] . ' (' . G::LoadTranslation('ID_INPUT_DOCUMENT') . ')');
         $aAllInputs[] = array('UID' => $aRow['INP_DOC_UID'], 'LABEL' => $aRow['INP_DOC_TITLE']);
         $oDataset->next();
     }
     G::LoadClass('ArrayPeer');
     $oDataset = ArrayBasePeer::doSelectRS($this->getOutputDocumentsCriteria($sProcessUID));
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $oDataset->next();
     while ($aRow = $oDataset->getRow()) {
         $aAllObjects[] = array('UID' => 'OUTPUT_DOCUMENT|' . $aRow['OUT_DOC_UID'], 'LABEL' => $aRow['OUT_DOC_TITLE'] . ' (' . G::LoadTranslation('ID_OUTPUT_DOCUMENT') . ')');
         $aAllOutputs[] = array('UID' => $aRow['OUT_DOC_UID'], 'LABEL' => $aRow['OUT_DOC_TITLE']);
         $oDataset->next();
     }
     global $_DBArray;
     $_DBArray = isset($_SESSION['_DBArray']) ? $_SESSION['_DBArray'] : '';
     switch ($sAction) {
         case 'tasks':
//.........这里部分代码省略.........
开发者ID:nshong,项目名称:processmaker,代码行数:101,代码来源:class.processMap.php

示例14: updateCase


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

            if (!isset($Fields['APP_STATUS'])) {

                $Fields['APP_STATUS'] = $appFields['APP_STATUS'];

            }



            $oReportTables->updateTables($appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields);

            $addtionalTables->updateReportTables(

                    $appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields, $Fields['APP_STATUS']

            );



            //now update the priority in appdelegation table, using the defined variable in task

            if (trim($DEL_INDEX) != '' && trim($TAS_UID) != '') {

                //optimized code to avoid load task content row.

                $c = new Criteria();

                $c->clearSelectColumns();

                $c->addSelectColumn(TaskPeer::TAS_PRIORITY_VARIABLE);

                $c->add(TaskPeer::TAS_UID, $TAS_UID);

                $rs = TaskPeer::doSelectRS($c);

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

                $rs->next();

                $row = $rs->getRow();

                $VAR_PRI = substr($row['TAS_PRIORITY_VARIABLE'], 2);

                //end optimized code.



                $x = unserialize($Fields['APP_DATA']);

                if (isset($x[$VAR_PRI])) {

                    if (trim($x[$VAR_PRI]) != '') {

                        $oDel = new AppDelegation;

                        $array = array();

                        $array['APP_UID'] = $sAppUid;

                        $array['DEL_INDEX'] = $DEL_INDEX;

                        $array['TAS_UID'] = $TAS_UID;

                        $array['DEL_PRIORITY'] = (isset($x[$VAR_PRI]) ?

                                        ($x[$VAR_PRI] >= 1 && $x[$VAR_PRI] <= 5 ? $x[$VAR_PRI] : '3') : '3');
开发者ID:nhenderson,项目名称:processmaker,代码行数:67,代码来源:class.case.php

示例15: verifyDependecies

 public function verifyDependecies($TRI_UID)
 {
     require_once "classes/model/Event.php";
     require_once "classes/model/StepTrigger.php";
     $oResult = new stdClass();
     $oResult->dependencies = array();
     $oCriteria = new Criteria();
     $oCriteria->addSelectColumn(EventPeer::EVN_UID);
     $oCriteria->addSelectColumn(EventPeer::TRI_UID);
     $oCriteria->add(EventPeer::EVN_ACTION, '', Criteria::NOT_EQUAL);
     $oCriteria->add(EventPeer::TRI_UID, $TRI_UID);
     $oDataset = EventPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $aRows = array();
     while ($oDataset->next()) {
         array_push($aRows, $oDataset->getRow());
     }
     $oResult->dependencies['Events'] = array();
     if (count($aRows) == 0) {
         $oResult->code = 0;
     } else {
         $oResult->code = 1;
         foreach ($aRows as $row) {
             $oTrigger = TriggersPeer::retrieveByPK($row['TRI_UID']);
             array_push($oResult->dependencies['Events'], array('UID' => $oTrigger->getTriUid(), 'DESCRIPTION' => $oTrigger->getTriTitle()));
         }
     }
     //for tasks dependencies
     $oCriteria = new Criteria();
     $oCriteria->addSelectColumn(StepTriggerPeer::TAS_UID);
     $oCriteria->addSelectColumn(StepTriggerPeer::TRI_UID);
     $oCriteria->add(StepTriggerPeer::TRI_UID, $TRI_UID);
     $oDataset = StepTriggerPeer::doSelectRS($oCriteria);
     $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $aRows = array();
     while ($oDataset->next()) {
         array_push($aRows, $oDataset->getRow());
     }
     $oResult->dependencies['Tasks'] = array();
     if ($oResult->code == 0 && count($aRows) == 0) {
         $oResult->code = 0;
     } elseif (count($aRows) > 0) {
         $oResult->code = 1;
         foreach ($aRows as $row) {
             $oTask = TaskPeer::retrieveByPK($row['TAS_UID']);
             array_push($oResult->dependencies['Tasks'], array('UID' => $oTask->getTasUid(), 'DESCRIPTION' => $oTask->getTasTitle()));
         }
     }
     //Tasks, assignment rules dependencies
     $criteria = new Criteria();
     $criteria->addSelectColumn(TaskPeer::TAS_UID);
     $criteria->add(TaskPeer::TAS_SELFSERVICE_TIMEOUT, 1);
     $criteria->add(TaskPeer::TAS_SELFSERVICE_TRIGGER_UID, $TRI_UID);
     $rsCriteria = TaskPeer::doSelectRS($criteria);
     $rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $arrayRow = array();
     while ($rsCriteria->next()) {
         array_push($arrayRow, $rsCriteria->getRow());
     }
     $oResult->dependencies["Assignment rules"] = array();
     if ($oResult->code == 0 && count($arrayRow) == 0) {
         $oResult->code = 0;
     } else {
         if (count($arrayRow) > 0) {
             foreach ($arrayRow as $row) {
                 $task = TaskPeer::retrieveByPK($row["TAS_UID"]);
                 array_push($oResult->dependencies["Assignment rules"], array("UID" => $task->getTasUid(), "DESCRIPTION" => $task->getTasTitle()));
             }
             $oResult->code = 1;
         }
     }
     return $oResult;
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:73,代码来源:Triggers.php


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