PMC-580: release/3.3.8
This commit is contained in:
@@ -121,7 +121,7 @@ try {
|
||||
|
||||
$argvx = '';
|
||||
|
||||
for ($i = 8; $i <= count($argv) - 1; $i++) {
|
||||
for ($i = 7; $i <= count($argv) - 1; $i++) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (strpos($argv[$i], '+init-date') !== false) {
|
||||
$dateInit = substr($argv[$i], 10);
|
||||
|
||||
@@ -987,7 +987,8 @@ class ActionsByEmailCoreClass extends PMPlugin
|
||||
true,
|
||||
$this->getIndex(),
|
||||
$configEmail,
|
||||
0
|
||||
0,
|
||||
WsBase::MESSAGE_TYPE_ACTIONS_BY_EMAIL
|
||||
);
|
||||
|
||||
return $result;
|
||||
|
||||
@@ -818,7 +818,6 @@ class Cases
|
||||
*
|
||||
* @param string $appUid
|
||||
* @param array $Fields
|
||||
* @param bool $forceLoadData
|
||||
*
|
||||
* @return Fields
|
||||
* @throws Exception
|
||||
@@ -870,7 +869,7 @@ class Cases
|
||||
* @see \ProcessMaker\BusinessModel\Cases\Variable::delete()
|
||||
* @see \ProcessMaker\BusinessModel\Cases\Variable::update()
|
||||
*/
|
||||
public function updateCase($appUid, $Fields = [], $forceLoadData = false)
|
||||
public function updateCase($appUid, $Fields = [])
|
||||
{
|
||||
try {
|
||||
$application = new Application;
|
||||
@@ -895,15 +894,10 @@ class Cases
|
||||
}
|
||||
|
||||
//Get the appTitle and appDescription
|
||||
$fieldsCase = [];
|
||||
if ($forceLoadData) {
|
||||
$lastFieldsCase = $this->loadCase($appUid)['APP_DATA'];
|
||||
$fieldsCase = array_merge($appData, $lastFieldsCase);
|
||||
}
|
||||
$newTitleOrDescription = $this->newRefreshCaseTitleAndDescription(
|
||||
$appUid,
|
||||
$appFields,
|
||||
empty($fieldsCase) ? $appData : $fieldsCase
|
||||
$appData
|
||||
);
|
||||
|
||||
//Start: Save History --By JHL
|
||||
@@ -3510,6 +3504,7 @@ class Cases
|
||||
$foundDisabledCode = "";
|
||||
/*----------------------------------********---------------------------------*/
|
||||
|
||||
$varInAfterRouting = false;
|
||||
$fieldsTrigger = [];
|
||||
foreach ($triggersList as $trigger) {
|
||||
/*----------------------------------********---------------------------------*/
|
||||
@@ -3537,6 +3532,7 @@ class Cases
|
||||
$executedOn = $oPMScript->getExecutionOriginForAStep($stepType, $stepUidObj, $triggerType);
|
||||
$oPMScript->setExecutedOn($executedOn);
|
||||
$oPMScript->execute();
|
||||
//Return all the appData + variables changed in the execution
|
||||
$appDataAfterTrigger = $oPMScript->aFields;
|
||||
|
||||
/**
|
||||
@@ -3556,12 +3552,9 @@ class Cases
|
||||
$fieldsCase = array_merge($fieldsCase, $lastFieldsCase);
|
||||
}
|
||||
|
||||
//Update the case with the fields changed in the trigger
|
||||
if (!empty($fieldsTrigger)) {
|
||||
$appFieldsTrigger = [];
|
||||
$appFieldsTrigger['APP_DATA'] = $fieldsTrigger;
|
||||
//Update the case
|
||||
$this->updateCase($appUid, $appFieldsTrigger, true);
|
||||
//Save the fields changed in the trigger
|
||||
if (!$varInAfterRouting && !empty($fieldsTrigger)) {
|
||||
$varInAfterRouting = true;
|
||||
}
|
||||
|
||||
//Merge the appData with variables changed
|
||||
@@ -3578,6 +3571,17 @@ class Cases
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the caseTitle from the nextTask and update the caseTitle
|
||||
*/
|
||||
if ($varInAfterRouting) {
|
||||
$this->newRefreshCaseTitleAndDescription(
|
||||
$appUid,
|
||||
['DEL_INDEX' => 0],
|
||||
$fieldsCase
|
||||
);
|
||||
}
|
||||
|
||||
/*----------------------------------********---------------------------------*/
|
||||
if (!empty($foundDisabledCode)) {
|
||||
G::SendTemporalMessage(
|
||||
@@ -5611,9 +5615,14 @@ class Cases
|
||||
}
|
||||
|
||||
/**
|
||||
* This function send an email for each task in $arrayTask if $to is definded
|
||||
*
|
||||
* @param $dataLastEmail
|
||||
* @param $arrayData
|
||||
* @param $arrayTask
|
||||
* @return void
|
||||
*
|
||||
* @see \Cases->sendNotifications()
|
||||
*/
|
||||
public function sendMessage($dataLastEmail, $arrayData, $arrayTask)
|
||||
{
|
||||
@@ -5697,7 +5706,7 @@ class Cases
|
||||
'',
|
||||
$dataLastEmail['applicationUid'],
|
||||
$dataLastEmail['delIndex'],
|
||||
'DERIVATION',
|
||||
WsBase::MESSAGE_TYPE_TASK_NOTIFICATION,
|
||||
$dataLastEmail['subject'],
|
||||
$dataLastEmail['from'],
|
||||
$to,
|
||||
|
||||
@@ -663,14 +663,19 @@ class Derivation
|
||||
/**
|
||||
* Execute Event
|
||||
*
|
||||
* @param string $dummyTaskUid Unique id of Element Origin (unique id of Task) This is the nextTask
|
||||
* @param array $applicationData Case data
|
||||
* @param bool $flagEventExecuteBeforeGateway Execute event before gateway
|
||||
* @param bool $flagEventExecuteAfterGateway Execute event after gateway
|
||||
* @param string $dummyTaskUid Unique id of Element Origin (unique id of Task) This is the nextTask
|
||||
* @param array $applicationData Case data
|
||||
* @param bool $flagEventExecuteBeforeGateway Execute event before gateway
|
||||
* @param bool $flagEventExecuteAfterGateway Execute event after gateway
|
||||
* @param int $taskId
|
||||
*
|
||||
* @return void
|
||||
* @see Derivation->derivate()
|
||||
* @see Derivation->doRouteWithoutThread()
|
||||
* @see Derivation->finishProcess()
|
||||
* @see Derivation->finishTask()
|
||||
*/
|
||||
private function executeEvent($dummyTaskUid, array $applicationData, $flagEventExecuteBeforeGateway = true, $flagEventExecuteAfterGateway = true, $elementOriUid='')
|
||||
private function executeEvent($dummyTaskUid, array $applicationData, $flagEventExecuteBeforeGateway = true, $flagEventExecuteAfterGateway = true, $elementOriUid='',$tasId = 0)
|
||||
{
|
||||
try {
|
||||
//Verify if the Project is BPMN
|
||||
@@ -743,7 +748,7 @@ class Derivation
|
||||
|
||||
if (preg_match("/^(?:END|INTERMEDIATE)$/", $event->getEvnType()) && $event->getEvnMarker() === 'EMAIL') {
|
||||
//Email-Event throw
|
||||
$result = $emailEvent->sendEmail($applicationData["APP_UID"], $applicationData["PRO_UID"], $value['uid'], $applicationData);
|
||||
$result = $emailEvent->sendEmail($applicationData["APP_UID"], $applicationData["PRO_UID"], $value['uid'], $applicationData, $tasId);
|
||||
|
||||
$aContext['envUid'] = $value['uid'];
|
||||
$aContext['envType'] = $event->getEvnType();
|
||||
@@ -1031,7 +1036,8 @@ class Derivation
|
||||
$appFields,
|
||||
true,
|
||||
true,
|
||||
$currentDelegation["TAS_UID"]
|
||||
$currentDelegation["TAS_UID"],
|
||||
!empty($nextDel["TAS_ID"]) ? $nextDel["TAS_ID"] : 0
|
||||
);
|
||||
|
||||
//Route the case
|
||||
@@ -1877,7 +1883,15 @@ class Derivation
|
||||
if (preg_match("/^(?:END-MESSAGE-EVENT|END-EMAIL-EVENT)$/", $taskDummy->getTasType())
|
||||
&& $multiInstanceCompleted && $executeEvent
|
||||
) {
|
||||
$this->executeEvent($nextDel["TAS_UID_DUMMY"], $appFields, $flagFirstIteration, true);
|
||||
$nextDel["TAS_ID"] = $taskDummy->getTasId();
|
||||
$this->executeEvent(
|
||||
$nextDel["TAS_UID_DUMMY"],
|
||||
$appFields,
|
||||
$flagFirstIteration,
|
||||
true,
|
||||
'',
|
||||
!empty($nextDel["TAS_ID"]) ? $nextDel["TAS_ID"] : 0
|
||||
);
|
||||
}
|
||||
}
|
||||
$aContext['action'] = 'finish-task';
|
||||
@@ -1904,12 +1918,27 @@ class Derivation
|
||||
$nextDel['ROU_CONDITION'] = '';
|
||||
}
|
||||
//Execute the Intermediate Event After the End of Process
|
||||
$this->executeEvent($nextDel["TAS_UID"], $appFields, true, true);
|
||||
$this->executeEvent(
|
||||
$nextDel["TAS_UID"],
|
||||
$appFields,
|
||||
true,
|
||||
true,
|
||||
'',
|
||||
!empty($nextDel["TAS_ID"]) ? $nextDel["TAS_ID"] : 0
|
||||
);
|
||||
if (isset($nextDel["TAS_UID_DUMMY"]) ) {
|
||||
$taskDummy = TaskPeer::retrieveByPK($nextDel["TAS_UID_DUMMY"]);
|
||||
if (preg_match("/^(?:END-MESSAGE-EVENT|END-EMAIL-EVENT)$/", $taskDummy->getTasType())) {
|
||||
$nextDel["TAS_ID"] = $taskDummy->getTasId();
|
||||
//Throw Events
|
||||
$this->executeEvent($nextDel["TAS_UID_DUMMY"], $appFields, $flagFirstIteration, true);
|
||||
$this->executeEvent(
|
||||
$nextDel["TAS_UID_DUMMY"],
|
||||
$appFields,
|
||||
$flagFirstIteration,
|
||||
true,
|
||||
'',
|
||||
!empty($nextDel["TAS_ID"]) ? $nextDel["TAS_ID"] : 0
|
||||
);
|
||||
}
|
||||
}
|
||||
$aContext['action'] = 'end-process';
|
||||
@@ -2231,7 +2260,14 @@ class Derivation
|
||||
//If the all Siblings are done execute the events
|
||||
if (sizeof($arraySiblings) === 0 && !$flagTypeMultipleInstance) {
|
||||
//Throw Events
|
||||
$this->executeEvent($nextDel["TAS_UID"], $appFields, $flagFirstIteration, false);
|
||||
$this->executeEvent(
|
||||
$nextDel["TAS_UID"],
|
||||
$appFields,
|
||||
$flagFirstIteration,
|
||||
false,
|
||||
'',
|
||||
!empty($nextDel["TAS_ID"]) ? $nextDel["TAS_ID"] : 0
|
||||
);
|
||||
}
|
||||
//Close thread
|
||||
$this->case->closeAppThread( $currentDelegation['APP_UID'], $iAppThreadIndex );
|
||||
|
||||
@@ -9,8 +9,18 @@ use ProcessMaker\Util\WsMessageResponse;
|
||||
|
||||
class WsBase
|
||||
{
|
||||
const MESSAGE_TYPE_ACTIONS_BY_EMAIL = 'ACTIONS_BY_EMAIL';
|
||||
const MESSAGE_TYPE_CASE_NOTE = 'CASE_NOTE';
|
||||
const MESSAGE_TYPE_EMAIL_EVENT = 'EVENT';
|
||||
const MESSAGE_TYPE_EXTERNAL_REGISTRATION = 'EXTERNAL_REGISTRATION';
|
||||
const MESSAGE_TYPE_PM_FUNCTION = 'PM_FUNCTION';
|
||||
const MESSAGE_TYPE_RETRIEVE_PASSWORD = 'RETRIEVE_PASSWORD';
|
||||
const MESSAGE_TYPE_SOAP = 'SOAP';
|
||||
const MESSAGE_TYPE_TASK_NOTIFICATION = 'ROUTING';
|
||||
const MESSAGE_TYPE_TEST_EMAIL = 'TEST';
|
||||
public $stored_system_variables; //boolean
|
||||
public $wsSessionId; //web service session id, if the wsbase function is used from a WS request
|
||||
private $taskId;
|
||||
private $flagSameCase = true;
|
||||
|
||||
public function __construct($params = null)
|
||||
@@ -46,6 +56,28 @@ class WsBase
|
||||
$this->flagSameCase = $var;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the taskId
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function getTaskId()
|
||||
{
|
||||
return $this->taskId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the taskId
|
||||
*
|
||||
* @param int $taskId
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function setTaskId($taskId)
|
||||
{
|
||||
$this->taskId = $taskId;
|
||||
}
|
||||
|
||||
/**
|
||||
* function to start a web services session in ProcessMaker
|
||||
*
|
||||
@@ -855,6 +887,13 @@ class WsBase
|
||||
* @param array $config
|
||||
*
|
||||
* @return $result will return an object
|
||||
*
|
||||
* @see ActionsByEmailCoreClass->sendActionsByEmail()
|
||||
* @see workflow\engine\classes\class.pmFunctions::PMFSendMessage()
|
||||
* @see workflow\engine\methods\services\soap2::sendMessage()
|
||||
* @see \ProcessMaker\BusinessModel\EmailEvent->sendEmail()
|
||||
* @see \ProcessMaker\BusinessModel\Pmgmail->sendEmailWithApplicationData()
|
||||
*
|
||||
*/
|
||||
public function sendMessage(
|
||||
$appUid,
|
||||
@@ -869,7 +908,8 @@ class WsBase
|
||||
$showMessage = true,
|
||||
$delIndex = 0,
|
||||
$config = [],
|
||||
$gmail = 0
|
||||
$gmail = 0,
|
||||
$appMsgType = WsBase::MESSAGE_TYPE_PM_FUNCTION
|
||||
)
|
||||
{
|
||||
try {
|
||||
@@ -921,7 +961,7 @@ class WsBase
|
||||
$spool->setConfig($setup);
|
||||
|
||||
$case = new Cases();
|
||||
$oldFields = $case->loadCase($appUid);
|
||||
$oldFields = $case->loadCase($appUid, $delIndex);
|
||||
if ($gmail == 1) {
|
||||
$pathEmail = PATH_DATA_SITE . 'mailTemplates' . PATH_SEP;
|
||||
} else {
|
||||
@@ -947,7 +987,7 @@ class WsBase
|
||||
'',
|
||||
$appUid,
|
||||
$delIndex,
|
||||
'TRIGGER',
|
||||
$appMsgType,
|
||||
$subject,
|
||||
G::buildFrom($setup, $from),
|
||||
$to,
|
||||
@@ -962,7 +1002,7 @@ class WsBase
|
||||
(preg_match("/^.+\.html?$/i", $fileTemplate)) ? true : false,
|
||||
isset($fieldsCase['APP_NUMBER']) ? $fieldsCase['APP_NUMBER'] : 0,
|
||||
isset($fieldsCase['PRO_ID']) ? $fieldsCase['PRO_ID'] : 0,
|
||||
isset($fieldsCase['TAS_ID']) ? $fieldsCase['TAS_ID'] : 0
|
||||
$this->getTaskId() ?$this->getTaskId():(isset($oldFields['TAS_ID'])? $oldFields['TAS_ID'] : 0)
|
||||
);
|
||||
$spool->create($messageArray);
|
||||
|
||||
|
||||
@@ -920,34 +920,34 @@ function getEmailConfiguration ()
|
||||
* @link http://wiki.processmaker.com/index.php/ProcessMaker_Functions#PMFSendMessage.28.29
|
||||
*
|
||||
* @param string(32) | $caseId | UID for case | The UID (unique identification) for a case, which is a string of 32 hexadecimal characters to identify the case.
|
||||
* @param string(32) | $sFrom | Sender | The email address of the person who sends out the email.
|
||||
* @param string(100) | $sTo | Recipient | The email address(es) to whom the email is sent. If multiple recipients, separate each email address with a comma.
|
||||
* @param string(100) | $sCc = '' | Carbon copy recipient | The email address(es) of people who will receive carbon copies of the email.
|
||||
* @param string(100) | $sBcc = ''| Carbon copy recipient | The email address(es) of people who will receive blind carbon copies of the email.
|
||||
* @param string(50) | $sSubject | Subject of the email | The subject (title) of the email.
|
||||
* @param string(50) | $sTemplate | Name of the template | The name of the template file in plain text or HTML format which will produce the body of the email.
|
||||
* @param array | $aFields = array() | Variables for email template | Optional parameter. An associative array where the keys are the variable names and the values are the variables' values.
|
||||
* @param array | $aAttachment = array() | Attachment | An Optional arrray. An array of files (full paths) to be attached to the email.
|
||||
* @param string(32) | $from | Sender | The email address of the person who sends out the email.
|
||||
* @param string(100) | $to | Recipient | The email address(es) to whom the email is sent. If multiple recipients, separate each email address with a comma.
|
||||
* @param string(100) | $cc = '' | Carbon copy recipient | The email address(es) of people who will receive carbon copies of the email.
|
||||
* @param string(100) | $bcc = ''| Carbon copy recipient | The email address(es) of people who will receive blind carbon copies of the email.
|
||||
* @param string(50) | $subject | Subject of the email | The subject (title) of the email.
|
||||
* @param string(50) | $template | Name of the template | The name of the template file in plain text or HTML format which will produce the body of the email.
|
||||
* @param array | $emailTemplateVariables = [] | Variables for email template | Optional parameter. An associative array where the keys are the variable names and the values are the variables' values.
|
||||
* @param array | $attachments = [] | Attachment | An Optional arrray. An array of files (full paths) to be attached to the email.
|
||||
* @param boolean | $showMessage = true | Show message | Optional parameter. Set to TRUE to show the message in the case's message history.
|
||||
* @param int | $delIndex = 0 | Delegation index of the case | Optional parameter. The delegation index of the current task in the case.
|
||||
* @param string(100) | $config = '' | Email server configuration | An optional array: An array of parameters to be used in the Email sent (MESS_ENGINE, MESS_SERVER, MESS_PORT, MESS_FROM_MAIL, MESS_RAUTH, MESS_ACCOUNT, MESS_PASSWORD, and SMTPSecure) Or String: UID of Email server .
|
||||
* @param array | $config = [] | Email server configuration | An optional array: An array of parameters to be used in the Email sent (MESS_ENGINE, MESS_SERVER, MESS_PORT, MESS_FROM_MAIL, MESS_RAUTH, MESS_ACCOUNT, MESS_PASSWORD, and SMTPSecure) Or String: UID of Email server .
|
||||
* @return int | | result | Result of sending email
|
||||
*
|
||||
* @see class.pmFunctions::PMFSendMessageToGroup()
|
||||
*/
|
||||
//@param array | $aFields=array() | An associative array optional | Optional parameter. An associative array where the keys are the variable name and the values are the variable's value.
|
||||
function PMFSendMessage(
|
||||
$caseId,
|
||||
$sFrom,
|
||||
$sTo,
|
||||
$sCc,
|
||||
$sBcc,
|
||||
$sSubject,
|
||||
$sTemplate,
|
||||
$aFields = array(),
|
||||
$aAttachment = array(),
|
||||
$from,
|
||||
$to,
|
||||
$cc,
|
||||
$bcc,
|
||||
$subject,
|
||||
$template,
|
||||
$emailTemplateVariables = [],
|
||||
$attachments = [],
|
||||
$showMessage = true,
|
||||
$delIndex = 0,
|
||||
$config = array()
|
||||
$config = []
|
||||
) {
|
||||
ini_set ( "pcre.backtrack_limit", 1000000 );
|
||||
ini_set ( 'memory_limit', '-1' );
|
||||
@@ -955,28 +955,30 @@ function PMFSendMessage(
|
||||
|
||||
global $oPMScript;
|
||||
|
||||
if (isset( $oPMScript->aFields ) && is_array( $oPMScript->aFields )) {
|
||||
if (is_array( $aFields )) {
|
||||
$aFields = array_merge( $oPMScript->aFields, $aFields );
|
||||
if (isset($oPMScript->aFields) && is_array($oPMScript->aFields)) {
|
||||
if (is_array($emailTemplateVariables)) {
|
||||
$emailTemplateVariables = array_merge($oPMScript->aFields, $emailTemplateVariables);
|
||||
} else {
|
||||
$aFields = $oPMScript->aFields;
|
||||
$emailTemplateVariables = $oPMScript->aFields;
|
||||
}
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
$result = $ws->sendMessage(
|
||||
$caseId,
|
||||
$sFrom,
|
||||
$sTo,
|
||||
$sCc,
|
||||
$sBcc,
|
||||
$sSubject,
|
||||
$sTemplate,
|
||||
$aFields,
|
||||
$aAttachment,
|
||||
$from,
|
||||
$to,
|
||||
$cc,
|
||||
$bcc,
|
||||
$subject,
|
||||
$template,
|
||||
$emailTemplateVariables,
|
||||
$attachments,
|
||||
$showMessage,
|
||||
$delIndex,
|
||||
$config
|
||||
$config,
|
||||
0,
|
||||
WsBase::MESSAGE_TYPE_PM_FUNCTION
|
||||
);
|
||||
|
||||
if ($result->status_code == 0) {
|
||||
|
||||
@@ -180,8 +180,12 @@ class AppNotes extends BaseAppNotes
|
||||
* @param string $noteRecipients
|
||||
* @param string $from
|
||||
* @param integer $delIndex
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
*
|
||||
* @see AppNotes->addCaseNote()
|
||||
* @see AppNotes->postNewNote()
|
||||
* @see workflow/engine/src/ProcessMaker/Util/helpers.php::postNote()
|
||||
*/
|
||||
public function sendNoteNotification ($appUid, $usrUid, $noteContent, $noteRecipients, $from = '', $delIndex = 0)
|
||||
{
|
||||
@@ -224,7 +228,7 @@ class AppNotes extends BaseAppNotes
|
||||
'',
|
||||
$appUid,
|
||||
$delIndex,
|
||||
'DERIVATION',
|
||||
WsBase::MESSAGE_TYPE_CASE_NOTE,
|
||||
G::replaceDataField($configNoteNotification['subject'], $fieldCase),
|
||||
G::buildFrom($configuration, $from),
|
||||
$to,
|
||||
|
||||
@@ -98,13 +98,13 @@ class Groupwf extends BaseGroupwf
|
||||
$this->setGrpTitle('Default Group Title');
|
||||
}
|
||||
|
||||
if (!empty($aData['GRP_STATUS'])) {
|
||||
if (!empty($data['GRP_STATUS'])) {
|
||||
$this->setGrpStatus($data['GRP_STATUS']);
|
||||
} else {
|
||||
$this->setGrpStatus('ACTIVE');
|
||||
}
|
||||
|
||||
if (!empty($aData['GRP_LDAP_DN'])) {
|
||||
if (!empty($data['GRP_LDAP_DN'])) {
|
||||
$this->setGrpLdapDn($data['GRP_LDAP_DN']);
|
||||
} else {
|
||||
$this->setGrpLdapDn('');
|
||||
|
||||
@@ -574,8 +574,10 @@ class adminProxy extends HttpProxyController
|
||||
}
|
||||
|
||||
/**
|
||||
* for send email configuration
|
||||
* @autor Alvaro <alvaro@colosa.com>
|
||||
* For test email configuration
|
||||
* @return stdClass()
|
||||
*
|
||||
* @see adminProxy->testConnection()
|
||||
*/
|
||||
public function sendTestMail()
|
||||
{
|
||||
@@ -624,7 +626,7 @@ class adminProxy extends HttpProxyController
|
||||
'',
|
||||
'',
|
||||
'',
|
||||
'TEST',
|
||||
WsBase::MESSAGE_TYPE_TEST_EMAIL,
|
||||
$subject,
|
||||
$from,
|
||||
$_POST['TO'],
|
||||
|
||||
@@ -373,7 +373,7 @@ ViewDashboardPresenter.prototype.statusViewModel = function(indicatorId, data) {
|
||||
};
|
||||
var newObject3 = {
|
||||
datalabel : originalObject.taskTitle,
|
||||
value : 100 - (originalObject.percentageTotalOverdue + originalObject.percentageTotalAtRisk)
|
||||
value : originalObject.percentageTotalOnTime
|
||||
};
|
||||
|
||||
if (newObject1.value > 0) {
|
||||
|
||||
@@ -494,7 +494,7 @@ var loadIndicator = function (indicatorId, initDate, endDate) {
|
||||
fillSpecialIndicatorFirstView(viewModel);
|
||||
break;
|
||||
case "1050":
|
||||
//fillStatusIndicatorFirstView(viewModel);
|
||||
fillStatusIndicatorFirstView(viewModel);
|
||||
break;
|
||||
default:
|
||||
fillGeneralIndicatorFirstView(viewModel);
|
||||
|
||||
@@ -1,26 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* caseOptions.php
|
||||
CaseOptions define the menus that will show when a case is open
|
||||
*
|
||||
* ProcessMaker Open Source Edition
|
||||
* Copyright (C) 2004 - 2008 Colosa Inc.23
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as
|
||||
* published by the Free Software Foundation, either version 3 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
|
||||
* Coral Gables, FL, 33134, USA, or email info@colosa.com.
|
||||
* @see Ajax::getCaseMenu()
|
||||
* @see cases/cases_CatchSelfService.php
|
||||
* @see cases/Cases_Resume.php
|
||||
*
|
||||
* @link https://wiki.processmaker.com/3.2/Cases/Running_Cases
|
||||
*/
|
||||
global $G_TMP_MENU;
|
||||
global $sStatus;
|
||||
@@ -73,16 +59,17 @@ switch ($_SESSION['actionCaseOptions']) {
|
||||
unset($_SESSION['actionCaseOptions']);
|
||||
|
||||
if ((($sStatus === 'DRAFT') || ($sStatus === 'TO_DO')) && !$statusSendAndUnassigned) {
|
||||
if (isset($_SESSION['bNoShowSteps'])) {
|
||||
unset($_SESSION['bNoShowSteps']);
|
||||
} else {
|
||||
if ($viewSteps === true) {
|
||||
$G_TMP_MENU->AddIdOption('STEPS', G::LoadTranslation('ID_STEPS'), 'javascript:showSteps();', 'absolute');
|
||||
}
|
||||
$G_TMP_MENU->AddIdOption('INFO', G::LoadTranslation('ID_INFORMATION'), 'javascript:showInformation();', 'absolute');
|
||||
//Menu: Steps
|
||||
if ($viewSteps === true) {
|
||||
$G_TMP_MENU->AddIdOption('STEPS', G::LoadTranslation('ID_STEPS'), 'javascript:showSteps();', 'absolute');
|
||||
}
|
||||
//Menu: Information
|
||||
$G_TMP_MENU->AddIdOption('INFO', G::LoadTranslation('ID_INFORMATION'), 'javascript:showInformation();', 'absolute');
|
||||
//Menu: Actions
|
||||
$G_TMP_MENU->AddIdOption('ACTIONS', G::LoadTranslation('ID_ACTIONS'), 'javascript:showActions();', 'absolute');
|
||||
} else {
|
||||
//Menu: Information
|
||||
$G_TMP_MENU->AddIdOption('INFO', G::LoadTranslation('ID_INFORMATION'), 'javascript:showInformation();', 'absolute');
|
||||
}
|
||||
//Menu: Cases Notes
|
||||
$G_TMP_MENU->AddIdOption('NOTES', G::LoadTranslation('ID_NOTES'), 'javascript:showNotes();', 'absolute');
|
||||
|
||||
@@ -68,7 +68,7 @@ if ($userExists === true && $userData['USR_EMAIL'] != '' && $userData['USR_EMAIL
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
'TEST',
|
||||
WsBase::MESSAGE_TYPE_RETRIEVE_PASSWORD,
|
||||
$subject,
|
||||
$from,
|
||||
$data['USR_EMAIL'],
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
use ProcessMaker\ChangeLog\ChangeLog;
|
||||
use ProcessMaker\BusinessModel\Cases\InputDocument;
|
||||
|
||||
if (PMLicensedFeatures::getSingleton()
|
||||
->verifyfeature('zLhSk5TeEQrNFI2RXFEVktyUGpnczV1WEJNWVp6cjYxbTU3R29mVXVZNWhZQT0=')) {
|
||||
@@ -66,7 +67,12 @@ if (PMLicensedFeatures::getSingleton()
|
||||
|
||||
//Update case info
|
||||
$case->updateCase($appUid, $casesFields);
|
||||
|
||||
if (isset($_FILES ['form'])) {
|
||||
if (isset($_FILES["form"]["name"]) && count($_FILES["form"]["name"]) > 0) {
|
||||
$oInputDocument = new InputDocument();
|
||||
$oInputDocument->uploadFileCase($_FILES, $case, $casesFields, $currentUsrUid, $appUid, $delIndex);
|
||||
}
|
||||
}
|
||||
$wsBaseInstance = new WsBase();
|
||||
$result = $wsBaseInstance->derivateCase(
|
||||
$casesFields['CURRENT_USER_UID'], $appUid, $delIndex, true
|
||||
@@ -106,18 +112,6 @@ if (PMLicensedFeatures::getSingleton()
|
||||
$dataAbeRequests['ABE_REQ_ANSWERED'] = 1;
|
||||
$code == 0 ? uploadAbeRequest($dataAbeRequests) : '';
|
||||
|
||||
if (isset($_FILES ['form'])) {
|
||||
if (isset($_FILES["form"]["name"]) && count($_FILES["form"]["name"]) > 0) {
|
||||
//It is very important to obtain APP_DATA values because they may have changed in the derivation.
|
||||
$case = new Cases();
|
||||
$appFields = $case->loadCase($appUid);
|
||||
$casesFields["APP_DATA"] = array_merge($casesFields["APP_DATA"], $appFields["APP_DATA"]);
|
||||
|
||||
$oInputDocument = new \ProcessMaker\BusinessModel\Cases\InputDocument();
|
||||
$oInputDocument->uploadFileCase($_FILES, $case, $casesFields, $currentUsrUid, $appUid, $delIndex);
|
||||
}
|
||||
}
|
||||
|
||||
$assign = $result['message'];
|
||||
$aMessage['MESSAGE'] = '<strong>' . G::loadTranslation('ID_ABE_INFORMATION_SUBMITTED') . '</strong>';
|
||||
} else {
|
||||
|
||||
@@ -378,6 +378,13 @@ function removeDocument($params)
|
||||
return $res;
|
||||
}
|
||||
|
||||
/**
|
||||
* Send Message
|
||||
*
|
||||
* @param object $params
|
||||
* @return array
|
||||
*
|
||||
*/
|
||||
function SendMessage($params)
|
||||
{
|
||||
$vsResult = isValidSession($params->sessionId);
|
||||
@@ -393,7 +400,22 @@ function SendMessage($params)
|
||||
}
|
||||
|
||||
$ws = new WsBase();
|
||||
$res = $ws->sendMessage($params->caseId, $params->from, $params->to, $params->cc, $params->bcc, $params->subject, $params->template);
|
||||
$res = $ws->sendMessage(
|
||||
$params->caseId,
|
||||
$params->from,
|
||||
$params->to,
|
||||
$params->cc,
|
||||
$params->bcc,
|
||||
$params->subject,
|
||||
$params->template,
|
||||
null,
|
||||
null,
|
||||
true,
|
||||
0,
|
||||
[],
|
||||
0,
|
||||
WsBase::MESSAGE_TYPE_SOAP
|
||||
);
|
||||
|
||||
return $res->getPayloadArray();
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@ use ResultSet;
|
||||
use SpoolRun;
|
||||
use stdClass;
|
||||
use Users as ClassUsers;
|
||||
use WsBase;
|
||||
|
||||
/**
|
||||
* Description of ActionsByEmailService
|
||||
@@ -366,6 +367,9 @@ class ActionsByEmail
|
||||
*
|
||||
* @return string $message
|
||||
* @throws Exception
|
||||
*
|
||||
* @see workflow/engine/methods/actionsByEmail/actionsByEmailAjax.php
|
||||
* @see \ProcessMaker\Services\Api\ActionsByEmail::forwardMail()
|
||||
*/
|
||||
public function forwardMail(array $arrayData)
|
||||
{
|
||||
@@ -397,7 +401,7 @@ class ActionsByEmail
|
||||
'',
|
||||
$dataRes['APP_UID'],
|
||||
$dataRes['DEL_INDEX'],
|
||||
'TEST',
|
||||
WsBase::MESSAGE_TYPE_ACTIONS_BY_EMAIL,
|
||||
$dataRes['ABE_REQ_SUBJECT'],
|
||||
$aSetup['MESS_ACCOUNT'],
|
||||
$dataRes['ABE_REQ_SENT_TO'],
|
||||
|
||||
@@ -14,6 +14,7 @@ use ProcessMaker\Util\Common;
|
||||
use Propel;
|
||||
use ResultSet;
|
||||
use UsersPeer;
|
||||
use WsBase;
|
||||
|
||||
class EmailEvent
|
||||
{
|
||||
@@ -455,11 +456,13 @@ class EmailEvent
|
||||
* @param string $prj_uid Unique id of Project
|
||||
* @param string $eventUid Unique id of event
|
||||
* @param array $arrayApplicationData Case data
|
||||
* @param int $tasId id of task
|
||||
*
|
||||
* @return void
|
||||
* @throws Exception
|
||||
* @see \Derivation::executeEvent()
|
||||
*/
|
||||
public function sendEmail($appUID, $prj_uid, $eventUid, $arrayApplicationData)
|
||||
public function sendEmail($appUID, $prj_uid, $eventUid, $arrayApplicationData, $tasId = 0)
|
||||
{
|
||||
if (!$this->existsEvent($prj_uid, $eventUid)) {
|
||||
throw new Exception(G::LoadTranslation('ID_EMAIL_EVENT_DEFINITION_DOES_NOT_EXIST'));
|
||||
@@ -511,7 +514,9 @@ class EmailEvent
|
||||
}
|
||||
}
|
||||
if (!empty($emailTo)) {
|
||||
PMFSendMessage(
|
||||
$ws = new WsBase();
|
||||
$ws->setTaskId($tasId);
|
||||
$ws->sendMessage(
|
||||
$appUID,
|
||||
G::buildFrom($configEmailData),
|
||||
$emailTo,
|
||||
@@ -523,7 +528,9 @@ class EmailEvent
|
||||
[],
|
||||
true,
|
||||
0,
|
||||
$configEmailData
|
||||
$configEmailData,
|
||||
0,
|
||||
WsBase::MESSAGE_TYPE_EMAIL_EVENT
|
||||
);
|
||||
} else {
|
||||
Bootstrap::registerMonolog(
|
||||
|
||||
@@ -8,6 +8,7 @@ use G;
|
||||
use ProcessMaker\Core\System;
|
||||
use SpoolRun;
|
||||
use TemplatePower;
|
||||
use WsBase;
|
||||
|
||||
class EmailServer
|
||||
{
|
||||
@@ -158,6 +159,7 @@ class EmailServer
|
||||
*
|
||||
* @return array, return array with result of send test mail
|
||||
* @throws Exception
|
||||
* @see EmailServer->testConnectionByStep()
|
||||
*/
|
||||
public function sendTestMail(array $arrayData)
|
||||
{
|
||||
@@ -205,7 +207,7 @@ class EmailServer
|
||||
'',
|
||||
'',
|
||||
0,
|
||||
'TEST',
|
||||
WsBase::MESSAGE_TYPE_TEST_EMAIL,
|
||||
G::LoadTranslation("ID_MESS_TEST_SUBJECT"),
|
||||
G::buildFrom($configuration),
|
||||
$arrayData["TO"],
|
||||
|
||||
@@ -33,20 +33,39 @@ Ext.onReady(function(){
|
||||
'<span> {APP_PRO_TITLE}</span>',
|
||||
'</div></tpl>'
|
||||
);
|
||||
|
||||
var columnRenderer = function(data, metadata, record, rowIndex,columnIndex, store) {
|
||||
var new_text = metadata.style.split(';');
|
||||
var style = '';
|
||||
for (var i = 0; i < new_text.length -1 ; i++) {
|
||||
var chain = new_text[i] +";";
|
||||
if (chain.indexOf('width') == -1) {
|
||||
style = style + chain;
|
||||
}
|
||||
}
|
||||
metadata.attr = 'ext:qtip="' + data + '" style="'+ style +' white-space: normal; "';
|
||||
if(metadata.id == PMExt.emailConst.taskColumn.name){
|
||||
if((PMExt.emailConst.appMsgTypeWithoutTask.includes(record.data.APP_MSG_TYPE)) || (PMExt.emailConst.appMsgTypeWithConditionalTask.includes(record.data.APP_MSG_TYPE) && record.data.DEL_INDEX == 0)){
|
||||
data = PMExt.emailConst.taskColumn.defaultValue;
|
||||
}
|
||||
}
|
||||
if(metadata.id == PMExt.emailConst.caseColumn.name){
|
||||
if(PMExt.emailConst.appMsgTypeWithoutCase.includes(record.data.APP_MSG_TYPE)){
|
||||
data = PMExt.emailConst.caseColumn.defaultValue;
|
||||
}
|
||||
}
|
||||
if(metadata.id == PMExt.emailConst.processColumn.name){
|
||||
if(PMExt.emailConst.appMsgTypeWithoutProcess.includes(record.data.APP_MSG_TYPE)){
|
||||
data = PMExt.emailConst.processColumn.defaultValue;
|
||||
}
|
||||
}
|
||||
if(metadata.id == PMExt.emailConst.numberColumn.name){
|
||||
if(PMExt.emailConst.appMsgTypeWithoutNumber.includes(record.data.APP_MSG_TYPE)){
|
||||
data = PMExt.emailConst.numberColumn.defaultValue;
|
||||
}
|
||||
}
|
||||
var new_text = metadata.style.split(';');
|
||||
var style = '';
|
||||
for (var i = 0; i < new_text.length -1 ; i++) {
|
||||
var chain = new_text[i] +";";
|
||||
if (chain.indexOf('width') == -1) {
|
||||
style = style + chain;
|
||||
}
|
||||
}
|
||||
metadata.attr = 'ext:qtip="' + data + '" style="'+ style +' white-space: normal; "';
|
||||
|
||||
return PMExt.escapeHtml(data);
|
||||
};
|
||||
return PMExt.escapeHtml(data);
|
||||
};
|
||||
|
||||
var dateFrom = new Ext.form.DateField({
|
||||
id:'dateFrom',
|
||||
|
||||
Reference in New Issue
Block a user