Merge remote-tracking branch 'upstream/3.1' into FBI-790
This commit is contained in:
@@ -267,7 +267,7 @@ class DataBaseMaintenance
|
|||||||
// mysql_escape_string("';");
|
// mysql_escape_string("';");
|
||||||
if (! @mysql_query( $sql )) {
|
if (! @mysql_query( $sql )) {
|
||||||
$ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
|
$ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
|
||||||
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'mysql.log');
|
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'processmaker.log');
|
||||||
$varRes = mysql_error() . "\n";
|
$varRes = mysql_error() . "\n";
|
||||||
G::outRes( $varRes );
|
G::outRes( $varRes );
|
||||||
return false;
|
return false;
|
||||||
@@ -288,7 +288,7 @@ class DataBaseMaintenance
|
|||||||
$sql = "LOAD DATA INFILE '$backupFile' INTO TABLE $tableName FIELDS TERMINATED BY '\t|\t' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\t\t\r\r\n'";
|
$sql = "LOAD DATA INFILE '$backupFile' INTO TABLE $tableName FIELDS TERMINATED BY '\t|\t' OPTIONALLY ENCLOSED BY '\"' LINES TERMINATED BY '\t\t\r\r\n'";
|
||||||
if (! @mysql_query( $sql )) {
|
if (! @mysql_query( $sql )) {
|
||||||
$ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
|
$ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
|
||||||
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'mysql.log');
|
Bootstrap::registerMonolog('MysqlCron', 400, mysql_error(), array('sql'=>$sql), $ws, 'processmaker.log');
|
||||||
$varRes = mysql_error() . "\n";
|
$varRes = mysql_error() . "\n";
|
||||||
G::outRes( $varRes );
|
G::outRes( $varRes );
|
||||||
return false;
|
return false;
|
||||||
@@ -520,7 +520,7 @@ class DataBaseMaintenance
|
|||||||
* @return string $tableSchema
|
* @return string $tableSchema
|
||||||
*/
|
*/
|
||||||
function getSchemaFromTable ($tablename)
|
function getSchemaFromTable ($tablename)
|
||||||
{
|
{
|
||||||
//$tableSchema = "/* Structure for table `$tablename` */\n";
|
//$tableSchema = "/* Structure for table `$tablename` */\n";
|
||||||
//$tableSchema .= "DROP TABLE IF EXISTS `$tablename`;\n\n";
|
//$tableSchema .= "DROP TABLE IF EXISTS `$tablename`;\n\n";
|
||||||
$tableSchema = "";
|
$tableSchema = "";
|
||||||
|
|||||||
@@ -22,7 +22,6 @@ class PMException extends Exception
|
|||||||
|
|
||||||
public function registerErrorLog($error, $token){
|
public function registerErrorLog($error, $token){
|
||||||
$ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
|
$ws = (defined("SYS_SYS"))? SYS_SYS : "Wokspace Undefined";
|
||||||
Bootstrap::registerMonolog('ExceptionCron', 400, $error->getMessage(), array('token'=>$token), $ws, 'exception.log');
|
Bootstrap::registerMonolog('ExceptionCron', 400, $error->getMessage(), array('token'=>$token), $ws, 'processmaker.log');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4129,7 +4129,7 @@ class Processes
|
|||||||
try {
|
try {
|
||||||
$result = $scriptTask->create($processUid, $record);
|
$result = $scriptTask->create($processUid, $record);
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
Bootstrap::registerMonolog('DataError', 400, $e->getMessage(), $record, SYS_SYS, 'processImporter.log');
|
Bootstrap::registerMonolog('DataError', 400, $e->getMessage(), $record, SYS_SYS, 'processmaker.log');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|||||||
@@ -475,7 +475,7 @@ class EmailEvent
|
|||||||
\PMFSendMessage($appUID, $configEmailData['MESS_ACCOUNT'], $emailTo, '', '', $subject,
|
\PMFSendMessage($appUID, $configEmailData['MESS_ACCOUNT'], $emailTo, '', '', $subject,
|
||||||
$contentFile['prf_filename'], array(), array(), true, 0, $configEmailData);
|
$contentFile['prf_filename'], array(), array(), true, 0, $configEmailData);
|
||||||
} else {
|
} else {
|
||||||
\Bootstrap::registerMonolog('EmailEventMailError', 200, \G::LoadTranslation('ID_EMAIL_EVENT_CONFIGURATION_EMAIL', array($eventUid, $prj_uid)), ['eventUid' => $eventUid, 'prj_uid' => $prj_uid], SYS_SYS, 'emailEvent.log');
|
\Bootstrap::registerMonolog('EmailEventMailError', 200, \G::LoadTranslation('ID_EMAIL_EVENT_CONFIGURATION_EMAIL', array($eventUid, $prj_uid)), ['eventUid' => $eventUid, 'prj_uid' => $prj_uid], SYS_SYS, 'processmaker.log');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -530,4 +530,3 @@ class EmailEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -303,7 +303,7 @@ class Light
|
|||||||
$response['caseNumber'] = $aData['CASE_NUMBER'];
|
$response['caseNumber'] = $aData['CASE_NUMBER'];
|
||||||
|
|
||||||
//Log
|
//Log
|
||||||
\Bootstrap::registerMonolog('create-case', 200, "Create case", ['application_uid' => $aData['APPLICATION'], 'usr_uid' => $userId], SYS_SYS, 'mobileLogs.log');
|
\Bootstrap::registerMonolog('MobileCreateCase', 200, "Create case", ['application_uid' => $aData['APPLICATION'], 'usr_uid' => $userId], SYS_SYS, 'processmaker.log');
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
$response['status'] = 'failure';
|
$response['status'] = 'failure';
|
||||||
$response['message'] = $e->getMessage();
|
$response['message'] = $e->getMessage();
|
||||||
@@ -539,7 +539,7 @@ class Light
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Log
|
//Log
|
||||||
\Bootstrap::registerMonolog('route-case', 200, 'Route case', ['application_uid' => $applicationUid, 'usr_uid' => $userUid], SYS_SYS, 'mobileLogs.log');
|
\Bootstrap::registerMonolog('MobileRouteCase', 200, 'Route case', ['application_uid' => $applicationUid, 'usr_uid' => $userUid], SYS_SYS, 'processmaker.log');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
@@ -1343,4 +1343,3 @@ class Light
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -661,10 +661,9 @@ class MessageApplication
|
|||||||
,'inpDocUid'=> $inpDocUid
|
,'inpDocUid'=> $inpDocUid
|
||||||
,'url' => $url
|
,'url' => $url
|
||||||
);
|
);
|
||||||
\Bootstrap::registerMonolog('MessageEventCron', $level, $message, $aContext, SYS_SYS, 'messageevent.log');
|
\Bootstrap::registerMonolog('MessageEventCron', $level, $message, $aContext, SYS_SYS, 'processmaker.log');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1211,7 +1211,7 @@ class TimerEvent
|
|||||||
,'inpDocUid'=> $inpDocUid
|
,'inpDocUid'=> $inpDocUid
|
||||||
,'url' => $url
|
,'url' => $url
|
||||||
);
|
);
|
||||||
\Bootstrap::registerMonolog('TimerEventCron', $level, $message, $aContext, SYS_SYS, 'timerevent.log');
|
\Bootstrap::registerMonolog('TimerEventCron', $level, $message, $aContext, SYS_SYS, 'processmaker.log');
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
throw $e;
|
throw $e;
|
||||||
}
|
}
|
||||||
@@ -1733,4 +1733,3 @@ class TimerEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -685,9 +685,13 @@ class WebEntryEvent
|
|||||||
}
|
}
|
||||||
|
|
||||||
//Route
|
//Route
|
||||||
if (isset($arrayData["ACT_UID"]) && $arrayData["ACT_UID"] != $arrayWebEntryEventData["ACT_UID"]) {
|
if (array_key_exists('ACT_UID', $arrayData)) {
|
||||||
//Delete
|
if ($arrayData['ACT_UID'] != $arrayWebEntryEventData['ACT_UID']) {
|
||||||
$result = $task->deleteAllRoutesOfTask($arrayWebEntryEventData["PRJ_UID"], $arrayWebEntryEventData["WEE_WE_TAS_UID"], true);
|
//Delete
|
||||||
|
$result = $task->deleteAllRoutesOfTask(
|
||||||
|
$arrayWebEntryEventData['PRJ_UID'], $arrayWebEntryEventData['WEE_WE_TAS_UID'], true
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
//Add
|
//Add
|
||||||
$workflow = \ProcessMaker\Project\Workflow::load($arrayWebEntryEventData["PRJ_UID"]);
|
$workflow = \ProcessMaker\Project\Workflow::load($arrayWebEntryEventData["PRJ_UID"]);
|
||||||
@@ -1001,4 +1005,3 @@ class WebEntryEvent
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -351,7 +351,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
//$this->updateEventStartObjects($data["FLO_ELEMENT_ORIGIN"], $data["FLO_ELEMENT_DEST"]);
|
//$this->updateEventStartObjects($data["FLO_ELEMENT_ORIGIN"], $data["FLO_ELEMENT_DEST"]);
|
||||||
|
|
||||||
//WebEntry-Event - Update
|
//WebEntry-Event - Update
|
||||||
$this->updateWebEntryEventByEvent($data["FLO_ELEMENT_ORIGIN"], array("ACT_UID" => $data["FLO_ELEMENT_DEST"]));
|
$this->__updateWebEntryEventByEvent($data['FLO_ELEMENT_ORIGIN'], ['ACT_UID' => $data['FLO_ELEMENT_DEST']]);
|
||||||
break;
|
break;
|
||||||
case "bpmnEvent":
|
case "bpmnEvent":
|
||||||
$messageEventRelationUid = $this->createMessageEventRelationByBpmnFlow(\BpmnFlowPeer::retrieveByPK($floUid));
|
$messageEventRelationUid = $this->createMessageEventRelationByBpmnFlow(\BpmnFlowPeer::retrieveByPK($floUid));
|
||||||
@@ -401,7 +401,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
//$this->updateEventStartObjects($flowCurrent->getFloElementOrigin(), $flowCurrent->getFloElementDest());
|
//$this->updateEventStartObjects($flowCurrent->getFloElementOrigin(), $flowCurrent->getFloElementDest());
|
||||||
|
|
||||||
//WebEntry-Event - Update
|
//WebEntry-Event - Update
|
||||||
$this->updateWebEntryEventByEvent($flowCurrent->getFloElementOrigin(), array("ACT_UID" => $flowCurrent->getFloElementDest()));
|
$this->__updateWebEntryEventByEvent($flowCurrent->getFloElementOrigin(), ['ACT_UID' => $flowCurrent->getFloElementDest()]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -487,11 +487,9 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$event = \BpmnEventPeer::retrieveByPK($flow->getFloElementOrigin());
|
$event = \BpmnEventPeer::retrieveByPK($flow->getFloElementOrigin());
|
||||||
|
|
||||||
if (!is_null($event) && $event->getEvnType() == "START" && $event->getEvnMarker() == "EMPTY") {
|
if (!is_null($event) && $event->getEvnType() == "START" && $event->getEvnMarker() == "EMPTY") {
|
||||||
$activity = \BpmnActivityPeer::retrieveByPK($flow->getFloElementDest());
|
|
||||||
|
|
||||||
//Remove as start Task
|
//Remove as start Task
|
||||||
if (!is_null($activity)) {
|
if (!is_null(\BpmnActivityPeer::retrieveByPK($flow->getFloElementDest()))) {
|
||||||
$this->wp->setStartTask($activity->getActUid(), false);
|
$this->wp->setStartTask($flow->getFloElementDest(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -500,7 +498,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
|
|
||||||
//WebEntry-Event - Update
|
//WebEntry-Event - Update
|
||||||
if (is_null($bpmnFlow)) {
|
if (is_null($bpmnFlow)) {
|
||||||
$this->updateWebEntryEventByEvent($flow->getFloElementOrigin(), array("WEE_STATUS" => "DISABLED"));
|
$this->__updateWebEntryEventByEvent($flow->getFloElementOrigin(), ['WEE_STATUS' => 'DISABLED']);
|
||||||
}
|
}
|
||||||
} elseif ($flow->getFloElementOriginType() == "bpmnActivity" &&
|
} elseif ($flow->getFloElementOriginType() == "bpmnActivity" &&
|
||||||
$flow->getFloElementDestType() == "bpmnEvent") {
|
$flow->getFloElementDestType() == "bpmnEvent") {
|
||||||
@@ -509,11 +507,9 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$event = \BpmnEventPeer::retrieveByPK($flow->getFloElementDest());
|
$event = \BpmnEventPeer::retrieveByPK($flow->getFloElementDest());
|
||||||
|
|
||||||
if (!is_null($event) && $event->getEvnType() == "END" && $event->getEvnMarker() == "EMPTY") {
|
if (!is_null($event) && $event->getEvnType() == "END" && $event->getEvnMarker() == "EMPTY") {
|
||||||
$activity = \BpmnActivityPeer::retrieveByPK($flow->getFloElementOrigin());
|
|
||||||
|
|
||||||
//Remove as end Task
|
//Remove as end Task
|
||||||
if (! is_null($activity)) {
|
if (!is_null(\BpmnActivityPeer::retrieveByPK($flow->getFloElementOrigin()))) {
|
||||||
$this->wp->setEndTask($activity->getActUid(), false);
|
$this->wp->setEndTask($flow->getFloElementOrigin(), false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -549,7 +545,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
// TODO Complete for other routes, activity->activity, activity->gateway and viceversa
|
// TODO Complete for other routes, activity->activity, activity->gateway and viceversa
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateEventActivityDefinition(\BpmnEvent $bpmnEvent, $flagStartTask)
|
private function __updateEventActivityDefinition(\BpmnEvent $bpmnEvent, $flagStartTask)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
if ($bpmnEvent->getEvnType() == "START") {
|
if ($bpmnEvent->getEvnType() == "START") {
|
||||||
@@ -568,9 +564,10 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
//Setting as start Task
|
//Setting as start Task
|
||||||
//or
|
//or
|
||||||
//Remove as start Task
|
//Remove as start Task
|
||||||
$bwp = new self;
|
if (!is_null(\BpmnActivityPeer::retrieveByPK($arrayFlowData['FLO_ELEMENT_DEST']))) {
|
||||||
if ($bwp->getActivity($arrayFlowData["FLO_ELEMENT_DEST"])) {
|
$this->wp->setStartTask($arrayFlowData['FLO_ELEMENT_DEST'], $flagStartTask);
|
||||||
$this->wp->setStartTask($arrayFlowData["FLO_ELEMENT_DEST"], $flagStartTask);
|
|
||||||
|
$this->__updateWebEntryEventByEvent($bpmnEvent->getEvnUid());
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -673,7 +670,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
if ((isset($arrayEventData["EVN_TYPE"]) && $arrayEventData["EVN_TYPE"] != $bpmnEvent->getEvnType()) ||
|
if ((isset($arrayEventData["EVN_TYPE"]) && $arrayEventData["EVN_TYPE"] != $bpmnEvent->getEvnType()) ||
|
||||||
(isset($arrayEventData["EVN_MARKER"]) && $arrayEventData["EVN_MARKER"] != $bpmnEvent->getEvnMarker())
|
(isset($arrayEventData["EVN_MARKER"]) && $arrayEventData["EVN_MARKER"] != $bpmnEvent->getEvnMarker())
|
||||||
) {
|
) {
|
||||||
$this->updateEventActivityDefinition($bpmnEvent, false);
|
$this->__updateEventActivityDefinition($bpmnEvent, false);
|
||||||
$this->removeEventDefinition($bpmnEvent);
|
$this->removeEventDefinition($bpmnEvent);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -688,7 +685,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
try {
|
try {
|
||||||
$bpmnEvent = \BpmnEventPeer::retrieveByPK($eventUid);
|
$bpmnEvent = \BpmnEventPeer::retrieveByPK($eventUid);
|
||||||
|
|
||||||
$this->updateEventActivityDefinition($bpmnEvent, false);
|
$this->__updateEventActivityDefinition($bpmnEvent, false);
|
||||||
$this->removeEventDefinition($bpmnEvent);
|
$this->removeEventDefinition($bpmnEvent);
|
||||||
|
|
||||||
parent::removeEvent($eventUid);
|
parent::removeEvent($eventUid);
|
||||||
@@ -1167,7 +1164,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$this->mapBpmnEventToWorkflowRoutes($taskUid, $event["EVN_UID"]);
|
$this->mapBpmnEventToWorkflowRoutes($taskUid, $event["EVN_UID"]);
|
||||||
break;
|
break;
|
||||||
case "EMPTY":
|
case "EMPTY":
|
||||||
$this->updateEventActivityDefinition(\BpmnEventPeer::retrieveByPK($event["EVN_UID"]), true);
|
$this->__updateEventActivityDefinition(\BpmnEventPeer::retrieveByPK($event['EVN_UID']), true);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@@ -1973,7 +1970,7 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$this->wp->setDisabled($value);
|
$this->wp->setDisabled($value);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function updateWebEntryEventByEvent($eventUid, array $arrayData)
|
private function __updateWebEntryEventByEvent($eventUid, array $arrayData = null)
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
$bpmnEvent = \BpmnEventPeer::retrieveByPK($eventUid);
|
$bpmnEvent = \BpmnEventPeer::retrieveByPK($eventUid);
|
||||||
@@ -1987,7 +1984,11 @@ class BpmnWorkflow extends Project\Bpmn
|
|||||||
$bpmn = \ProcessMaker\Project\Bpmn::load($bpmnEvent->getPrjUid());
|
$bpmn = \ProcessMaker\Project\Bpmn::load($bpmnEvent->getPrjUid());
|
||||||
$bpmnProject = $bpmn->getProject("object");
|
$bpmnProject = $bpmn->getProject("object");
|
||||||
|
|
||||||
$arrayResult = $webEntryEvent->update($arrayWebEntryEventData["WEE_UID"], $bpmnProject->getPrjAuthor(), $arrayData);
|
$arrayResult = $webEntryEvent->update(
|
||||||
|
$arrayWebEntryEventData['WEE_UID'],
|
||||||
|
$bpmnProject->getPrjAuthor(),
|
||||||
|
(!is_null($arrayData))? $arrayData : $arrayWebEntryEventData
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (\Exception $e) {
|
} catch (\Exception $e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user