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


PHP TaskPeer类代码示例

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


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

示例1: executeDelete

 public function executeDelete()
 {
     $task = TaskPeer::retrieveByUuid($this->getRequestParameter('task'));
     $this->forward404Unless($task);
     $task->delete();
     return $this->redirect($this->getRequest()->getReferer());
 }
开发者ID:sgrove,项目名称:cothinker,代码行数:7,代码来源:actions.class.php

示例2: executeUpdate

 public function executeUpdate()
 {
     $jira = new sfJiraPlugin($this->getUser()->getProfile()->getJiraLogin(), $this->getUser()->getProfile()->getJiraPassword());
     $aProjects = $jira->getProjects();
     foreach ($aProjects as $project) {
         #var_dump( $project );
         $c = new Criteria();
         $c->add(ProjectPeer::USER_ID, $this->getUser()->getProfile()->getId());
         $c->add(ProjectPeer::KEY, $project->key);
         $p = ProjectPeer::doSelectOne($c);
         $c = new Criteria();
         $c->add(UserPeer::JIRA_LOGIN, $project->lead);
         $u = UserPeer::doSelectOne($c);
         if (empty($p)) {
             $p = new Project();
             $p->setKey($project->key);
             $p->setLeadId(!empty($u) ? $u->getId() : null);
             $p->setUserId($this->getUser()->getProfile()->getId());
             $p->setName($project->name);
             $p->setUpdated(date('r'));
             $p->save();
         }
         $issues = $jira->getIssuesForProject($p->getKey());
         foreach ($issues as $issue) {
             #die($p->getKey());
             if ($issue->assignee == $this->getUser()->getProfile()->getJiraLogin()) {
                 $c = new Criteria();
                 $c->add(TaskPeer::KEY, $issue->key);
                 $t = TaskPeer::doSelectOne($c);
                 if (empty($t)) {
                     $c = new Criteria();
                     $c->add(UserPeer::JIRA_LOGIN, $issue->reporter);
                     $u = UserPeer::doSelectOne($c);
                     $t = new Task();
                     $t->setProjectId($p->getId());
                     $t->setTitle($issue->summary);
                     $t->setDescription($issue->description);
                     $t->setKey($issue->key);
                     $t->setUpdated(date('r'));
                     $t->setStatusId($issue->status);
                     $t->setPriorityId($issue->priority);
                     $t->setLeadId(!empty($u) ? $u->getId() : null);
                     $t->save();
                 }
             }
         }
     }
     $this->redirect('@homepage');
     return sfView::NONE;
 }
开发者ID:snoopckuu,项目名称:prmanagment,代码行数:50,代码来源:actions.class.php

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

示例4: doDerivation


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

            case 'PARALLEL-BY-EVALUATION':

                $this->case->closeAppThread( $currentDelegation['APP_UID'], $iAppThreadIndex );

                $iNewThreadIndex = $this->case->newAppThread( $currentDelegation['APP_UID'], $iNewDelIndex, $iAppThreadIndex );

                $this->case->updateAppDelegation( $currentDelegation['APP_UID'], $iNewDelIndex, $iNewThreadIndex );

                break;

            default:

                $this->case->updateAppThread( $currentDelegation['APP_UID'], $iAppThreadIndex, $iNewDelIndex );

                break;

        } //en switch



        //if there are subprocess to create

        if (isset( $aSP )) {

            //Create the new case in the sub-process

            // set the initial date to null the time its created

            $aNewCase = $this->case->startCase( $aSP['TAS_UID'], $aSP['USR_UID'], true, $appFields);



            $taskNextDel = TaskPeer::retrieveByPK($aSP["TAS_UID"]); //Sub-Process



            //Copy case variables to sub-process case

            $aFields = unserialize( $aSP['SP_VARIABLES_OUT'] );

            $aNewFields = array ();

            $aOldFields = $this->case->loadCase( $aNewCase['APPLICATION'] );



            foreach ($aFields as $sOriginField => $sTargetField) {

                $sOriginField = trim($sOriginField, " @#%?$=");

                $sTargetField = trim($sTargetField, " @#%?$=");



                $aNewFields[$sTargetField] = isset( $appFields['APP_DATA'][$sOriginField] ) ? $appFields['APP_DATA'][$sOriginField] : '';

            }



            $aOldFields['APP_DATA'] = array_merge( $aOldFields['APP_DATA'], $aNewFields );

            $aOldFields['APP_STATUS'] = 'TO_DO';

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

示例5: derivateCase


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

            if (isset( $derive['TAS_UID'] )) {

                $appFields['TAS_UID'] = $derive['TAS_UID'];

            }



            //Save data - Start

            //$appFields = $oCase->loadCase( $caseId );

            //$oCase->updateCase ( $caseId, $appFields );

            //Save data - End





            $row = array ();

            $oCriteria = new Criteria( 'workflow' );

            $del = DBAdapter::getStringDelimiter();

            $oCriteria->addSelectColumn( RoutePeer::ROU_TYPE );

            $oCriteria->addSelectColumn( RoutePeer::ROU_NEXT_TASK );

            $oCriteria->add( RoutePeer::TAS_UID, $appdel['TAS_UID'] );

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

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

            $oDataset->next();



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

                $row[] = array ('ROU_TYPE' => $aRow['ROU_TYPE'],'ROU_NEXT_TASK' => $aRow['ROU_NEXT_TASK']

                );

                $oDataset->next();

            }



            //derivate case

            $aCurrentDerivation = array ('APP_UID' => $caseId,'DEL_INDEX' => $delIndex,'APP_STATUS' => $sStatus,'TAS_UID' => $appdel['TAS_UID'],'ROU_TYPE' => $row[0]['ROU_TYPE']

            );



            $oDerivation->derivate( $aCurrentDerivation, $nextDelegations );

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

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

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

