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


PHP Task::load方法代码示例

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


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

示例1: load

 public function load($clusterName)
 {
     $result = $this->awsClient->listTasks(['cluster' => $clusterName, 'serviceName' => $this->serviceName, 'maxResults' => 99, 'nextToken' => '']);
     //get existing tasks
     foreach ($result['taskArns'] as $taskArn) {
         $task = new Task();
         $task->setArn($taskArn);
         if (!$task->init($this->creds)) {
             return false;
         }
         if (!$task->load($clusterName)) {
             return false;
         }
         $this->tasks[$taskArn] = $task;
     }
     //get task def
     $details = $this->awsClient->describeServices(['cluster' => $clusterName, 'services' => [$this->serviceName]]);
     $this->taskDefinition = $details['services'][0]['taskDefinition'];
     $this->taskDef = new TaskDef();
     $this->taskDef->init($this->creds);
     $this->taskDef->load($this->taskDefinition);
     //other service items
     $this->status = $details['services'][0]['status'];
     $this->minHealthyPercent = $details['services'][0]['deploymentConfiguration']['minimumHealthyPercent'];
     $this->maxPercent = $details['services'][0]['deploymentConfiguration']['maximumPercent'];
     $this->desiredTaskCount = $details['services'][0]['desiredCount'];
     $this->pendingTaskCount = $details['services'][0]['pendingCount'];
     $this->runningTaskCount = $details['services'][0]['runningCount'];
     return true;
 }
开发者ID:cablelabs,项目名称:aws-php,代码行数:30,代码来源:Service.php

示例2: updateParent

 private function updateParent()
 {
     $p_id = $this->parent_id;
     if (!empty($p_id)) {
         $parent = new Task();
         $parent->load($p_id);
         $parent->updateProperties();
     }
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:9,代码来源:Task.php

示例3: task

 public static function task($taskID = null)
 {
     if ($taskID == null) {
         return null;
     }
     $task = Task::load($taskID);
     $title = $task->getTitle();
     $projectID = $task->getProjectID();
     return array_merge(self::tasks($projectID), self::oneCrumb($title, Url::task($taskID)));
 }
开发者ID:malimu,项目名称:Pipeline,代码行数:10,代码来源:breadcrumbs.class.php

示例4: _new

 public function _new()
 {
     parent::_new();
     $costcharge = $this->_uses[$this->modeltype];
     if (!$costcharge->isLoaded()) {
         $costcharge->item_type = key($this->_templateobject->getEnumOptions('item_type'));
         $costcharge->source_type = key($this->_templateobject->getEnumOptions('source_type'));
     }
     if (isset($this->_data['project_id'])) {
         $costcharge->project_id = $this->_data['project_id'];
     }
     if (isset($this->_data['task_id'])) {
         $costcharge->task_id = $this->_data['task_id'];
         $task = new Task();
         $task->load($this->_data['task_id']);
         $costcharge->project_id = $task->project_id;
     }
     if (!is_null($costcharge->project_id) && is_null($costcharge->task_id)) {
         $this->view->set('tasks', $this->getTaskList($costcharge->project_id));
     }
     //		switch ($costcharge->item_type) {
     //			case 'PO':
     //				$account=new PLSupplier();
     //				$this->view->set('account_type', 'Supplier');
     //				break;
     //			case 'SI':
     //				$account=new SLCustomer();
     //				$this->view->set('account_type', 'Customer');
     //				break;
     //		}
     //		$this->view->set('accounts', $account->getAll());
     $sidebarlist['equipment_cost_charge'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new_cost_charge', 'project_id' => $costcharge->project_id, 'task_id' => $costcharge->task_id, 'source_type' => 'E'), 'tag' => 'Equipment Usage');
     $sidebarlist['resource_cost_charge'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new_cost_charge', 'project_id' => $costcharge->project_id, 'task_id' => $costcharge->task_id, 'source_type' => 'R'), 'tag' => 'Timesheets');
     $sidebarlist['expenses_cost_charge'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new_cost_charge', 'project_id' => $costcharge->project_id, 'task_id' => $costcharge->task_id, 'source_type' => 'X'), 'tag' => 'Expenses');
     $sidebarlist['material_cost_charge'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new_cost_charge', 'project_id' => $costcharge->project_id, 'task_id' => $costcharge->task_id, 'source_type' => 'M'), 'tag' => 'Purchase Order');
     $sidebar = new SidebarController($this->view);
     $sidebar->addList('Create Charge From', $sidebarlist);
     $sidebarlist = array();
     $sidebarlist['budget_cost_charge'] = array('link' => array('modules' => $this->_modules, 'controller' => $this->name, 'action' => 'new_cost_charge', 'project_id' => $costcharge->project_id, 'task_id' => $costcharge->task_id, 'source_type' => 'B'), 'tag' => 'Budget Cost');
     $sidebar->addList('Create Cost From', $sidebarlist);
     $this->view->register('sidebar', $sidebar);
     $this->view->set('sidebar', $sidebar);
 }
开发者ID:uzerpllp,项目名称:uzerp,代码行数:43,代码来源:ProjectcostchargesController.php

示例5: template

            $oProcessMap->exploreDirectory($oData->pro_uid, $oData->main_directory, $oData->directory);
            G::auditLog('ProcessFileManager','Upload template ('.$oData->main_directory.') in process "'.$resultProcess['PRO_TITLE'].'"');
            break;
        case 'deleteFile':
            $oProcessMap->deleteFile($oData->pro_uid, $oData->main_directory, $oData->directory, $oData->file);
            G::auditLog('ProcessFileManager','Delete template ('.$oData->main_directory.': '.$oData->file.') in process "'.$resultProcess['PRO_TITLE'].'"');
            break;
        case 'deleteDirectory':
            $oProcessMap->deleteDirectory($oData->pro_uid, $oData->main_directory, $oData->directory, $oData->dir_to_delete);
            break;
        case 'downloadFile':
            $oProcessMap->downloadFile($oData->pro_uid, $oData->main_directory, $oData->directory, $oData->file);
            break;
        case 'deleteSubProcess':
            $oTaskNewPattern = new Task();
            $taskInfo=$oTaskNewPattern->load($oData->tas_uid);
            $titleTask=$taskInfo['TAS_TITLE'];
            G::auditlog("DeleteSubProcess",'Delete Sub-Process -> '.$titleTask.' : '.$oData->tas_uid);
            $sOutput = $oProcessMap->deleteSubProcess($oData->pro_uid, $oData->tas_uid);
            break;
        case 'subProcess_Properties':
            $oProcessMap->subProcess_Properties($oData->pro_uid, $oData->tas_uid, $oData->index);
            break;
        case 'showDetailsPMDWL':
            G::LoadClass('processes');
            $oProcesses = new Processes();
            $oProcesses->ws_open_public();
            $aFields = get_object_vars($oProcesses->ws_processGetData($oData->pro_uid));

            $aFields['description'] = nl2br($aFields['description']);
            $aFields['installSteps'] = nl2br($aFields['installSteps']);
开发者ID:hpx2206,项目名称:processmaker-1,代码行数:31,代码来源:processes_Ajax.php

示例6: getUploadCssClass

	$('div.upload p.secondary a.preview').click(function(){
		$(this).parent().parent().find('a.thumb.preview').click();
		return false;
	});
});
</script>
<div id="flowplayer" style="overflow: hidden;"></div>
<div id="imageviewer" style="overflow: hidden;"></div>
<div id="flashviewer"></div>
<?php 
function getUploadCssClass($ext)
{
    $className = '';
    switch ($ext) {
        case 'jpg':
        case 'jpeg':
        case 'png':
        case 'gif':
            $className = 'image';
            break;
        case 'mp3':
            $className = 'audio';
            break;
        case 'fla':
        case 'swf':
        case 'flv':
            $className = 'flash';
            break;
        case 'mpeg':
        case 'mp4':
        case '3gp':
开发者ID:malimu,项目名称:Pipeline,代码行数:31,代码来源:newUploads.tpl.php

示例7: formatEvent

function formatEvent($event, $showProject = false)
{
    switch ($event->getEventTypeID()) {
        case 'create_user':
            $formatted = sprintf("%s registered for %s.", formatUserLink($event->getUser1ID()), '<a href="' . Url::base() . '">' . PIPELINE_NAME . '</a>');
            break;
        case 'send_message':
            $formatted = sprintf("%s sent a message to %s.", formatUserLink($event->getUser1ID()), formatUserLink($event->getUser2ID()));
            break;
        case 'accept_member_invitation':
            $predicate = $showProject ? 'the project ' . formatProjectLink($event->getProjectID()) : "this project";
            $formatted = sprintf("%s accepted %s's invitation to join %s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), formatUserLink($event->getUser2ID(), $event->getProjectID()), $predicate);
            break;
        case 'trust_member':
            $predicate = $showProject ? ' in the project ' . formatProjectLink($event->getProjectID()) : '';
            $formatted = sprintf("%s trusted %s%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), formatUserLink($event->getUser2ID(), $event->getProjectID()), $predicate);
            break;
        case 'untrust_member':
            $predicate = $showProject ? ' in the project ' . formatProjectLink($event->getProjectID()) : '';
            $formatted = sprintf("%s untrusted %s%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), formatUserLink($event->getUser2ID(), $event->getProjectID()), $predicate);
            break;
        case 'join_project':
            $predicate = $showProject ? ' ' . formatProjectLink($event->getProjectID()) : '';
            $formatted = sprintf("%s joined the project%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), $predicate);
            break;
        case 'leave_project':
            $predicate = $showProject ? ' ' . formatProjectLink($event->getProjectID()) : '';
            $formatted = sprintf("%s left the project%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), $predicate);
            break;
        case 'follow_project':
            $predicate = $showProject ? ' ' . formatProjectLink($event->getProjectID()) : '';
            $formatted = sprintf("%s followed the project%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), $predicate);
            break;
        case 'unfollow_project':
            $predicate = $showProject ? ' ' . formatProjectLink($event->getProjectID()) : '';
            $formatted = sprintf("%s unfollowed the project%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), $predicate);
            break;
        case 'ban_user':
            $predicate = $showProject ? ' from the project ' . formatProjectLink($event->getProjectID()) : '';
            $formatted = sprintf("%s banned %s%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), formatUserLink($event->getUser2ID(), $event->getProjectID()), $predicate);
            break;
        case 'unban_user':
            $predicate = $showProject ? ' from the project ' . formatProjectLink($event->getProjectID()) : '';
            $formatted = sprintf("%s unbanned %s%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), formatUserLink($event->getUser2ID(), $event->getProjectID()), $predicate);
            break;
        case 'create_project':
            $predicate = $showProject ? 'the project ' . formatProjectLink($event->getProjectID()) : 'this project';
            $formatted = sprintf("%s created %s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), formatProjectLink($event->getProjectID()));
            break;
        case 'edit_pitch':
            $predicate = $showProject ? ' for the project ' . formatProjectLink($event->getProjectID()) : '';
            $formatted = sprintf("%s edited the %s%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), '<a href="' . Url::pitch($event->getProjectID()) . '">pitch</a>', $predicate);
            break;
        case 'edit_specs':
            $predicate = $showProject ? ' for the project ' . formatProjectLink($event->getProjectID()) : '';
            $formatted = sprintf("%s edited the %s%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), '<a href="' . Url::specs($event->getProjectID()) . '">specs</a>', $predicate);
            break;
        case 'edit_rules':
            $predicate = $showProject ? ' for the project ' . formatProjectLink($event->getProjectID()) : '';
            $formatted = sprintf("%s edited the %s%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), '<a href="' . Url::rules($event->getProjectID()) . '">rules</a>', $predicate);
            break;
        case 'edit_project_status':
            $predicate = $showProject ? 'the project ' . formatProjectLink($event->getProjectID()) : 'this project';
            $status = $event->getData2();
            $formatted = sprintf("%s changed the %s of %s to &ldquo;%s.&rdquo;", formatUserLink($event->getUser1ID(), $event->getProjectID()), '<a href="' . Url::status($event->getProjectID()) . '">status</a>', $predicate, formatProjectStatus($status));
            break;
        case 'edit_project_deadline':
            $deadline = $event->getData2();
            if ($deadline != null) {
                $predicate = $showProject ? 'the project ' . formatProjectLink($event->getProjectID()) : 'this project';
                $formatted = sprintf("%s changed the %s of %s to %s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), '<a href="' . Url::deadline($event->getProjectID()) . '">deadline</a>', $predicate, strftime("%a, %b %d, %Y", strtotime($deadline)));
            } else {
                $predicate = $showProject ? 'the project ' . formatProjectLink($event->getProjectID()) : 'this project';
                $formatted = sprintf("%s removed the %s for %s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), '<a href="' . Url::deadline($event->getProjectID()) . '">deadline</a>', $predicate);
            }
            break;
        case 'create_discussion':
            $predicate = $showProject ? ' in the project ' . formatProjectLink($event->getProjectID()) : '';
            $discussion = Discussion::load($event->getItem1ID());
            $title = $discussion->getTitle();
            $url = Url::discussion($discussion->getID());
            $formatted = sprintf("%s posted the discussion %s%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), '<a href="' . $url . '">' . $title . '</a>', $predicate);
            break;
        case 'lock_discussion':
            $predicate = $showProject ? ' in the project ' . formatProjectLink($event->getProjectID()) : '';
            $discussion = Discussion::load($event->getItem1ID());
            $title = $discussion->getTitle();
            $url = Url::discussion($discussion->getID());
            $formatted = sprintf("%s locked the discussion %s%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), '<a href="' . $url . '">' . $title . '</a>', $predicate);
            break;
        case 'unlock_discussion':
            $predicate = $showProject ? ' in the project ' . formatProjectLink($event->getProjectID()) : '';
            $discussion = Discussion::load($event->getItem1ID());
            $title = $discussion->getTitle();
            $url = Url::discussion($discussion->getID());
            $formatted = sprintf("%s unlocked the discussion %s%s.", formatUserLink($event->getUser1ID(), $event->getProjectID()), '<a href="' . $url . '">' . $title . '</a>', $predicate);
            break;
        case 'create_discussion_reply':
            $predicate = $showProject ? ' in the project ' . formatProjectLink($event->getProjectID()) : '';
            $discussion = Discussion::load($event->getItem2ID());
//.........这里部分代码省略.........
开发者ID:malimu,项目名称:Pipeline,代码行数:101,代码来源:formatEvents.php

示例8: Task

         $aFields['ROU_CASE'] = $iKey;
         $aFields['ROU_TYPE'] = $aData['ROU_TYPE'];
         $aFields['ROU_CONDITION'] = $aRow['ROU_CONDITION'];
         if (isset($aRow['ROU_OPTIONAL']) && trim($aRow['ROU_OPTIONAL']) != '' && ($aRow['ROU_OPTIONAL'] === 'TRUE' || $aRow['ROU_OPTIONAL'] === 'FALSE')) {
             $aFields['ROU_OPTIONAL'] = $aRow['ROU_OPTIONAL'];
         }
         $rou_id = $oRoute->create($aFields);
         if ($aRow['ROU_NEXT_TASK'] == '-1') {
             if ($aRow['ROU_CONDITION'] == '') {
                 $tasksAffected .= 'From -> ' . $titleTask . ' : ' . $aData['TASK'] . ' To End Of Process  Condition -> Empty; ';
             } else {
                 $tasksAffected .= 'From -> ' . $titleTask . ' : ' . $aData['TASK'] . ' To End Of Process Condition -> ' . $aFields['ROU_CONDITION'] . ' ; ';
             }
         } else {
             $oTaskSaveNextPattern = new Task();
             $taskNextInfo = $oTaskSaveNextPattern->load($aRow['ROU_NEXT_TASK']);
             $titleNextTask = $taskNextInfo['TAS_TITLE'];
             if ($aRow['ROU_CONDITION'] == '') {
                 $tasksAffected .= 'From -> ' . $titleTask . ' : ' . $aData['TASK'] . ' To -> ' . $titleNextTask . ' : ' . $aRow['ROU_NEXT_TASK'] . ' Condition -> Empty ; ';
             } else {
                 $tasksAffected .= 'From -> ' . $titleTask . ' : ' . $aData['TASK'] . ' To -> ' . $titleNextTask . ' : ' . $aRow['ROU_NEXT_TASK'] . ' Condition -> ' . $aFields['ROU_CONDITION'] . ' ; ';
             }
         }
         unset($aFields);
     }
     $oProcessNewPattern = new Process();
     $processInfo = $oProcessNewPattern->load($aData['PROCESS']);
     $titleProcess = $processInfo['PRO_TITLE'];
     G::auditLog("DerivationRule", 'PROCESS NAME : ' . $titleProcess . ' : ' . $aData['PROCESS'] . ' Change Routing Rule From : ' . $aData['ROU_TYPE'] . ' Details : ROU_TYPE_OLD -> ' . $aData['ROU_TYPE_OLD'] . ' ROU_TYPE ->' . $aData['ROU_TYPE'] . ' ' . $tasksAffected);
     break;
 case 'DISCRIMINATOR':
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:patterns_Ajax.php

示例9: getDerivatedCases

    function getDerivatedCases ($sParentUid, $sDelIndexParent)

    {

        $oCriteria = new Criteria( 'workflow' );

        $cases = array ();

        $derivation = array ();

        //get the child delegations , of parent delIndex

        $children = array ();

        $oCriteria->clearSelectColumns();

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

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

        $oCriteria->add( AppDelegationPeer::DEL_PREVIOUS, $sDelIndexParent );

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

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

        $oDataset->next();

        $aRow = $oDataset->getRow();

        while (is_array( $aRow )) {

            $children[] = $aRow['DEL_INDEX'];



            $oDataset->next();

            $aRow = $oDataset->getRow();

        }



        //foreach child , get the info of their derivations and subprocesses

        foreach ($children as $keyChild => $child) {

            $oCriteria = new Criteria( 'workflow' );

            $oCriteria->clearSelectColumns();

            $oCriteria->addSelectColumn( SubApplicationPeer::APP_UID );

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

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

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

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

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

            $oCriteria->addSelectColumn( UsersPeer::USR_USERNAME );

            $oCriteria->addSelectColumn( UsersPeer::USR_FIRSTNAME );

            $oCriteria->addSelectColumn( UsersPeer::USR_LASTNAME );



            $oCriteria->add( SubApplicationPeer::APP_PARENT, $sParentUid );

            $oCriteria->add( SubApplicationPeer::DEL_INDEX_PARENT, $child );

            $oCriteria->addJoin( SubApplicationPeer::APP_UID, AppDelegationPeer::APP_UID );

            $oCriteria->addJoin( AppDelegationPeer::USR_UID, UsersPeer::USR_UID );

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

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

            $oDataset->next();

            $aRow = $oDataset->getRow();

            while (is_array( $aRow )) {

                $oProcess = new Process();

                $proFields = $oProcess->load( $aRow['PRO_UID'] );

                $oCase = new Application();

                $appFields = $oCase->load( $aRow['APP_UID'] );

                $oTask = new Task();

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

示例10: Task

global $G_FORM;
$sPRO_UID = $oData->PRO_UID;
$sTASKS = $oData->TASKS;
$sDYNAFORM = $oData->DYNAFORM;
$sWE_TYPE = $oData->WE_TYPE;
$sWS_USER = $oData->WS_USER;
$sWS_PASS = $oData->WS_PASS;
$sWS_ROUNDROBIN = $oData->WS_ROUNDROBIN;
$sWE_USR = $oData->WE_USR;
$withWS = $sWE_TYPE == 'WS';
G::LoadClass("system");
try {
    $pathProcess = PATH_DATA_SITE . 'public' . PATH_SEP . $sPRO_UID . PATH_SEP;
    G::mk_dir($pathProcess, 0777);
    $oTask = new Task();
    $TaskFields = $oTask->load($sTASKS);
    $WE_EVN_UID = $oTask->getStartingEvent($sTASKS);
    if ($TaskFields['TAS_ASSIGN_TYPE'] != 'BALANCED') {
        throw new Exception("The task '" . $TaskFields['TAS_TITLE'] . "' doesn't have a valid assignment type. The task needs to have a 'Cyclical Assignment'.");
    }
    G::LoadClass('tasks');
    $oTask = new Tasks();
    $user = $oTask->assignUsertoTask($sTASKS);
    if ($user == 0) {
        throw new Exception(G::LoadTranslation('ID_TASK') . "'" . $TaskFields['TAS_TITLE'] . "'" . G::LoadTranslation('ID_NOT_HAVE_USERS'));
    }
    $http = G::is_https() ? "https://" : "http://";
    $sContent = '';
    $infoProcess = new Process();
    $resultProcess = $infoProcess->load($sPRO_UID);
    if ($withWS) {
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:processes_webEntryGenerate.php

示例11: getTaskDescription

    public function getTaskDescription ()
    {
        $c = new Criteria( 'workflow' );
        $c->clearSelectColumns();
        $c->addSelectColumn( TaskPeer::TAS_UID );

        $oDataset = TaskPeer::doSelectRS( $c );
        $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
        $oDataset->next();
        $aRows = Array ();
        while ($aRow = $oDataset->getRow()) {
            $aRows[] = $aRow;
            $oDataset->next();
        }
        foreach ($aRows as $k => $aRow) {

            $oTask = new Task();
            $aTaskRow = $oTask->load( $aRow['TAS_UID'] );

            $aRows[$k] = array_merge( $aRow, array ('TAS_TITLE' => $aTaskRow['TAS_TITLE']
            ), array ('PRO_UID' => $aTaskRow['PRO_UID']
            ) );
        }
        return $aRows;
    }
开发者ID:rrsc,项目名称:processmaker,代码行数:25,代码来源:CaseScheduler.php

示例12: while

    $cProcess->addAscendingOrderByColumn(AppCacheViewPeer::APP_PRO_TITLE);
    $oDataset = AppCacheViewPeer::doSelectRS($cProcess);
    $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
    $oDataset->next();
    while ($aRow = $oDataset->getRow()) {
        $processes[] = array($aRow['PRO_UID'], $aRow['APP_PRO_TITLE']);
        $oDataset->next();
    }
    return print G::json_encode($processes);
}
if ($actionAjax == "getUsersToReassign") {
    $_SESSION['TASK'] = $_REQUEST['TAS_UID'];
    $case = new Cases();
    G::LoadClass('tasks');
    $task = new Task();
    $tasks = $task->load($_SESSION['TASK']);
    $result->data = $case->getUsersToReassign($_SESSION['TASK'], $_SESSION['USER_LOGGED'], $tasks['PRO_UID']);
    print G::json_encode($result);
}
if ($actionAjax == 'reassignCase') {
    $APP_UID = $_REQUEST["APP_UID"];
    $DEL_INDEX = $_REQUEST["DEL_INDEX"];
    $_SESSION['APPLICATION'] = $APP_UID;
    $_SESSION['INDEX'] = $DEL_INDEX;
    $cases = new Cases();
    $user = new Users();
    $app = new Application();
    $TO_USR_UID = $_POST['USR_UID'];
    try {
        $cases->reassignCase($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], $TO_USR_UID);
        $caseData = $app->load($_SESSION['APPLICATION']);
开发者ID:bqevin,项目名称:processmaker,代码行数:31,代码来源:casesList_Ajax.php

示例13: getProperties

 /**
  * Get process and task properties
  *
  * @param object $httpData{type, UID}
  */
 public function getProperties($httpData)
 {
     switch ($httpData->type) {
         case 'process':
             require_once 'classes/model/ProcessCategory.php';
             require_once 'classes/model/CalendarDefinition.php';
             G::LoadClass('processMap');
             $oProcessMap = new processMap(new DBConnection());
             $process = $oProcessMap->editProcessNew($httpData->UID);
             $category = ProcessCategoryPeer::retrieveByPk($process['PRO_CATEGORY']);
             $categoryName = is_object($category) ? $category->getCategoryName() : '';
             $calendar = CalendarDefinitionPeer::retrieveByPk($process['PRO_CALENDAR']);
             $calendarName = is_object($calendar) ? $calendar->getCalendarName() : '';
             $properties['Title'] = $process['PRO_TITLE'];
             $properties['Description'] = $process['PRO_DESCRIPTION'];
             $properties['Calendar'] = $calendarName;
             $properties['Category'] = $categoryName;
             $properties['Debug'] = $process['PRO_DEBUG'] == '1' ? true : false;
             $this->sucess = true;
             $this->prop = $properties;
             break;
         case 'task':
             require_once 'classes/model/Task.php';
             $task = new Task();
             $taskData = $task->load($httpData->UID);
             $properties['Title'] = $taskData['TAS_TITLE'];
             $properties['Description'] = $taskData['TAS_DESCRIPTION'];
             $properties['Variable for case priority'] = $taskData['TAS_PRIORITY_VARIABLE'];
             $properties['Starting Task'] = $taskData['TAS_START'] == 'TRUE' ? true : false;
             $this->sucess = true;
             $this->prop = $properties;
             break;
     }
 }
开发者ID:bqevin,项目名称:processmaker,代码行数:39,代码来源:processProxy.php

示例14: getAvailableTriggers

    /**
     * Get available Triggers of a Step
     *
     * @param string $stepUid Unique id of Step
     * @param string $type    Type (BEFORE, AFTER, BEFORE_ASSIGNMENT, BEFORE_ROUTING, AFTER_ROUTING)
     * @param string $taskUid Unique id of Task
     *
     * return array Return an array with the Triggers available of a Step
     */
    public function getAvailableTriggers($stepUid, $type, $taskUid = "")
    {
        try {
            $arrayAvailableTrigger = array();

            //Verify data
            if ($stepUid != "") {
                $this->throwExceptionIfNotExistsStep($stepUid);
            }

            if ($stepUid == "") {
                $this->throwExceptionIfNotExistsTask($taskUid);
            }

            //Get data
            $trigger = new \ProcessMaker\BusinessModel\Trigger();

            $flagStepAssignTask = 0;

            if ($stepUid != "") {
                //Load Step
                $step = new \Step();

                $arrayStepData = $step->load($stepUid);

                $processUid = $arrayStepData["PRO_UID"];
            } else {
                //Load Task
                $task = new \Task();

                $arrayTaskData = $task->load($taskUid);

                $processUid = $arrayTaskData["PRO_UID"];

                //Set variables
                $flagStepAssignTask = 1;

                switch ($type) {
                    case "BEFORE_ASSIGNMENT":
                        $stepUid = "-1";
                        $type = "BEFORE";
                        break;
                    case "BEFORE_ROUTING":
                        $stepUid = "-2";
                        $type = "BEFORE";
                        break;
                    case "AFTER_ROUTING":
                        $stepUid = "-2";
                        $type = "AFTER";
                        break;
                }
            }

            //Get data
            //Get Uids
            $arrayUid = array();

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

            $criteria->addSelectColumn(\StepTriggerPeer::TRI_UID);
            $criteria->add(\StepTriggerPeer::STEP_UID, $stepUid, \Criteria::EQUAL);

            if ($flagStepAssignTask == 1) {
                $criteria->add(\StepTriggerPeer::TAS_UID, $taskUid, \Criteria::EQUAL);
            }

            $criteria->add(\StepTriggerPeer::ST_TYPE, $type, \Criteria::EQUAL);

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

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

                $arrayUid[] = $row["TRI_UID"];
            }

            //Criteria
            $criteria = $trigger->getTriggerCriteria();

            $criteria->add(\TriggersPeer::TRI_UID, $arrayUid, \Criteria::NOT_IN);
            $criteria->add(\TriggersPeer::PRO_UID, $processUid, \Criteria::EQUAL);
            $criteria->addAscendingOrderByColumn("TRI_TITLE");

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

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

                $arrayAvailableTrigger[] = array(
//.........这里部分代码省略.........
开发者ID:rrsc,项目名称:processmaker,代码行数:101,代码来源:Step.php

示例15: Task

<?php

try {
    require_once "classes/model/Task.php";
    require_once "classes/model/Users.php";
    G::LoadClass('case');
    G::LoadClass('derivation');
    $oTask = new Task();
    $TaskFields = $oTask->load($_POST['TASKS']);
    $aDerivation['NEXT_TASK'] = $TaskFields;
    $oDerivation = new Derivation();
    $deriva = $oDerivation->getNextAssignedUser($aDerivation);
    $oCase = new Cases();
    $aData = $oCase->startCase($_POST['TASKS'], $deriva['USR_UID']);
    $case = $oCase->loadCase($aData['APPLICATION'], 1);
    $Fields = array();
    $Fields['APP_NUMBER'] = $case['APP_NUMBER'];
    $Fields['APP_PROC_STATUS'] = 'draft';
    $Fields['APP_DATA'] = $_POST['form'];
    $Fields['DEL_INDEX'] = 1;
    $Fields['TAS_UID'] = $_POST['TASKS'];
    //$Fields = $oCase->loadCase($aData['APPLICATION'], 1);
    $oCase->updateCase($aData['APPLICATION'], $Fields);
    $s = 0;
    if (isset($_SERVER['HTTP_REFERER'])) {
        $dir = explode('?', $_SERVER['HTTP_REFERER']);
        if ($dir[1] == '__flag__=1') {
            $s = 1;
        } else {
            $dire = explode('&', $dir[1]);
            for ($i = 0; $i <= count($dire); $i++) {
开发者ID:nshong,项目名称:processmaker,代码行数:31,代码来源:cases_StartExternal.php


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