本文整理汇总了PHP中Cases::ExecuteTriggers方法的典型用法代码示例。如果您正苦于以下问题:PHP Cases::ExecuteTriggers方法的具体用法?PHP Cases::ExecuteTriggers怎么用?PHP Cases::ExecuteTriggers使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Cases
的用法示例。
在下文中一共展示了Cases::ExecuteTriggers方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: JavaBridgePM
G::LoadClass('javaBridgePM');
$JBPM = new JavaBridgePM();
$JBPM->checkJavaExtension();
$util = new Java("com.processmaker.util.pmutils");
$util->setInputPath($javaInput);
$util->setOutputPath($javaOutput);
copy(PATH_DYNAFORM . $aOD['PRO_UID'] . PATH_SEP . $aOD['OUT_DOC_UID'] . '.pdf', $javaInput . $aOD['OUT_DOC_UID'] . '.pdf');
$outputFile = $javaOutput . $sFilename . '.pdf';
print $util->writeVarsToAcroFields($aOD['OUT_DOC_UID'] . '.pdf', $xmlData);
copy($javaOutput . $aOD['OUT_DOC_UID'] . '.pdf', $pathOutput . $sFilename . '.pdf');
break;
default:
throw new Exception('invalid output document');
}
//Execute after triggers - Start
$Fields['APP_DATA'] = $oCase->ExecuteTriggers($_SESSION['TASK'], 'OUTPUT_DOCUMENT', $_GET['UID'], 'AFTER', $Fields['APP_DATA']);
$Fields['DEL_INDEX'] = $_SESSION['INDEX'];
$Fields['TAS_UID'] = $_SESSION['TASK'];
//Execute after triggers - End
//Save data - Start
$oCase->updateCase($_SESSION['APPLICATION'], $Fields);
//Save data - End
//Plugin Hook PM_UPLOAD_DOCUMENT for upload document
$oPluginRegistry =& PMPluginRegistry::getSingleton();
if ($oPluginRegistry->existsTrigger(PM_UPLOAD_DOCUMENT) && class_exists('uploadDocumentData')) {
$triggerDetail = $oPluginRegistry->getTriggerInfo(PM_UPLOAD_DOCUMENT);
$sPathName = PATH_DOCUMENT . $_SESSION['APPLICATION'] . PATH_SEP;
$oData['APP_UID'] = $_SESSION['APPLICATION'];
$oData['ATTACHMENT_FOLDER'] = true;
switch ($aOD['OUT_DOC_GENERATE']) {
case "BOTH":
示例2: Cases
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
$oDerivation = new Derivation();
$aCurrentDerivation = array('APP_UID' => $_SESSION['APPLICATION'], 'DEL_INDEX' => $_SESSION['INDEX'], 'APP_STATUS' => $sStatus, 'TAS_UID' => $_SESSION['TASK'], 'ROU_TYPE' => $_POST['form']['ROU_TYPE']);
$oDerivation->derivate($aCurrentDerivation, $_POST['form']['TASKS']);
$appFields = $oCase->loadCase($_SESSION['APPLICATION']);
示例3: array
#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)) {
if ($oForm->fields[$sField]->pmconnection != '' && $oForm->fields[$sField]->pmfield != '') {
if (isset($oForm->fields[$oForm->fields[$sField]->pmconnection])) {
require_once PATH_CORE . 'classes' . PATH_SEP . 'model' . PATH_SEP . 'AdditionalTables.php';
$oAdditionalTables = new AdditionalTables();
try {
$aData = $oAdditionalTables->load($oForm->fields[$oForm->fields[$sField]->pmconnection]->pmtable, true);
} catch (Exception $oError) {
$aData = array('FIELDS' => array());
}
示例4: unset
$oCase->setDelInitDate( $sAppUid, $iDelIndex );
$aFields = $oCase->loadCase( $sAppUid, $iDelIndex );
}
$_SESSION['PROCESS'] = $aFields['PRO_UID'];
$_SESSION['TASK'] = $aFields['TAS_UID'];
$_SESSION['STEP_POSITION'] = 0;
/* Redirect to next step */
unset( $_SESSION['bNoShowSteps'] );
/* Execute Before Triggers for first Task*/
$oStep = new Step;
$oStep = $oStep->loadByProcessTaskPosition($_SESSION['PROCESS'], $_SESSION['TASK'], 1);
if($oStep) {
$triggerFields["APP_DATA"] = $oCase->ExecuteTriggers( $_SESSION['TASK'], $oStep->getStepTypeObj(), $oStep->getStepUidObj(), 'BEFORE', $aFields['APP_DATA'] );
$oCase->updateCase( $_SESSION['APPLICATION'], $triggerFields );
$_SESSION['beforeTriggersExecuted'] = true;
}
/*end Execute Before Triggers for first Task*/
$aNextStep = $oCase->getNextStep( $_SESSION['PROCESS'], $_SESSION['APPLICATION'], $_SESSION['INDEX'], $_SESSION['STEP_POSITION'] );
$sPage = $aNextStep['PAGE'];
G::header( 'location: ' . $sPage );
} else {
//when the case have another user or current user doesn't have rights to this self-service,
//just view the case Resume
// Get DEL_INDEX
$criteria = new Criteria('workflow');