• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP TaskPeer类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: getSelfServiceCasesByEvaluate

 public function getSelfServiceCasesByEvaluate($userUid)
 {
     $cases = array();
     //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->addSelectColumn(TaskPeer::TAS_GROUP_VARIABLE);
     $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, '', Criteria::NOT_EQUAL);
     $rs = TaskPeer::doSelectRS($c);
     $rs->setFetchmode(ResultSet::FETCHMODE_ASSOC);
     $rs->next();
     if ($rs->getRecordCount() > 0) {
         if (!class_exists('Cases')) {
             G::loadClass('case');
         }
         $caseInstance = new Cases();
         while ($row = $rs->getRow()) {
             $tasGroupVariable = str_replace(array('@', '#'), '', $row['TAS_GROUP_VARIABLE']);
             $c2 = new Criteria();
             $c2->clearSelectColumns();
             $c2->addSelectColumn(AppDelegationPeer::APP_UID);
             $c2->add(AppDelegationPeer::TAS_UID, $row['TAS_UID']);
             $c2->add(AppDelegationPeer::USR_UID, '');
             $c2->add(AppDelegationPeer::DEL_THREAD_STATUS, 'OPEN');
             $rs2 = AppDelegationPeer::doSelectRS($c2);
             $rs2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
             $rs2->next();
             while ($row2 = $rs2->getRow()) {
                 $caseData = $caseInstance->LoadCase($row2['APP_UID']);
                 if (isset($caseData['APP_DATA'][$tasGroupVariable])) {
                     if (trim($caseData['APP_DATA'][$tasGroupVariable]) != '') {
                         if (in_array(trim($caseData['APP_DATA'][$tasGroupVariable]), $aGroups)) {
                             $cases[] = $row2['APP_UID'];
                         }
                     }
                 }
                 $rs2->next();
             }
             $rs->next();
         }
     }
     return $cases;
 }
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:52,代码来源:AppCacheView.php


