BY-195 Agregando validacion para obtener los datos del proceso hijo al enviar el mail BY-195 Agregando validacion para obtener los datos del proceso hijo al enviar el mail BY-195 Agregando validacion para obtener los datos del proceso hijo al enviar el mail Adding validation to get the data of the last task in the parent subprocess when the thread is going back from the son threat. Fixing merge conflicts
36 lines
1.2 KiB
PHP
36 lines
1.2 KiB
PHP
<?php
|
|
$licensedFeatures = & PMLicensedFeatures::getSingleton();
|
|
if (!$licensedFeatures->verifyfeature('7qhYmF1eDJWcEdwcUZpT0k4S0xTRStvdz09')) {
|
|
G::SendTemporalMessage( 'ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels' );
|
|
G::header( 'location: ../login/login' );
|
|
die;
|
|
}
|
|
$caseId = $_SESSION['APPLICATION'];
|
|
$usrUid = $_SESSION['USER_LOGGED'];
|
|
$usrName = $_SESSION['USR_FULLNAME'];
|
|
$actualIndex = $_SESSION['INDEX'];
|
|
$cont = 0;
|
|
|
|
use \ProcessMaker\Services\Api;
|
|
$appDel = new AppDelegation();
|
|
|
|
$actualThread = $appDel->Load($caseId, $actualIndex);
|
|
$actualLastIndex = $actualThread['DEL_PREVIOUS'];
|
|
|
|
require_once (PATH_HOME . "engine" . PATH_SEP . "classes" . PATH_SEP . "class.labelsGmail.php");
|
|
$oLabels = new labelsGmail();
|
|
$oLabels->addRelabelingToQueue($caseId, $actualIndex, $actualLastIndex, false);
|
|
|
|
G::LoadClass( "pmGoogleApi" );
|
|
$pmGoogle = new PMGoogleApi();
|
|
if(array_key_exists('gmail', $_SESSION) && $_SESSION['gmail'] == 1 && $pmGoogle->getServiceGmailStatus() ){
|
|
$_SESSION['gmail'] = 0;
|
|
unset($_SESSION['gmail']); //cleaning session
|
|
$mUrl = '/sys'. $_SESSION['WORKSPACE'] .'/en/'.$_SESSION['currentSkin'].'/cases/cases_Open?APP_UID='.$caseId.'&DEL_INDEX='.$actualIndex.'&action=sent';
|
|
} else{
|
|
$mUrl = 'casesListExtJs';
|
|
}
|
|
|
|
header( 'location:' . $mUrl );
|
|
|