Classic>3.1.3>assignment rules>Selection> The task doesn't have any users.
This commit is contained in:
dheeyi william
2016-12-01 11:11:55 -04:00
parent 26e9d3a687
commit f0c21e4367
3 changed files with 33 additions and 3 deletions

View File

@@ -2455,7 +2455,7 @@ class wsBase
$aCurrentDerivation = array ('APP_UID' => $caseId,'DEL_INDEX' => $delIndex,'APP_STATUS' => $sStatus,'TAS_UID' => $appdel['TAS_UID'],'ROU_TYPE' => $row[0]['ROU_TYPE']
);
$oRoute = new \ProcessMaker\Core\RoutingScreen();
$nextTasks = $oRoute->mergeDataDerivation($nextDelegations, $oDerivation->prepareInformation($aData));
$nextTasks = $oRoute->mergeDataDerivation($nextDelegations, $oDerivation->prepareInformation($aData), $row[0]['ROU_TYPE']);
$oDerivation->derivate( $aCurrentDerivation, $nextTasks );
$appFields = $oCase->loadCase( $caseId );

View File

@@ -133,7 +133,7 @@ try {
$aPInformation = $oDerivation->prepareInformation( array ('USER_UID' => $_SESSION['USER_LOGGED'],'APP_UID' => $_SESSION['APPLICATION'],'DEL_INDEX' => $_SESSION['INDEX'])
);
$oRoute = new \ProcessMaker\Core\RoutingScreen();
$nextTasks = $oRoute->mergeDataDerivation($_POST['form']['TASKS'], $aPInformation);
$nextTasks = $oRoute->mergeDataDerivation($_POST['form']['TASKS'], $aPInformation, $_POST['form']['ROU_TYPE']);
$arrayDerivationResult = $oDerivation->derivate($aCurrentDerivation, $nextTasks);
if (!empty($arrayDerivationResult)) {

View File

@@ -17,8 +17,38 @@ class RoutingScreen extends \Derivation
$this->setRegexpTaskTypeToInclude("GATEWAYTOGATEWAY|END-MESSAGE-EVENT|END-EMAIL-EVENT|INTERMEDIATE-CATCH-TIMER-EVENT|INTERMEDIATE-THROW-MESSAGE-EVENT|INTERMEDIATE-THROW-EMAIL-EVENT");
}
public function mergeDataDerivation($post, $prepareInformation)
/**
* This fix only applies to classical processes when routype is SELECT
* @param $post
* @param $prepareInformation - The first index always starts at 1
* @param $rouType
* @return mixed - An array is returned whit first index 1
*/
private function beforeMergeData($post, $prepareInformation, $rouType)
{
if ($rouType == 'SELECT') {
$post = array_shift($post);
foreach ($prepareInformation as $key => $nextTask) {
if ($nextTask['ROU_CONDITION'] == $post['ROU_CONDITION'] &&
$post['SOURCE_UID'] == $nextTask['SOURCE_UID']
) {
$prepareInformationData[1] = $nextTask;
return $prepareInformationData;
}
}
}
return $prepareInformation;
}
/**
* @param $post
* @param $prepareInformation
* @param $rouType
* @return array
*/
public function mergeDataDerivation($post, $prepareInformation, $rouType)
{
$prepareInformation = $this->beforeMergeData($post, $prepareInformation, $rouType);
$aDataMerged = array();
$flagJumpTask = false;
foreach ($prepareInformation as $key => $nextTask) {