Solving problem with the index in subprocess Sincronous
This commit is contained in:
@@ -172,13 +172,22 @@ try {
|
||||
G::LoadClass( "pmGoogleApi" );
|
||||
$pmGoogle = new PMGoogleApi();
|
||||
if($pmGoogle->getServiceGmailStatus()){
|
||||
$flagGmail = true;
|
||||
}
|
||||
}
|
||||
if( $flagGmail === true ){
|
||||
$appDel = new AppDelegation();
|
||||
$actualThread = $appDel->Load($_SESSION['APPLICATION'], $_SESSION['INDEX']);
|
||||
|
||||
$appDelPrev = $appDel->LoadParallel($_SESSION['APPLICATION']);
|
||||
$Pmgmail = new \ProcessMaker\BusinessModel\Pmgmail();
|
||||
if($appDelPrev == array()){
|
||||
$Pmgmail->sendEmail($_SESSION['APPLICATION'], "", $_SESSION['INDEX'], $_POST['form']['TASKS'], $appFields['APP_DATA']);
|
||||
}
|
||||
|
||||
foreach ($appDelPrev as $app){
|
||||
if( ($app['DEL_INDEX'] != $_SESSION['INDEX']) && ($app['DEL_PREVIOUS'] != $actualThread['DEL_PREVIOUS']) ){
|
||||
$Pmgmail->sendEmail($_SESSION['APPLICATION'], "", $app['DEL_INDEX'], $_POST['form']['TASKS'], $appFields['APP_DATA']);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
try {
|
||||
|
||||
@@ -177,15 +177,16 @@ class Pmgmail {
|
||||
$aTaskInfo = $oTask->load($aTask["TAS_PARENT"]);
|
||||
|
||||
$oSubPro = new \SubApplication();
|
||||
$subProAppUid = "";
|
||||
if( ($aTaskInfo["TAS_TYPE"] === "SUBPROCESS") ){
|
||||
$subProAppUid = $oSubPro->loadSubProUidByParent($app_uid, $index, $index+1);
|
||||
$subProAppUid = $oSubPro->loadSubProUidByParent($app_uid, 1, $index-1);
|
||||
$index = 1;
|
||||
} else if($aTask['TAS_UID'] == -1 && $aTask['TAS_ASSIGN_TYPE'] == "nobody"){
|
||||
$subProAppUid = $oSubPro->loadSubProUidBySon($app_uid, $index, $index+1);
|
||||
|
||||
$appDel = new \AppDelegation();
|
||||
$actualThread = $appDel->Load($subProAppUid, $index+1);
|
||||
$index = $actualThread['DEL_INDEX'];
|
||||
$index = $actualThread['DEL_INDEX']+1;
|
||||
|
||||
$aCriteria = new \Criteria("workflow");
|
||||
$aCriteria->addSelectColumn(\RoutePeer::ROU_NEXT_TASK);
|
||||
|
||||
Reference in New Issue
Block a user