本文整理汇总了PHP中Cases::loadTriggers方法的典型用法代码示例。如果您正苦于以下问题:PHP Cases::loadTriggers方法的具体用法?PHP Cases::loadTriggers怎么用?PHP Cases::loadTriggers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cases
的用法示例。
在下文中一共展示了Cases::loadTriggers方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: unset
} else {
$_SESSION['TRIGGER_DEBUG']['ISSET'] = 0;
$_SESSION['PMDEBUGGER'] = false;
}
//cleaning debug variables
if (!isset($_GET['breakpoint'])) {
if (isset($_SESSION['TRIGGER_DEBUG']['info'])) {
unset($_SESSION['TRIGGER_DEBUG']['info']);
}
if (!isset($_SESSION['_NO_EXECUTE_TRIGGERS_'])) {
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = array();
}
$_SESSION['TRIGGER_DEBUG']['DATA'] = array();
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = array();
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = array();
$triggers = $oCase->loadTriggers($_SESSION['TASK'], $_GET['TYPE'], $_GET['UID'], 'BEFORE');
$_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] = count($triggers);
$_SESSION['TRIGGER_DEBUG']['TIME'] = 'BEFORE';
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = $oCase->getTriggerNames($triggers);
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = $triggers;
}
if (!isset($_SESSION['_NO_EXECUTE_TRIGGERS_'])) {
//Execute before triggers - Start
$Fields['APP_DATA'] = $oCase->ExecuteTriggers($_SESSION['TASK'], $_GET['TYPE'], $_GET['UID'], 'BEFORE', $Fields['APP_DATA']);
$Fields['DEL_INDEX'] = $_SESSION['INDEX'];
$Fields['TAS_UID'] = $_SESSION['TASK'];
//Execute before triggers - End
} else {
unset($_SESSION['_NO_EXECUTE_TRIGGERS_']);
$Fields['DEL_INDEX'] = $_SESSION['INDEX'];
示例2: derivateCase
//.........这里部分代码省略.........
$oCase = new Cases();
$appFields = $oCase->loadCase( $caseId, $delIndex );
if (is_null( $appFields["DEL_INIT_DATE"] )) {
$oCase->setDelInitDate( $caseId, $delIndex );
$appFields = $oCase->loadCase( $caseId, $delIndex );
}
$appFields["APP_DATA"]["APPLICATION"] = $caseId;
if (! isset( $_SESSION["PROCESS"] )) {
$_SESSION["PROCESS"] = $appFields["PRO_UID"];
}
if ($bExecuteTriggersBeforeAssignment) {
//Execute triggers before assignment
$aTriggers = $oCase->loadTriggers( $appdel['TAS_UID'], 'ASSIGN_TASK', - 1, 'BEFORE' );
if (count( $aTriggers ) > 0) {
$varTriggers = $varTriggers . "<br /><b>-= Before Assignment =-</b><br />";
$oPMScript = new PMScript();
foreach ($aTriggers as $aTrigger) {
//$appFields = $oCase->loadCase( $caseId );
//$appFields['APP_DATA']['APPLICATION'] = $caseId;
//Set variables
$params = new stdClass();
$params->appData = $appFields["APP_DATA"];
if ($this->stored_system_variables) {
示例3: addCasesInputDocument
/**
* Get data of Cases InputDocument
*
* @param string $applicationUid
* @param string $taskUid
* @param string $appDocComment
* @param string $inputDocumentUid
* @param string $userUid
*
* return array Return an array with data of an InputDocument
*/
public function addCasesInputDocument($applicationUid, $taskUid, $appDocComment, $inputDocumentUid, $userUid)
{
try {
if ((isset( $_FILES['form'] )) && ($_FILES['form']['error'] != 0)) {
$code = $_FILES['form']['error'];
switch ($code) {
case UPLOAD_ERR_INI_SIZE:
$message = \G::LoadTranslation( 'ID_UPLOAD_ERR_INI_SIZE' );
break;
case UPLOAD_ERR_FORM_SIZE:
$message = \G::LoadTranslation( 'ID_UPLOAD_ERR_FORM_SIZE' );
break;
case UPLOAD_ERR_PARTIAL:
$message = \G::LoadTranslation( 'ID_UPLOAD_ERR_PARTIAL' );
break;
case UPLOAD_ERR_NO_FILE:
$message = \G::LoadTranslation( 'ID_UPLOAD_ERR_NO_FILE' );
break;
case UPLOAD_ERR_NO_TMP_DIR:
$message = \G::LoadTranslation( 'ID_UPLOAD_ERR_NO_TMP_DIR' );
break;
case UPLOAD_ERR_CANT_WRITE:
$message = \G::LoadTranslation( 'ID_UPLOAD_ERR_CANT_WRITE' );
break;
case UPLOAD_ERR_EXTENSION:
$message = \G::LoadTranslation( 'ID_UPLOAD_ERR_EXTENSION' );
break;
default:
$message = \G::LoadTranslation( 'ID_UPLOAD_ERR_UNKNOWN' );
break;
}
\G::SendMessageText( $message, "ERROR" );
$backUrlObj = explode( "sys" . SYS_SYS, $_SERVER['HTTP_REFERER'] );
\G::header( "location: " . "/sys" . SYS_SYS . $backUrlObj[1] );
die();
}
\G::LoadClass("case");
$appDocUid = \G::generateUniqueID();
$docVersion = '';
$appDocType = 'INPUT';
$case = new \Cases();
$delIndex = \AppDelegation::getCurrentIndex($applicationUid);
$case->thisIsTheCurrentUser($applicationUid, $delIndex, $userUid, "REDIRECT", "casesListExtJs");
//Load the fields
$arrayField = $case->loadCase($applicationUid);
$arrayField["APP_DATA"] = array_merge($arrayField["APP_DATA"], \G::getSystemConstants());
//Triggers
$arrayTrigger = $case->loadTriggers($taskUid, "INPUT_DOCUMENT", $inputDocumentUid, "AFTER");
//Add Input Document
if (empty($_FILES)) {
throw new \Exception(\G::LoadTranslation("ID_CASES_INPUT_FILENAME_DOES_NOT_EXIST"));
}
if (!$_FILES["form"]["error"]) {
$_FILES["form"]["error"] = 0;
}
if (isset($_FILES) && isset($_FILES["form"]) && count($_FILES["form"]) > 0) {
$appDocUid = $case->addInputDocument($inputDocumentUid,
$appDocUid,
$docVersion,
$appDocType,
$appDocComment,
'',
$applicationUid,
$delIndex,
$taskUid,
$userUid,
"xmlform",
$_FILES["form"]["name"],
$_FILES["form"]["error"],
$_FILES["form"]["tmp_name"]);
}
//Trigger - Execute after - Start
$arrayField["APP_DATA"] = $case->executeTriggers ($taskUid,
"INPUT_DOCUMENT",
$inputDocumentUid,
"AFTER",
$arrayField["APP_DATA"]);
//Trigger - Execute after - End
//Save data
$arrayData = array();
$arrayData["APP_NUMBER"] = $arrayField["APP_NUMBER"];
//$arrayData["APP_PROC_STATUS"] = $arrayField["APP_PROC_STATUS"];
$arrayData["APP_DATA"] = $arrayField["APP_DATA"];
$arrayData["DEL_INDEX"] = $delIndex;
$arrayData["TAS_UID"] = $taskUid;
$case->updateCase($applicationUid, $arrayData);
return($this->getCasesInputDocument($applicationUid, $userUid, $appDocUid));
} catch (\Exception $e) {
throw $e;
//.........这里部分代码省略.........
示例4: intval
}
G::LoadClass("case");
$inputDocumentUid = $_GET["UID"];
//$_POST["form"]["DOC_UID"]
$appDocUid = $_POST["form"]["APP_DOC_UID"];
$docVersion = intval($_POST["form"]["docVersion"]);
$appDocType = $_POST["form"]["APP_DOC_TYPE"];
$appDocComment = isset($_POST["form"]["APP_DOC_COMMENT"]) ? $_POST["form"]["APP_DOC_COMMENT"] : "";
$actionType = $_POST["form"]["actionType"];
$case = new Cases();
$case->thisIsTheCurrentUser($_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["USER_LOGGED"], "REDIRECT", "casesListExtJs");
//Load the fields
$arrayField = $case->loadCase($_SESSION["APPLICATION"]);
$arrayField["APP_DATA"] = array_merge($arrayField["APP_DATA"], G::getSystemConstants());
//Triggers
$arrayTrigger = $case->loadTriggers($_SESSION["TASK"], "INPUT_DOCUMENT", $inputDocumentUid, "AFTER");
//Trigger debug routines
//Cleaning debug variables
$_SESSION["TRIGGER_DEBUG"]["ERRORS"] = array();
$_SESSION["TRIGGER_DEBUG"]["DATA"] = array();
$_SESSION["TRIGGER_DEBUG"]["TRIGGERS_NAMES"] = array();
$_SESSION["TRIGGER_DEBUG"]["TRIGGERS_VALUES"] = array();
$_SESSION["TRIGGER_DEBUG"]["NUM_TRIGGERS"] = count($arrayTrigger);
$_SESSION["TRIGGER_DEBUG"]["TIME"] = "AFTER";
if ($_SESSION["TRIGGER_DEBUG"]["NUM_TRIGGERS"] > 0) {
$_SESSION["TRIGGER_DEBUG"]["TRIGGERS_NAMES"] = $case->getTriggerNames($arrayTrigger);
$_SESSION["TRIGGER_DEBUG"]["TRIGGERS_VALUES"] = $arrayTrigger;
}
//Add Input Document
if (isset($_FILES) && isset($_FILES["form"]) && count($_FILES["form"]) > 0) {
$appDocUid = $case->addInputDocument($inputDocumentUid, $appDocUid, $docVersion, $appDocType, $appDocComment, $actionType, $_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["TASK"], $_SESSION["USER_LOGGED"], "xmlform", $_FILES["form"]["name"]["APP_DOC_FILENAME"], $_FILES["form"]["error"]["APP_DOC_FILENAME"], $_FILES["form"]["tmp_name"]["APP_DOC_FILENAME"]);
示例5: Cases
//Load the variables
$oCase = new Cases();
$oCase->thisIsTheCurrentUser($_SESSION["APPLICATION"], $_SESSION["INDEX"], $_SESSION["USER_LOGGED"], "REDIRECT", "casesListExtJs");
$Fields = $oCase->loadCase($_SESSION["APPLICATION"]);
$Fields["APP_DATA"] = array_merge($Fields["APP_DATA"], G::getSystemConstants());
$Fields["APP_DATA"] = array_merge($Fields["APP_DATA"], $_POST["form"]);
#here we must verify if is a debug session
$trigger_debug_session = $_SESSION['TRIGGER_DEBUG']['ISSET'];
#here we must verify if is a debugg session
#trigger debug routines...
//cleaning debug variables
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = array();
$_SESSION['TRIGGER_DEBUG']['DATA'] = array();
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = array();
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = array();
$triggers = $oCase->loadTriggers($_SESSION['TASK'], 'DYNAFORM', $_GET['UID'], 'AFTER');
$_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] = count($triggers);
$_SESSION['TRIGGER_DEBUG']['TIME'] = 'AFTER';
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = $oCase->getTriggerNames($triggers);
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = $triggers;
}
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
//Execute after triggers - Start
$Fields['APP_DATA'] = $oCase->ExecuteTriggers($_SESSION['TASK'], 'DYNAFORM', $_GET['UID'], 'AFTER', $Fields['APP_DATA']);
//Execute after triggers - End
}
//save data in PM Tables if necessary
$newValues = array();
foreach ($_POST['form'] as $sField => $sAux) {
if (isset($oForm->fields[$sField]->pmconnection) && isset($oForm->fields[$sField]->pmfield)) {
示例6: Cases
$appDocUid = $_POST['form']['APP_DOC_UID'];
$docVersion = $_POST['form']['docVersion'];
$actionType = $_POST['form']['actionType'];
//load the variables
G::LoadClass('case');
$oCase = new Cases();
$oCase->thisIsTheCurrentUser($_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'cases_List');
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
$Fields['APP_DATA'] = array_merge($Fields['APP_DATA'], G::getSystemConstants());
#trigger debug routines...
//cleaning debug variables
$_SESSION['TRIGGER_DEBUG']['ERRORS'] = array();
$_SESSION['TRIGGER_DEBUG']['DATA'] = array();
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = array();
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = array();
$triggers = $oCase->loadTriggers($_SESSION['TASK'], 'INPUT_DOCUMENT', $_GET['UID'], 'AFTER');
$_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] = count($triggers);
$_SESSION['TRIGGER_DEBUG']['TIME'] = 'AFTER';
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = $oCase->getTriggerNames($triggers);
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = $triggers;
}
if ($_SESSION['TRIGGER_DEBUG']['NUM_TRIGGERS'] != 0) {
//Execute after triggers - Start
$Fields['APP_DATA'] = $oCase->ExecuteTriggers($_SESSION['TASK'], 'INPUT_DOCUMENT', $_GET['UID'], 'AFTER', $Fields['APP_DATA']);
//Execute after triggers - End
}
//save data
$aData = array();
$aData['APP_NUMBER'] = $Fields['APP_NUMBER'];
$aData['APP_PROC_STATUS'] = $Fields['APP_PROC_STATUS'];
示例7: Cases
/* Process the info */
$sStatus = 'TO_DO';
foreach ($_POST['form']['TASKS'] as $aValues) {
}
try {
//load data
$oCase = new Cases();
//warning: we are not using the result value of function thisIsTheCurrentUser, so I'm commenting to optimize speed.
//$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'casesListExtJs');
$appFields = $oCase->loadCase($_SESSION['APPLICATION']);
$appFields['APP_DATA'] = array_merge($appFields['APP_DATA'], G::getSystemConstants());
//cleaning debug variables
$_SESSION['TRIGGER_DEBUG']['DATA'] = array();
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = array();
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = array();
$triggers = $oCase->loadTriggers($_SESSION['TASK'], 'ASSIGN_TASK', -2, 'BEFORE');
//if there are some triggers to execute
if (sizeof($triggers) > 0) {
//Execute triggers before derivation
$appFields['APP_DATA'] = $oCase->ExecuteTriggers($_SESSION['TASK'], 'ASSIGN_TASK', -2, 'BEFORE', $appFields['APP_DATA']);
//save trigger variables for debugger
$_SESSION['TRIGGER_DEBUG']['info'][0]['NUM_TRIGGERS'] = sizeof($triggers);
$_SESSION['TRIGGER_DEBUG']['info'][0]['TIME'] = 'BEFORE';
$_SESSION['TRIGGER_DEBUG']['info'][0]['TRIGGERS_NAMES'] = $oCase->getTriggerNames($triggers);
$_SESSION['TRIGGER_DEBUG']['info'][0]['TRIGGERS_VALUES'] = $triggers;
}
$appFields['DEL_INDEX'] = $_SESSION['INDEX'];
$appFields['TAS_UID'] = $_SESSION['TASK'];
$oCase->updateCase($_SESSION['APPLICATION'], $appFields);
//Save data
//derivate case
示例8: Cases
foreach ($_POST['form']['TASKS'] as $aValues) {
}
try {
//load data
$oCase = new Cases();
//warning: we are not using the result value of function thisIsTheCurrentUser, so I'm commenting to optimize speed.
//$oCase->thisIsTheCurrentUser( $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['USER_LOGGED'], 'REDIRECT', 'casesListExtJs');
$appFields = $oCase->loadCase( $_SESSION['APPLICATION'] );
$appFields['APP_DATA'] = array_merge( $appFields['APP_DATA'], G::getSystemConstants() );
//cleaning debug variables
$_SESSION['TRIGGER_DEBUG']['DATA'] = Array ();
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_NAMES'] = Array ();
$_SESSION['TRIGGER_DEBUG']['TRIGGERS_VALUES'] = Array ();
$triggers = $oCase->loadTriggers( $_SESSION['TASK'], 'ASSIGN_TASK', - 2, 'BEFORE' );
//if there are some triggers to execute
if (sizeof( $triggers ) > 0) {
//Execute triggers before derivation
$appFields['APP_DATA'] = $oCase->ExecuteTriggers( $_SESSION['TASK'], 'ASSIGN_TASK', - 2, 'BEFORE', $appFields['APP_DATA'] );
//save trigger variables for debugger
$_SESSION['TRIGGER_DEBUG']['info'][0]['NUM_TRIGGERS'] = sizeof( $triggers );
$_SESSION['TRIGGER_DEBUG']['info'][0]['TIME'] = G::toUpper(G::loadTranslation('ID_BEFORE'));
$_SESSION['TRIGGER_DEBUG']['info'][0]['TRIGGERS_NAMES'] = $oCase->getTriggerNames( $triggers );
$_SESSION['TRIGGER_DEBUG']['info'][0]['TRIGGERS_VALUES'] = $triggers;
}
unset($appFields['APP_STATUS']);
unset($appFields['APP_PROC_STATUS']);