Resolve conflict in G
This commit is contained in:
@@ -5676,36 +5676,36 @@ class G
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Direct case link mobile
|
* Add log of execution of triggers
|
||||||
* @access public
|
* @param $data
|
||||||
*
|
* @param string $error
|
||||||
* @param string
|
* @param string $typeError
|
||||||
* @param int
|
* @param int $executionTime
|
||||||
*
|
|
||||||
* @return string
|
|
||||||
*/
|
*/
|
||||||
public static function caseLinkMobile($applicationUid, $delIndex = 0)
|
public static function logTriggerExecution($data, $error = 'NO-ERROR', $typeError = '', $executionTime = 0)
|
||||||
{
|
{
|
||||||
$application = ApplicationPeer::retrieveByPK($applicationUid);
|
if ((!empty($data['_CODE_']) || $typeError == 'FATAL_ERROR') && isset($data['_DATA_TRIGGER_']) &&
|
||||||
|
!isset($data['_DATA_TRIGGER_']['_TRI_LOG_'])
|
||||||
|
) {
|
||||||
|
$lg = Bootstrap::getDefaultContextLog();
|
||||||
|
$lg['TRI_TITLE'] = isset($data['_DATA_TRIGGER_']['TRI_TITLE']) ? $data['_DATA_TRIGGER_']['TRI_TITLE'] : '';
|
||||||
|
$lg['TRI_UID'] = isset($data['_DATA_TRIGGER_']['TRI_UID']) ? $data['_DATA_TRIGGER_']['TRI_UID'] : '';
|
||||||
|
$lg['TRI_CODE'] = isset($data['_DATA_TRIGGER_']['TRI_WEBBOT']) ? $data['_DATA_TRIGGER_']['TRI_WEBBOT'] : '';
|
||||||
|
$lg['TRI_EXECUTION_TIME'] = $executionTime;
|
||||||
|
$lg['TRI_MSG_ERROR'] = $error;
|
||||||
|
$lg['APP_UID'] = isset($data['APPLICATION']) ? $data['APPLICATION'] : '';
|
||||||
|
$lg['PRO_UID'] = isset($data['PROCESS']) ? $data['PROCESS'] : '';
|
||||||
|
$lg['TAS_UID'] = isset($data['TASK']) ? $data['TASK'] : '';
|
||||||
|
$lg['USR_UID'] = isset($data['USER_LOGGED']) ? $data['USER_LOGGED'] : '';
|
||||||
|
|
||||||
if (is_null($application) || !is_numeric($delIndex) || $delIndex < 0) {
|
Bootstrap::registerMonolog(
|
||||||
return false;
|
(empty($sError)) ? 'TriggerExecution' : 'TriggerExecutionError',
|
||||||
|
(empty($sError)) ? 200 : 400,
|
||||||
|
(empty($sError)) ? 'Trigger Execution' : 'Trigger Execution Error',
|
||||||
|
$lg, $lg['workspace'], 'processmaker.log');
|
||||||
|
|
||||||
|
$_SESSION['_DATA_TRIGGER_']['_TRI_LOG_'] = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($delIndex != 0) {
|
|
||||||
$appDelegation = AppDelegationPeer::retrieveByPK($applicationUid, $delIndex);
|
|
||||||
|
|
||||||
if (is_null($appDelegation)) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
$uri = 'processmakerMobile://' . $applicationUid . '/' . $delIndex;
|
|
||||||
} else {
|
|
||||||
$uri = 'processmakerMobile://' . $applicationUid;
|
|
||||||
}
|
|
||||||
|
|
||||||
//Return
|
|
||||||
return $uri;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user