PMCORE-1387
This commit is contained in:
@@ -7,7 +7,6 @@ use Faker\Generator as Faker;
|
|||||||
$factory->define(\ProcessMaker\Model\Groupwf::class, function(Faker $faker) {
|
$factory->define(\ProcessMaker\Model\Groupwf::class, function(Faker $faker) {
|
||||||
return [
|
return [
|
||||||
'GRP_UID' => G::generateUniqueID(),
|
'GRP_UID' => G::generateUniqueID(),
|
||||||
//'GRP_ID' The incremental fields of the tables must not be specified in the creation list.
|
|
||||||
'GRP_TITLE' => $faker->sentence(2),
|
'GRP_TITLE' => $faker->sentence(2),
|
||||||
'GRP_STATUS' => 'ACTIVE',
|
'GRP_STATUS' => 'ACTIVE',
|
||||||
'GRP_LDAP_DN' => '',
|
'GRP_LDAP_DN' => '',
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ $factory->define(\ProcessMaker\Model\Process::class, function(Faker $faker) {
|
|||||||
//The incremental fields of the tables must not be specified in the creation list.
|
//The incremental fields of the tables must not be specified in the creation list.
|
||||||
return [
|
return [
|
||||||
'PRO_UID' => G::generateUniqueID(),
|
'PRO_UID' => G::generateUniqueID(),
|
||||||
//'PRO_ID' The incremental fields of the tables must not be specified in the creation list.
|
|
||||||
'PRO_TITLE' => $faker->sentence(3),
|
'PRO_TITLE' => $faker->sentence(3),
|
||||||
'PRO_DESCRIPTION' => $faker->paragraph(3),
|
'PRO_DESCRIPTION' => $faker->paragraph(3),
|
||||||
'PRO_CREATE_USER' => '00000000000000000000000000000001',
|
'PRO_CREATE_USER' => '00000000000000000000000000000001',
|
||||||
@@ -31,7 +30,6 @@ $factory->state(\ProcessMaker\Model\Process::class, 'foreign_keys', function (Fa
|
|||||||
$user = factory(\ProcessMaker\Model\User::class)->create();
|
$user = factory(\ProcessMaker\Model\User::class)->create();
|
||||||
return [
|
return [
|
||||||
'PRO_UID' => G::generateUniqueID(),
|
'PRO_UID' => G::generateUniqueID(),
|
||||||
//'PRO_ID' The incremental fields of the tables must not be specified in the creation list.
|
|
||||||
'PRO_TITLE' => $faker->sentence(3),
|
'PRO_TITLE' => $faker->sentence(3),
|
||||||
'PRO_DESCRIPTION' => $faker->paragraph(3),
|
'PRO_DESCRIPTION' => $faker->paragraph(3),
|
||||||
'PRO_CREATE_USER' => $user->USR_UID,
|
'PRO_CREATE_USER' => $user->USR_UID,
|
||||||
@@ -52,7 +50,6 @@ $factory->state(\ProcessMaker\Model\Process::class, 'flow', function (Faker $fak
|
|||||||
$user = factory(\ProcessMaker\Model\User::class)->create();
|
$user = factory(\ProcessMaker\Model\User::class)->create();
|
||||||
$process = [
|
$process = [
|
||||||
'PRO_UID' => G::generateUniqueID(),
|
'PRO_UID' => G::generateUniqueID(),
|
||||||
//'PRO_ID' The incremental fields of the tables must not be specified in the creation list.
|
|
||||||
'PRO_TITLE' => $faker->sentence(3),
|
'PRO_TITLE' => $faker->sentence(3),
|
||||||
'PRO_DESCRIPTION' => $faker->paragraph(3),
|
'PRO_DESCRIPTION' => $faker->paragraph(3),
|
||||||
'PRO_CREATE_USER' => $user->USR_UID,
|
'PRO_CREATE_USER' => $user->USR_UID,
|
||||||
|
|||||||
@@ -11,7 +11,6 @@ $factory->define(\ProcessMaker\Model\Task::class, function(Faker $faker) {
|
|||||||
'PRO_UID' => $process->PRO_UID,
|
'PRO_UID' => $process->PRO_UID,
|
||||||
'PRO_ID' => $process->PRO_ID,
|
'PRO_ID' => $process->PRO_ID,
|
||||||
'TAS_UID' => G::generateUniqueID(),
|
'TAS_UID' => G::generateUniqueID(),
|
||||||
//'TAS_ID' The incremental fields of the tables must not be specified in the creation list.
|
|
||||||
'TAS_TITLE' => $faker->sentence(2),
|
'TAS_TITLE' => $faker->sentence(2),
|
||||||
'TAS_TYPE' => 'NORMAL',
|
'TAS_TYPE' => 'NORMAL',
|
||||||
'TAS_TYPE_DAY' => 1,
|
'TAS_TYPE_DAY' => 1,
|
||||||
@@ -40,7 +39,6 @@ $factory->state(\ProcessMaker\Model\Task::class, 'foreign_keys', function (Faker
|
|||||||
'PRO_UID' => $process->PRO_UID,
|
'PRO_UID' => $process->PRO_UID,
|
||||||
'PRO_ID' => $process->PRO_ID,
|
'PRO_ID' => $process->PRO_ID,
|
||||||
'TAS_UID' => G::generateUniqueID(),
|
'TAS_UID' => G::generateUniqueID(),
|
||||||
//'TAS_ID' The incremental fields of the tables must not be specified in the creation list.
|
|
||||||
'TAS_TITLE' => $faker->sentence(2),
|
'TAS_TITLE' => $faker->sentence(2),
|
||||||
'TAS_TYPE' => 'NORMAL',
|
'TAS_TYPE' => 'NORMAL',
|
||||||
'TAS_TYPE_DAY' => 1,
|
'TAS_TYPE_DAY' => 1,
|
||||||
|
|||||||
@@ -1416,7 +1416,7 @@ class Derivation
|
|||||||
protected function subProcessCreation(array $subProcessInfo, array $appFields, array $currentDelegation, $delIndex, $threadIndex)
|
protected function subProcessCreation(array $subProcessInfo, array $appFields, array $currentDelegation, $delIndex, $threadIndex)
|
||||||
{
|
{
|
||||||
// Check if is SelfService the task in the SubProcess
|
// Check if is SelfService the task in the SubProcess
|
||||||
$isSelfService = (empty($subProcessInfo['USR_UID'])) ? true : false;
|
$isSelfService = empty($subProcessInfo['USR_UID']) ? true : false;
|
||||||
|
|
||||||
// Create the new case in the sub-process
|
// Create the new case in the sub-process
|
||||||
// Set the initial date to null the time its created
|
// Set the initial date to null the time its created
|
||||||
|
|||||||
@@ -101,8 +101,8 @@ try {
|
|||||||
$index = $_SESSION["INDEX"];
|
$index = $_SESSION["INDEX"];
|
||||||
$userLogged = $_SESSION["USER_LOGGED"];
|
$userLogged = $_SESSION["USER_LOGGED"];
|
||||||
|
|
||||||
//Now we dispatch the derivation of the case through Jobs Laravel.
|
// Now we dispatch the derivation of the case through Jobs Laravel.
|
||||||
$closure = function() use($processUid, $application, $postForm, $sStatus, $flagGmail, $tasUid, $index, $userLogged) {
|
$closure = function() use ($processUid, $application, $postForm, $sStatus, $flagGmail, $tasUid, $index, $userLogged) {
|
||||||
$cases = new Cases();
|
$cases = new Cases();
|
||||||
$cases->routeCase($processUid, $application, $postForm, $sStatus, $flagGmail, $tasUid, $index, $userLogged);
|
$cases->routeCase($processUid, $application, $postForm, $sStatus, $flagGmail, $tasUid, $index, $userLogged);
|
||||||
};
|
};
|
||||||
@@ -114,18 +114,19 @@ try {
|
|||||||
|
|
||||||
$debuggerAvailable = true;
|
$debuggerAvailable = true;
|
||||||
$casesRedirector = 'casesListExtJsRedirector';
|
$casesRedirector = 'casesListExtJsRedirector';
|
||||||
if (isset($_SESSION ['user_experience']) && $flagGmail === false) {
|
$nextStep = [];
|
||||||
$aNextStep ['PAGE'] = $casesRedirector . '?ux=' . $_SESSION ['user_experience'];
|
if (isset($_SESSION['user_experience']) && $flagGmail === false) {
|
||||||
|
$nextStep['PAGE'] = $casesRedirector . '?ux=' . $_SESSION['user_experience'];
|
||||||
$debuggerAvailable = false;
|
$debuggerAvailable = false;
|
||||||
} else {
|
} else {
|
||||||
if ($flagGmail === true) {
|
if ($flagGmail === true) {
|
||||||
$aNextStep ['PAGE'] = $casesRedirector . '?gmail=1';
|
$nextStep['PAGE'] = $casesRedirector . '?gmail=1';
|
||||||
} else {
|
} else {
|
||||||
$aNextStep ['PAGE'] = $casesRedirector;
|
$nextStep['PAGE'] = $casesRedirector;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$loc = $aNextStep['PAGE'];
|
$loc = $nextStep['PAGE'];
|
||||||
|
|
||||||
//Triggers After
|
//Triggers After
|
||||||
$isIE = Bootstrap::isIE();
|
$isIE = Bootstrap::isIE();
|
||||||
|
|||||||
@@ -139,27 +139,27 @@ trait CasesTrait
|
|||||||
$this->updateCase($application, $appFields);
|
$this->updateCase($application, $appFields);
|
||||||
|
|
||||||
// Send notifications - Start
|
// Send notifications - Start
|
||||||
$oUser = new Users();
|
$user = new Users();
|
||||||
$aUser = $oUser->load($userLogged);
|
$userInfo = $user->load($userLogged);
|
||||||
$fromName = $aUser['USR_FIRSTNAME'] . ' ' . $aUser['USR_LASTNAME'];
|
$fromName = $userInfo['USR_FIRSTNAME'] . ' ' . $userInfo['USR_LASTNAME'];
|
||||||
|
|
||||||
$sFromData = $fromName . ($aUser['USR_EMAIL'] != '' ? ' <' . $aUser['USR_EMAIL'] . '>' : '');
|
$fromData = $fromName . ($userInfo['USR_EMAIL'] != '' ? ' <' . $userInfo['USR_EMAIL'] . '>' : '');
|
||||||
|
|
||||||
if ($flagGmail === true) {
|
if ($flagGmail === true) {
|
||||||
$appDel = new AppDelegation();
|
$appDel = new AppDelegation();
|
||||||
$actualThread = $appDel->Load($application, $index);
|
$actualThread = $appDel->Load($application, $index);
|
||||||
|
|
||||||
$appDelPrev = $appDel->LoadParallel($application);
|
$appDelPrev = $appDel->LoadParallel($application);
|
||||||
$Pmgmail = new Pmgmail();
|
$pmGmail = new Pmgmail();
|
||||||
foreach ($appDelPrev as $app) {
|
foreach ($appDelPrev as $app) {
|
||||||
if (($app['DEL_INDEX'] != $index) && ($app['DEL_PREVIOUS'] != $actualThread['DEL_PREVIOUS'])) {
|
if (($app['DEL_INDEX'] != $index) && ($app['DEL_PREVIOUS'] != $actualThread['DEL_PREVIOUS'])) {
|
||||||
$Pmgmail->gmailsIfSelfServiceValueBased($application, $app['DEL_INDEX'], $postForm['TASKS'], $appFields['APP_DATA']);
|
$pmGmail->gmailsIfSelfServiceValueBased($application, $app['DEL_INDEX'], $postForm['TASKS'], $appFields['APP_DATA']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->sendNotifications($tasUid, $postForm['TASKS'], $appFields['APP_DATA'], $application, $index, $sFromData);
|
$this->sendNotifications($tasUid, $postForm['TASKS'], $appFields['APP_DATA'], $application, $index, $fromData);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
G::SendTemporalMessage(G::loadTranslation('ID_NOTIFICATION_ERROR') . ' - ' . $e->getMessage(), 'warning', 'string', null, '100%');
|
G::SendTemporalMessage(G::loadTranslation('ID_NOTIFICATION_ERROR') . ' - ' . $e->getMessage(), 'warning', 'string', null, '100%');
|
||||||
}
|
}
|
||||||
@@ -263,8 +263,8 @@ trait CasesTrait
|
|||||||
$case->updateCase($appUid, $fields);
|
$case->updateCase($appUid, $fields);
|
||||||
if (isset($files['form'])) {
|
if (isset($files['form'])) {
|
||||||
if (isset($files["form"]["name"]) && count($files["form"]["name"]) > 0) {
|
if (isset($files["form"]["name"]) && count($files["form"]["name"]) > 0) {
|
||||||
$oInputDocument = new InputDocument();
|
$inputDocument = new InputDocument();
|
||||||
$oInputDocument->uploadFileCase($files, $case, $fields, $currentUsrUid, $appUid, $delIndex);
|
$inputDocument->uploadFileCase($files, $case, $fields, $currentUsrUid, $appUid, $delIndex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$wsBase = new WsBase();
|
$wsBase = new WsBase();
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ class SubApplication extends Model
|
|||||||
protected $primaryKey = 'APP_UID';
|
protected $primaryKey = 'APP_UID';
|
||||||
// The IDs are auto-incrementing
|
// The IDs are auto-incrementing
|
||||||
public $incrementing = false;
|
public $incrementing = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The model's default values for attributes.
|
* The model's default values for attributes.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user