示例17: assignUsersTask

 public function assignUsersTask($param)
 {
     try {
         require_once 'classes/model/TaskUser.php';
         require_once 'classes/model/Task.php';
         $oTaskUser = new TaskUser();
         $UIDS = explode(',', $param['UIDS']);
         $TU_TYPE = 1;
         foreach ($UIDS as $UID) {
             if ($_POST['TU_RELATION'] == 1) {
                 $oTaskUser->create(array('TAS_UID' => $param['TAS_UID'], 'USR_UID' => $UID, 'TU_TYPE' => $TU_TYPE, 'TU_RELATION' => 1));
             } else {
                 $oTaskUser->create(array('TAS_UID' => $param['TAS_UID'], 'USR_UID' => $UID, 'TU_TYPE' => $TU_TYPE, 'TU_RELATION' => 2));
             }
         }
         $task = TaskPeer::retrieveByPk($param['TAS_UID']);
         $result->success = true;
         if (count($UIDS) > 1) {
             $result->msg = __('ID_ACTORS_ASSIGNED_SUCESSFULLY', SYS_LANG, array(count($UIDS), $task->getTasTitle()));
         } else {
             $result->msg = __('ID_ACTOR_ASSIGNED_SUCESSFULLY', SYS_LANG, array('tas_title' => $task->getTasTitle()));
         }
     } catch (Exception $e) {
         $result->success = false;
         $result->msg = $e->getMessage();
     }
     print G::json_encode($result);
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:28,代码来源:ajaxListener.php


示例18: prepareInformation

 /**
  * Configuration functions
  *
  * @param string $UsrUid
  * @param string $ProUid
  * @param string $TasUid
  * @return void
  */
 public function prepareInformation($UsrUid = null, $ProUid = null, $TasUid = null)
 {
     // setup calendarDays according the task
     if (isset($TasUid)) {
         $task = TaskPeer::retrieveByPK($TasUid);
         if (!is_null($task)) {
             $this->calendarDays = $task->getTasTypeDay() == 2;
         }
     }
     //get an array with all holidays.
     $aoHolidays = HolidayPeer::doSelect(new Criteria());
     $holidays = array();
     foreach ($aoHolidays as $holiday) {
         $holidays[] = strtotime($holiday->getHldDate());
     }
     // by default the weekdays are from monday to friday
     $this->weekends = array(0, 6);
     $this->holidays = $holidays;
     return;
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:28,代码来源:class.dates.php


示例19: retrieveByPKs

 /**
  * Retrieve multiple objects by pkey.
  *
  * @param      array $pks List of primary keys
  * @param      Connection $con the connection to use
  * @throws     PropelException Any exceptions caught during processing will be
  *       rethrown wrapped into a PropelException.
  */
 public static function retrieveByPKs($pks, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria();
         $criteria->add(TaskPeer::TAS_UID, $pks, Criteria::IN);
         $objs = TaskPeer::doSelect($criteria, $con);
     }
     return $objs;
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:23,代码来源:BaseTaskPeer.php


示例20: updateCase

 public function updateCase($sAppUid, $Fields = array())
 {
     try {
         $aApplicationFields = $Fields['APP_DATA'];
         $Fields['APP_UID'] = $sAppUid;
         $Fields['APP_UPDATE_DATE'] = 'now';
         $Fields['APP_DATA'] = serialize($Fields['APP_DATA']);
         /*
         $oApp = new Application;
         $appFields = $oApp->load($sAppUid);
         */
         $oApp = ApplicationPeer::retrieveByPk($sAppUid);
         $appFields = $oApp->toArray(BasePeer::TYPE_FIELDNAME);
         if (isset($Fields['APP_TITLE'])) {
             $appFields['APP_TITLE'] = $Fields['APP_TITLE'];
         }
         if (isset($Fields['APP_DESCRIPTION'])) {
             $appFields['APP_DESCRIPTION'] = $Fields['APP_DESCRIPTION'];
         }
         $newValues = $this->newRefreshCaseTitleAndDescription($sAppUid, $appFields, $aApplicationFields);
         //Start: Save History --By JHL
         if (isset($Fields['CURRENT_DYNAFORM'])) {
             //only when that variable is set.. from Save
             $FieldsBefore = $this->loadCase($sAppUid);
             $FieldsDifference = $this->arrayRecursiveDiff($FieldsBefore['APP_DATA'], $aApplicationFields);
             $fieldsOnBoth = array_intersect_assoc($FieldsBefore['APP_DATA'], $aApplicationFields);
             //Add fields that weren't in previous version
             foreach ($aApplicationFields as $key => $value) {
                 if (!isset($fieldsOnBoth[$key])) {
                     $FieldsDifference[$key] = $value;
                 }
             }
             if (is_array($FieldsDifference) && count($FieldsDifference) > 0) {
                 //There are changes
                 $appHistory = new AppHistory();
                 $aFieldsHistory = $Fields;
                 $aFieldsHistory['APP_DATA'] = serialize($FieldsDifference);
                 $appHistory->insertHistory($aFieldsHistory);
             }
         }
         //End Save History
         //we are removing the app_title and app_description from this array,
         //because they already be updated in  newRefreshCaseTitleAndDescription function
         if (isset($Fields['APP_TITLE'])) {
             unset($Fields['APP_TITLE']);
         }
         if (isset($Fields['APP_DESCRIPTION'])) {
             unset($Fields['APP_DESCRIPTION']);
         }
         $oApp->update($Fields);
         $DEL_INDEX = isset($Fields['DEL_INDEX']) ? $Fields['DEL_INDEX'] : '';
         $TAS_UID = isset($Fields['TAS_UID']) ? $Fields['TAS_UID'] : '';
         G::LoadClass('reportTables');
         require_once 'classes/model/AdditionalTables.php';
         $oReportTables = new ReportTables();
         $addtionalTables = new additionalTables();
         $oReportTables->updateTables($appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields);
         $addtionalTables->updateReportTables($appFields['PRO_UID'], $sAppUid, $Fields['APP_NUMBER'], $aApplicationFields);
         //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);
 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP TaskPermission类代码示例发布时间:2022-05-23
下一篇:
PHP Task类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap