本文整理匯總了PHP中Tasks::getRouteByType方法的典型用法代碼示例。如果您正苦於以下問題:PHP Tasks::getRouteByType方法的具體用法?PHP Tasks::getRouteByType怎麽用?PHP Tasks::getRouteByType使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Tasks
的用法示例。
在下文中一共展示了Tasks::getRouteByType方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: unset
$rou_id = $oRoute->create($aFields);
unset($aFields);
}
break;
case 'DISCRIMINATOR':
//Girish ->Added to save changes, while editing the route
foreach ($aData['TASK'] as $iKey => $aRow) {
$aFields['PRO_UID'] = $aData['PROCESS'];
$aFields['TAS_UID'] = $aRow;
$aFields['ROU_NEXT_TASK'] = $aData['ROU_NEXT_TASK'][0];
$aFields['ROU_CASE'] = $iKey;
$aFields['ROU_TYPE'] = $aData['ROU_TYPE'];
$aFields['GAT_UID'] = $aData['GAT_UID'];
if (isset($aData['PORT_NUMBER_IP'])) {
$aFields['ROU_TO_PORT'] = $aData['PORT_NUMBER_IP'];
}
if (isset($aData['PORT_NUMBER_OP'])) {
$aFields['ROU_FROM_PORT'] = $aData['PORT_NUMBER_OP'];
}
$routeData = $oTasks->getRouteByType($aData['PROCESS'], $aData['ROU_NEXT_TASK'][0], $aData['ROU_TYPE']);
foreach ($routeData as $route) {
$sFields['ROU_UID'] = $route['ROU_UID'];
$rou_id = $oRoute->update($sFields);
}
$rou_id = $oRoute->create($aFields);
unset($aFields);
}
break;
}
echo $rou_id;
}
示例2: currentPattern
public function currentPattern($sProcessUID, $sTaskUID)
{
try {
$oProcess = new Process();
$aFields = $oProcess->load($sProcessUID);
$oTask = new Task();
$aFields = $oTask->load($sTaskUID);
$aFields = array();
$oCriteria = new Criteria('workflow');
$oCriteria->add(RoutePeer::PRO_UID, $sProcessUID);
$oCriteria->add(RoutePeer::TAS_UID, $sTaskUID);
$oCriteria->addAscendingOrderByColumn(RoutePeer::ROU_CASE);
$oDataset = RoutePeer::doSelectRS($oCriteria);
$oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$oDataset->next();
$aRow = $oDataset->getRow();
$params = array();
// $sql = BasePeer::createSelectSql($oCriteria, $params);
// echo $sProcessUID."-".$sTaskUID."-";
// echo $sql;
// var_dump($aRow);
// die();
if (is_array($aRow)) {
$aFields['ROU_TYPE'] = $aRow['ROU_TYPE'];
$aFields['ROU_TYPE_OLD'] = $aRow['ROU_TYPE'];
switch ($aRow['ROU_TYPE']) {
case 'SEQUENTIAL':
case 'SEC-JOIN':
$aFields['ROU_UID'] = $aRow['ROU_UID'];
$aFields['ROU_NEXT_TASK'] = $aRow['ROU_NEXT_TASK'];
$aFields['ROU_TO_LAST_USER'] = $aRow['ROU_TO_LAST_USER'];
if ($aRow['ROU_TYPE'] == 'SEQUENTIAL') {
$sXmlform = 'patterns_Sequential';
} else {
$sXmlform = 'patterns_ParallelJoin';
}
break;
case 'SELECT':
$aFields['GRID_SELECT_TYPE']['ROU_UID'][$aRow['ROU_CASE']] = $aRow['ROU_UID'];
$aFields['GRID_SELECT_TYPE']['ROU_NEXT_TASK'][$aRow['ROU_CASE']] = $aRow['ROU_NEXT_TASK'];
$aFields['GRID_SELECT_TYPE']['ROU_CONDITION'][$aRow['ROU_CASE']] = $aRow['ROU_CONDITION'];
$aFields['GRID_SELECT_TYPE']['ROU_TO_LAST_USER'][$aRow['ROU_CASE']] = $aRow['ROU_TO_LAST_USER'];
while ($aRow = $oDataset->getRow()) {
$aFields['GRID_SELECT_TYPE']['ROU_UID'][$aRow['ROU_CASE']] = $aRow['ROU_UID'];
$aFields['GRID_SELECT_TYPE']['ROU_NEXT_TASK'][$aRow['ROU_CASE']] = $aRow['ROU_NEXT_TASK'];
$aFields['GRID_SELECT_TYPE']['ROU_CONDITION'][$aRow['ROU_CASE']] = $aRow['ROU_CONDITION'];
$aFields['GRID_SELECT_TYPE']['ROU_TO_LAST_USER'][$aRow['ROU_CASE']] = $aRow['ROU_TO_LAST_USER'];
$oDataset->next();
}
$sXmlform = 'patterns_Select';
break;
case 'EVALUATE':
G::LoadClass('xmlfield_InputPM');
$aFields['GRID_EVALUATE_TYPE']['ROU_UID'][$aRow['ROU_CASE']] = $aRow['ROU_UID'];
$aFields['GRID_EVALUATE_TYPE']['ROU_NEXT_TASK'][$aRow['ROU_CASE']] = $aRow['ROU_NEXT_TASK'];
$aFields['GRID_EVALUATE_TYPE']['ROU_CONDITION'][$aRow['ROU_CASE']] = $aRow['ROU_CONDITION'];
$aFields['GRID_EVALUATE_TYPE']['ROU_TO_LAST_USER'][$aRow['ROU_CASE']] = $aRow['ROU_TO_LAST_USER'];
while ($aRow = $oDataset->getRow()) {
$aFields['GRID_EVALUATE_TYPE']['ROU_UID'][$aRow['ROU_CASE']] = $aRow['ROU_UID'];
$aFields['GRID_EVALUATE_TYPE']['ROU_NEXT_TASK'][$aRow['ROU_CASE']] = $aRow['ROU_NEXT_TASK'];
$aFields['GRID_EVALUATE_TYPE']['ROU_CONDITION'][$aRow['ROU_CASE']] = $aRow['ROU_CONDITION'];
$aFields['GRID_EVALUATE_TYPE']['ROU_TO_LAST_USER'][$aRow['ROU_CASE']] = $aRow['ROU_TO_LAST_USER'];
$oDataset->next();
}
$sXmlform = 'patterns_Evaluate';
break;
case 'PARALLEL':
$aFields['GRID_PARALLEL_TYPE']['ROU_UID'][$aRow['ROU_CASE']] = $aRow['ROU_UID'];
$aFields['GRID_PARALLEL_TYPE']['ROU_NEXT_TASK'][$aRow['ROU_CASE']] = $aRow['ROU_NEXT_TASK'];
while ($aRow = $oDataset->getRow()) {
$aFields['GRID_PARALLEL_TYPE']['ROU_UID'][$aRow['ROU_CASE']] = $aRow['ROU_UID'];
$aFields['GRID_PARALLEL_TYPE']['ROU_NEXT_TASK'][$aRow['ROU_CASE']] = $aRow['ROU_NEXT_TASK'];
$oDataset->next();
}
$sXmlform = 'patterns_Parallel';
break;
case 'PARALLEL-BY-EVALUATION':
G::LoadClass('xmlfield_InputPM');
$aFields['GRID_PARALLEL_EVALUATION_TYPE']['ROU_UID'][$aRow['ROU_CASE']] = $aRow['ROU_UID'];
$aFields['GRID_PARALLEL_EVALUATION_TYPE']['ROU_NEXT_TASK'][$aRow['ROU_CASE']] = $aRow['ROU_NEXT_TASK'];
$aFields['GRID_PARALLEL_EVALUATION_TYPE']['ROU_CONDITION'][$aRow['ROU_CASE']] = $aRow['ROU_CONDITION'];
while ($aRow = $oDataset->getRow()) {
$aFields['GRID_PARALLEL_EVALUATION_TYPE']['ROU_UID'][$aRow['ROU_CASE']] = $aRow['ROU_UID'];
$aFields['GRID_PARALLEL_EVALUATION_TYPE']['ROU_NEXT_TASK'][$aRow['ROU_CASE']] = $aRow['ROU_NEXT_TASK'];
$aFields['GRID_PARALLEL_EVALUATION_TYPE']['ROU_CONDITION'][$aRow['ROU_CASE']] = $aRow['ROU_CONDITION'];
$aFields['GRID_PARALLEL_EVALUATION_TYPE']['ROU_OPTIONAL'][$aRow['ROU_CASE']] = $aRow['ROU_OPTIONAL'];
$oDataset->next();
}
$sXmlform = 'patterns_ParallelByEvaluation';
break;
case 'DISCRIMINATOR':
G::LoadClass('xmlfield_InputPM');
$aFields['GRID_DISCRIMINATOR_TYPE']['ROU_UID'][$aRow['ROU_CASE']] = $aRow['ROU_UID'];
$aFields['GRID_DISCRIMINATOR_TYPE']['ROU_NEXT_TASK'][$aRow['ROU_CASE']] = $aRow['ROU_NEXT_TASK'];
$aFields['GRID_DISCRIMINATOR_TYPE']['ROU_CONDITION'][$aRow['ROU_CASE']] = $aRow['ROU_CONDITION'];
$aFields['GRID_DISCRIMINATOR_TYPE']['ROU_OPTIONAL'][$aRow['ROU_CASE']] = $aRow['ROU_OPTIONAL'];
G::LoadClass('tasks');
$oTasks = new Tasks();
$routeData = $oTasks->getRouteByType($sProcessUID, $aRow['ROU_NEXT_TASK'], $aRow['ROU_TYPE']);
$aFields['ROUTE_COUNT'] = count($routeData);
//.........這裏部分代碼省略.........