示例7: get

 /**
  * Implementation for 'GET' method for Rest API
  *
  * @param  mixed $tasUid 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 get($tasUid = null)
 {
     $result = array();
     try {
         $noArguments = true;
         $argumentList = func_get_args();
         foreach ($argumentList as $arg) {
             if (!is_null($arg)) {
                 $noArguments = false;
             }
         }
         if ($noArguments) {
             $criteria = new Criteria('workflow');
             $criteria->addSelectColumn(TaskPeer::PRO_UID);
             $criteria->addSelectColumn(TaskPeer::TAS_UID);
             $criteria->addSelectColumn(TaskPeer::TAS_TYPE);
             $criteria->addSelectColumn(TaskPeer::TAS_DURATION);
             $criteria->addSelectColumn(TaskPeer::TAS_DELAY_TYPE);
             $criteria->addSelectColumn(TaskPeer::TAS_TEMPORIZER);
             $criteria->addSelectColumn(TaskPeer::TAS_TYPE_DAY);
             $criteria->addSelectColumn(TaskPeer::TAS_TIMEUNIT);
             $criteria->addSelectColumn(TaskPeer::TAS_ALERT);
             $criteria->addSelectColumn(TaskPeer::TAS_PRIORITY_VARIABLE);
             $criteria->addSelectColumn(TaskPeer::TAS_ASSIGN_TYPE);
             $criteria->addSelectColumn(TaskPeer::TAS_ASSIGN_VARIABLE);
             $criteria->addSelectColumn(TaskPeer::TAS_GROUP_VARIABLE);
             $criteria->addSelectColumn(TaskPeer::TAS_MI_INSTANCE_VARIABLE);
             $criteria->addSelectColumn(TaskPeer::TAS_MI_COMPLETE_VARIABLE);
             $criteria->addSelectColumn(TaskPeer::TAS_ASSIGN_LOCATION);
             $criteria->addSelectColumn(TaskPeer::TAS_ASSIGN_LOCATION_ADHOC);
             $criteria->addSelectColumn(TaskPeer::TAS_TRANSFER_FLY);
             $criteria->addSelectColumn(TaskPeer::TAS_LAST_ASSIGNED);
             $criteria->addSelectColumn(TaskPeer::TAS_USER);
             $criteria->addSelectColumn(TaskPeer::TAS_CAN_UPLOAD);
             $criteria->addSelectColumn(TaskPeer::TAS_VIEW_UPLOAD);
             $criteria->addSelectColumn(TaskPeer::TAS_VIEW_ADDITIONAL_DOCUMENTATION);
             $criteria->addSelectColumn(TaskPeer::TAS_CAN_CANCEL);
             $criteria->addSelectColumn(TaskPeer::TAS_OWNER_APP);
             $criteria->addSelectColumn(TaskPeer::STG_UID);
             $criteria->addSelectColumn(TaskPeer::TAS_CAN_PAUSE);
             $criteria->addSelectColumn(TaskPeer::TAS_CAN_SEND_MESSAGE);
             $criteria->addSelectColumn(TaskPeer::TAS_CAN_DELETE_DOCS);
             $criteria->addSelectColumn(TaskPeer::TAS_SELF_SERVICE);
             $criteria->addSelectColumn(TaskPeer::TAS_START);
             $criteria->addSelectColumn(TaskPeer::TAS_TO_LAST_USER);
             $criteria->addSelectColumn(TaskPeer::TAS_SEND_LAST_EMAIL);
             $criteria->addSelectColumn(TaskPeer::TAS_DERIVATION);
             $criteria->addSelectColumn(TaskPeer::TAS_POSX);
             $criteria->addSelectColumn(TaskPeer::TAS_POSY);
             $criteria->addSelectColumn(TaskPeer::TAS_WIDTH);
             $criteria->addSelectColumn(TaskPeer::TAS_HEIGHT);
             $criteria->addSelectColumn(TaskPeer::TAS_COLOR);
             $criteria->addSelectColumn(TaskPeer::TAS_EVN_UID);
             $criteria->addSelectColumn(TaskPeer::TAS_BOUNDARY);
             $criteria->addSelectColumn(TaskPeer::TAS_DERIVATION_SCREEN_TPL);
             $dataset = AppEventPeer::doSelectRS($criteria);
             $dataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
             while ($dataset->next()) {
                 $result[] = $dataset->getRow();
             }
         } else {
             $record = TaskPeer::retrieveByPK($tasUid);
             if ($record) {
                 $result = $record->toArray(BasePeer::TYPE_FIELDNAME);
             } else {
                 $paramValues = "";
                 foreach ($argumentList as $arg) {
                     $paramValues .= strlen($paramValues) ? ', ' : '';
                     if (!is_null($arg)) {
                         $paramValues .= "{$arg}";
                     } else {
                         $paramValues .= "NULL";
                     }
                 }
                 throw new RestException(417, "table Task ({$paramValues})");
             }
         }
     } catch (RestException $e) {
         throw new RestException($e->getCode(), $e->getMessage());
     } catch (Exception $e) {
         throw new RestException(412, $e->getMessage());
     }
     return $result;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:92,代码来源:Task.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: function

 if (!in_array($filters['sort'], $columnsList)) {
     $filters['sort'] = '';
 }
 $filters['dir'] = G::toUpper($filters['dir']);
 if (!($filters['dir'] == 'DESC' || $filters['dir'] == 'ASC')) {
     $filters['dir'] = 'DESC';
 }
 $result = $list->loadList($userUid, $filters, function (array $record) {
     try {
         if (isset($record["DEL_PREVIOUS_USR_UID"])) {
             if ($record["DEL_PREVIOUS_USR_UID"] == "") {
                 $appDelegation = AppDelegationPeer::retrieveByPK($record["APP_UID"], $record["DEL_INDEX"]);
                 if (!is_null($appDelegation)) {
                     $appDelegationPrevious = AppDelegationPeer::retrieveByPK($record["APP_UID"], $appDelegation->getDelPrevious());
                     if (!is_null($appDelegationPrevious)) {
                         $taskPrevious = TaskPeer::retrieveByPK($appDelegationPrevious->getTasUid());
                         if (!is_null($taskPrevious)) {
                             switch ($taskPrevious->getTasType()) {
                                 case "SCRIPT-TASK":
                                     $record["DEL_PREVIOUS_USR_UID"] = $taskPrevious->getTasType();
                                     break;
                             }
                         }
                     }
                 }
             }
             $record["PREVIOUS_USR_UID"] = $record["DEL_PREVIOUS_USR_UID"];
             $record["PREVIOUS_USR_USERNAME"] = $record["DEL_PREVIOUS_USR_USERNAME"];
             $record["PREVIOUS_USR_FIRSTNAME"] = $record["DEL_PREVIOUS_USR_FIRSTNAME"];
             $record["PREVIOUS_USR_LASTNAME"] = $record["DEL_PREVIOUS_USR_LASTNAME"];
         }
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:proxyNewCasesList.php

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

示例11: deleteProcess

 public function deleteProcess($sProcessUID, $flagRemoveCases = true)
 {
     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();
         //Update PROCESS_FILES_CHECKED
         $configuration = \ConfigurationPeer::retrieveByPK("PROCESS_FILES_CHECKED", "", "", "", "");
         if (!is_null($configuration)) {
             $arrayProjectUid = unserialize($configuration->getCfgValue());
             unset($arrayProjectUid[$sProcessUID]);
             $conf = new \Configuration();
             $result = $conf->update(array("CFG_UID" => "PROCESS_FILES_CHECKED", "OBJ_UID" => "", "CFG_VALUE" => serialize($arrayProjectUid), "PRO_UID" => "", "USR_UID" => "", "APP_UID" => ""));
         }
         //Delete the applications of process
         if ($flagRemoveCases) {
             $case = new \Cases();
             $criteria = new \Criteria("workflow");
             $criteria->addSelectColumn(\ApplicationPeer::APP_UID);
             $criteria->add(\ApplicationPeer::PRO_UID, $sProcessUID, \Criteria::EQUAL);
             $rsCriteria = \ApplicationPeer::doSelectRS($criteria);
             $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
             while ($rsCriteria->next()) {
                 $row = $rsCriteria->getRow();
                 $result = $case->removeCase($row["APP_UID"]);
             }
         }
         //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']);
             $oTasks = new \Tasks();
             $oTasks->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');
         $oCriteria->add(\OutputDocumentPeer::PRO_UID, $sProcessUID);
         $oDataset = \OutputDocumentPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $oOutputDocument->remove($aRow['OUT_DOC_UID']);
             $oDataset->next();
         }
         //Delete the triggers of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(\TriggersPeer::PRO_UID, $sProcessUID);
         $oDataset = \TriggersPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $oTrigger->remove($aRow['TRI_UID']);
             $oDataset->next();
         }
         //Delete the routes of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(\RoutePeer::PRO_UID, $sProcessUID);
         $oDataset = \RoutePeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
//.........这里部分代码省略.........
开发者ID:emildev35,项目名称:processmaker,代码行数:101,代码来源:Workflow.php

示例12: while

 $oDataset = StagePeer::doSelectRS($oCriteria);
 $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
 $oDataset->next();
 while ($aRow1 = $oDataset->getRow()) {
     $oStage = new stdclass();
     $oStage->uid = $aRow1['STG_UID'];
     $oStage->label = strip_tags($aRow1['CON_VALUE']);
     $oStage->position = new stdclass();
     $oStage->position->x = (int) $aRow1['STG_POSX'];
     $oStage->position->y = (int) $aRow1['STG_POSY'];
     $oStage->derivation = new stdclass();
     $oStage->derivation->to = array();
     if (!$oData->mode) {
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(TaskPeer::STG_UID, $aRow1['STG_UID']);
         $oDataset1 = TaskPeer::doSelectRS($oCriteria);
         $oDataset1->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset1->next();
         $aTasks = array();
         while ($aRow2 = $oDataset1->getRow()) {
             $aTasks[] = $aRow2['TAS_UID'];
             $oDataset1->next();
         }
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(AppDelegationPeer::APP_UID, $_SESSION['APPLICATION']);
         $oCriteria->add(AppDelegationPeer::TAS_UID, $aTasks, Criteria::IN);
         $oCriteria->add($oCriteria->getNewCriterion(AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL)->addOr($oCriteria->getNewCriterion(AppDelegationPeer::DEL_FINISH_DATE, '')));
         if (AppDelegationPeer::doCount($oCriteria) > 0) {
             $oStage->color = '#FF0000';
         } else {
             $oCriteria = new Criteria('workflow');
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:tracker_Ajax.php

示例13: executeAjaxSetTaskStatus

 public function executeAjaxSetTaskStatus()
 {
     //[0]Complete|[1]In Progress|[2]Pending/Planning|(2,+Inf]Unknown task status code
     $task = TaskPeer::retrieveByUuid($this->getRequestParameter('task'));
     $this->forward404Unless($task, 'Task not found in action, unable to update status');
     $status = $this->getRequestParameter('task-status');
     $this->forward404Unless(is_numeric($status));
     if ($task->isAuthorized()) {
         $this->logMessage('Unauthorize to make changes to task');
         $task->setStatus($status);
         $task->save();
     } else {
         $this->logMessage('Unauthorize to make changes to task');
     }
     $this->task = $task;
     $this->projectUsers = $this->task->getProject()->getApprovedUsers();
 }
开发者ID:sgrove,项目名称:cothinker,代码行数:17,代码来源:actions.class.php

示例14: getSelfServiceTasks

    /**

     * get user's SelfService tasks

     * @param string $sUIDUser

     * @return $rows

     */

    public function getSelfServiceTasks($userUid = '')

    {

        $rows[] = array();

        $tasks  = array();



        //check self service tasks assigned directly to this user

        $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_ASSIGN_TYPE, 'SELF_SERVICE');

        $c->add(TaskPeer::TAS_GROUP_VARIABLE, '');

        $c->add(TaskUserPeer::USR_UID, $userUid);



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

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

        $rs->next();

        $row = $rs->getRow();



        while (is_array($row)) {

            $tasks[] = $row['TAS_UID'];

            $rs->next();

            $row = $rs->getRow();

        }



        //check groups assigned to SelfService task

        G::LoadClass('groups');

        $group = new Groups();

        $aGroups = $group->getActiveGroupsForAnUser($userUid);



        $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_ASSIGN_TYPE, 'SELF_SERVICE');

        $c->add(TaskPeer::TAS_GROUP_VARIABLE, '');

        $c->add(TaskUserPeer::USR_UID, $aGroups, Criteria::IN);



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

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

示例15: getSortedTasks

 public function getSortedTasks($sort_by, $dir = 'asc')
 {
     return TaskPeer::retrieveSortedByProjectId($this->getId(), $sort_by, $dir);
 }
开发者ID:sgrove,项目名称:cothinker,代码行数:4,代码来源:Project.php


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