本文整理汇总了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);
//.........这里部分代码省略.........