本文整理汇总了PHP中Process::Load方法的典型用法代码示例。如果您正苦于以下问题:PHP Process::Load方法的具体用法?PHP Process::Load怎么用?PHP Process::Load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Process
的用法示例。
在下文中一共展示了Process::Load方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Cases
leimnud.make();
leimnud.Package.Load("rpc,drag,drop,panel,app,validator,fx,dom,abbr",{Instance:leimnud,Type:"module"});
leimnud.exec(leimnud.fix.memoryLeak);
leimnud.event.add(window,"load",function(){
' . (isset($_SESSION['showCasesWindow']) ? 'try{' . $_SESSION['showCasesWindow'] . '}catch(e){}' : '') . '
});
');
$G_PUBLISH->AddContent('template', '', '', '', $oTemplatePower);
$oCase = new Cases();
$Fields = $oCase->loadCase($_SESSION['APPLICATION']);
$Fields['APP_DATA'] = array_merge($Fields['APP_DATA'], G::getSystemConstants());
$sStatus = $Fields['APP_STATUS'];
$APP_NUMBER = $Fields['APP_NUMBER'];
$APP_TITLE = $Fields['TITLE'];
$oProcess = new Process();
$oProcessFieds = $oProcess->Load($_SESSION['PROCESS']);
#trigger debug routines...
if (isset($oProcessFieds['PRO_DEBUG']) && $oProcessFieds['PRO_DEBUG']) {
#here we must verify if is a debugg session
$_SESSION['TRIGGER_DEBUG']['ISSET'] = 1;
$_SESSION['PMDEBUGGER'] = true;
} 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_'])) {
示例2: derivateCase
/**
* derivate Case moves the case to the next task in the process according to the routing rules
*
* @param string $userId
* @param string $caseId
* @param string $delIndex
* @param array $tasks
* @param bool $bExecuteTriggersBeforeAssignment
* @return $result will return an object
*/
public function derivateCase ($userId, $caseId, $delIndex, $bExecuteTriggersBeforeAssignment = false, $tasks = array())
{
$g = new G();
try {
$g->sessionVarSave();
$_SESSION["APPLICATION"] = $caseId;
$_SESSION["INDEX"] = $delIndex;
$_SESSION["USER_LOGGED"] = $userId;
$sStatus = 'TO_DO';
$varResponse = '';
$varTriggers = "\n";
if ($delIndex == '') {
$oCriteria = new Criteria( 'workflow' );
$oCriteria->addSelectColumn( AppDelegationPeer::DEL_INDEX );
$oCriteria->add( AppDelegationPeer::APP_UID, $caseId );
$oCriteria->add( AppDelegationPeer::DEL_FINISH_DATE, null, Criteria::ISNULL );
if (AppDelegationPeer::doCount( $oCriteria ) > 1) {
$result = new wsResponse( 20, G::loadTranslation( 'ID_SPECIFY_DELEGATION_INDEX' ) );
return $result;
}
$oDataset = AppDelegationPeer::doSelectRS( $oCriteria );
$oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );
$oDataset->next();
$aRow = $oDataset->getRow();
$delIndex = $aRow['DEL_INDEX'];
}
$oAppDel = new AppDelegation();
$appdel = $oAppDel->Load( $caseId, $delIndex );
if ($userId != $appdel['USR_UID']) {
$result = new wsResponse( 17, G::loadTranslation( 'ID_CASE_ASSIGNED_ANOTHER_USER' ) );
//.........这里部分代码省略.........
示例3: prepareInformation
/**
* prepareInformation
*
* @param array $arrayData Data
* @param string $taskUid Unique id of Task
*
* return array Return array
*/
public function prepareInformation(array $arrayData, $taskUid = "")
{
try {
if (!class_exists("Cases")) {
G::LoadClass("case");
}
$this->case = new Cases();
$task = new Task();
$arrayNextTask = array();
$arrayNextTaskDefault = array();
$i = 0;
//SELECT *
//FROM APP_DELEGATION AS A
//LEFT JOIN TASK AS T ON(T.TAS_UID = A.TAS_UID)
//LEFT JOIN ROUTE AS R ON(R.TAS_UID = A.TAS_UID)
//WHERE
//APP_UID = '$arrayData["APP_UID"]'
//AND DEL_INDEX = '$arrayData["DEL_INDEX"]'
$criteria = new Criteria("workflow");
$criteria->addSelectColumn(RoutePeer::TAS_UID);
$criteria->addSelectColumn(RoutePeer::ROU_NEXT_TASK);
$criteria->addSelectColumn(RoutePeer::ROU_TYPE);
$criteria->addSelectColumn(RoutePeer::ROU_DEFAULT);
$criteria->addSelectColumn(RoutePeer::ROU_CONDITION);
if ($taskUid != "") {
$criteria->add(RoutePeer::TAS_UID, $taskUid, Criteria::EQUAL);
$criteria->addAscendingOrderByColumn(RoutePeer::ROU_CASE);
$rsCriteria = RoutePeer::doSelectRS($criteria);
} else {
$criteria->addJoin(AppDelegationPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->addJoin(AppDelegationPeer::TAS_UID, RoutePeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->add(AppDelegationPeer::APP_UID, $arrayData["APP_UID"], Criteria::EQUAL);
$criteria->add(AppDelegationPeer::DEL_INDEX, $arrayData["DEL_INDEX"], Criteria::EQUAL);
$criteria->addAscendingOrderByColumn(RoutePeer::ROU_CASE);
//.........这里部分代码省略.........
示例4: getProcessRow
/**
* get a Process with a search based in the process Uid
*
* @param $sProUid string process Uid
* @return $oProcess Process object
*/
public function getProcessRow ($sProUid, $getAllLang = false)
{
$oProcess = new Process();
return $oProcess->Load( $sProUid, $getAllLang );
}
示例5: getCompleteDocumentInfo
public function getCompleteDocumentInfo ($appUid, $appDocUid, $docVersion, $docUid, $usrId)
{
//require_once ("classes/model/AppDocument.php");
//require_once ("classes/model/InputDocument.php");
//require_once ("classes/model/OutputDocument.php");
//require_once ("classes/model/Users.php");
//**** start get Doc Info
$oApp = new Application();
$oAppDocument = new AppDocument();
G::LoadClass( 'case' );
$oCase = new Cases();
G::LoadClass( 'process' );
$oProcess = new Process();
if (($oApp->exists( $appUid )) || ($appUid == "00000000000000000000000000000000")) {
if ($appUid == "00000000000000000000000000000000") {
//External Files
$row1 = $oAppDocument->load( $appDocUid, $docVersion );
$row2 = array ('PRO_TITLE' => G::LoadTranslation( 'ID_NOT_PROCESS_RELATED' ));
$row3 = array ('APP_TITLE' => G::LoadTranslation( 'ID_NOT_PROCESS_RELATED' ));
} else {
$row1 = $oAppDocument->load( $appDocUid, $docVersion );
$row2 = $oCase->loadCase( $appUid );
$row3 = $oProcess->Load( $row2['PRO_UID'] );
}
$lastVersion = $oAppDocument->getLastAppDocVersion( $appDocUid, $appUid );
switch ($row1['APP_DOC_TYPE']) {
case "OUTPUT":
$oOutputDocument = new OutputDocument();
$row4 = array();
$swOutDocExists = 0;
if ($oOutputDocument->OutputExists($docUid)) {
$row4 = $oOutputDocument->load($docUid);
$swOutDocExists = 1;
}
if ($swOutDocExists == 0) {
$swpdf = 0;
$swdoc = 0;
$info = pathinfo($oAppDocument->getAppDocFilename());
$version = (!empty($docVersion))? "_" . $docVersion : "_1";
$outDocPath = PATH_DOCUMENT . G::getPathFromUID($row1["APP_UID"]) . PATH_SEP . "outdocs" . PATH_SEP;
if (file_exists($outDocPath . $appDocUid . $version . ".pdf") ||
file_exists($outDocPath . $info["basename"] . $version . ".pdf") ||
file_exists($outDocPath . $info["basename"] . ".pdf")
) {
$swpdf = 1;
}
if (file_exists($outDocPath . $appDocUid . $version . ".doc") ||
file_exists($outDocPath . $info["basename"] . $version . ".doc") ||
file_exists($outDocPath . $info["basename"] . ".doc")
) {
$swdoc = 1;
}
if ($swpdf == 1 && $swdoc == 1) {
$row4["OUT_DOC_GENERATE"] = "BOTH";
} else {
if ($swpdf == 1) {
$row4["OUT_DOC_GENERATE"] = "PDF";
} else {
if ($swdoc == 1) {
$row4["OUT_DOC_GENERATE"] = "DOC";
} else {
$row4["OUT_DOC_GENERATE"] = "NOFILE";
}
}
}
}
$versioningEnabled = false; //$row4['OUT_DOC_VERSIONING']; //Only enabled for Input or Attached documents. Need to study the best way for Output docs.
switch ($row4['OUT_DOC_GENERATE']) {
case "PDF":
$downloadLink = "../cases/cases_ShowOutputDocument?a=" . $appDocUid . "&v=" . $docVersion . "&ext=pdf" . "&random=" . rand();
$downloadLink1 = "";
$downloadLabel = ".pdf";
$downloadLabel1 = "";
break;
case "DOC":
$downloadLink = "../cases/cases_ShowOutputDocument?a=" . $appDocUid . "&v=" . $docVersion . "&ext=doc" . "&random=" . rand();
$downloadLink1 = "";
$downloadLabel = ".doc";
$downloadLabel1 = "";
break;
case "BOTH":
$downloadLink = "../cases/cases_ShowOutputDocument?a=" . $appDocUid . "&v=" . $docVersion . "&ext=pdf" . "&random=" . rand();
$downloadLink1 = "../cases/cases_ShowOutputDocument?a=" . $appDocUid . "&v=" . $docVersion . "&ext=doc" . "&random=" . rand();
$downloadLabel = ".pdf";
$downloadLabel1 = ".doc";
break;
case "NOFILE":
$downloadLink = "../cases/cases_ShowDocument?a=" . $appDocUid . "&v=" . $docVersion;
//.........这里部分代码省略.........
示例6: rand
// $t->is ( $e->getMessage(), "This row doesn't exist!", "update() This row doesn't exist!" );
$t->todo(" {$e->getMessage}() This row doesn't exist! <> The row '' in table Process doesn't exist! " . " line 171");
}
//update with $fields
$newTitle = 'new title ' . rand(1000, 5000);
$newDescription = 'new Description ' . rand(1000, 5000);
$Fields['PRO_UID'] = $proUid;
$Fields['PRO_TITLE'] = $newTitle;
$Fields['PRO_PARENT'] = rand(1000, 5000);
$Fields['PRO_CREATE_DATE'] = 'now';
try {
$obj = new Process();
$res = $obj->update($Fields);
//#30
$t->is($res, 1, "update() update 1 row");
$Fields = $obj->Load($proUid);
//#26
$t->is($obj->getproUid(), $proUid, "update() APP_UID = " . $proUid);
//#27
$t->is($obj->getProTitle(), $newTitle, "update() getAppTitle");
//#28
$t->is($Fields['PRO_TITLE'], $newTitle, "update() PRO_TITLE= " . $newTitle);
//#29
$t->is($Fields['PRO_CREATE_DATE'], date('Y-m-d H:i:s'), "update() PRO_CREATE_DATE= " . date('Y-m-d H:i:s'));
} catch (Exception $e) {
//#14
$t->isa_ok($e, 'PropelException', 'update() return error ' . $e->getMessage());
print $e->getMessage();
}
//remove with empty
try {
示例7: InputFilter
G::LoadClass('dynaFormField');
G::LoadClass('process');
G::LoadClass('dynaform');
//G::LoadClass('configuration');
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$G_MAIN_MENU = 'processmaker';
$G_SUB_MENU = 'processes';
$G_ID_MENU_SELECTED = 'PROCESSES';
$G_ID_SUB_MENU_SELECTED = 'FIELDS';
$dbc = new DBConnection();
$ses = new DBSession($dbc);
//Hardcode: UID of the library by default
$PRO_UID = isset($_POST['PRO_UID']) ? $_POST['PRO_UID'] : '746B734DC23311';
$process = new Process($dbc);
$process->Load($PRO_UID);
$dynaform = new dynaform($dbc);
$dynaform->Fields['DYN_UID'] = isset($_POST['DYN_UID']) ? urldecode($_POST['DYN_UID']) : '0';
$dynaform->Load($dynaform->Fields['DYN_UID']);
if (isset($_POST['DYN_UID']) && $_POST['DYN_UID'] !== '') {
$file = $dynaform->Fields['DYN_FILENAME'];
} else {
//Hardcode: Sample of xmlform.
$file = $PRO_UID . '/' . 'myInfo';
}
/* Start Comment: If file doesn't exist, it is created */
if (!file_exists(PATH_DYNAFORM . $file . '.xml')) {
$newDoc = new Xml_Document();
$newDoc->addChildNode(new Xml_Node('dynaForm', 'open', '', array('type' => 'xmlform', 'name' => $file)));
$newDoc->children[0]->addChildNode(new Xml_Node('', 'cdata', "\n"));
G::verifyPath(dirname(PATH_DYNAFORM . $file . '.xml'), true);
示例8: prepareInformation
/**
* prepareInformation
*
* @param array $arrayData Data
* @param string $taskUid Unique id of Task
*
* @return array Return array
*/
public function prepareInformation(array $arrayData, $taskUid = "")
{
try {
if (!class_exists("Cases")) {
G::LoadClass("case");
}
$this->case = new Cases();
$task = new Task();
$arrayApplicationData = $this->case->loadCase($arrayData["APP_UID"]);
$arrayNextTask = array();
$arrayNextTaskDefault = array();
$i = 0;
//SELECT *
//FROM APP_DELEGATION AS A
//LEFT JOIN TASK AS T ON(T.TAS_UID = A.TAS_UID)
//LEFT JOIN ROUTE AS R ON(R.TAS_UID = A.TAS_UID)
//WHERE
//APP_UID = '$arrayData["APP_UID"]'
//AND DEL_INDEX = '$arrayData["DEL_INDEX"]'
$criteria = new Criteria("workflow");
$criteria->addSelectColumn(RoutePeer::TAS_UID);
$criteria->addSelectColumn(RoutePeer::ROU_NEXT_TASK);
$criteria->addSelectColumn(RoutePeer::ROU_TYPE);
$criteria->addSelectColumn(RoutePeer::ROU_DEFAULT);
$criteria->addSelectColumn(RoutePeer::ROU_CONDITION);
if ($taskUid != "") {
$criteria->add(RoutePeer::TAS_UID, $taskUid, Criteria::EQUAL);
$criteria->addAscendingOrderByColumn(RoutePeer::ROU_CASE);
$rsCriteria = RoutePeer::doSelectRS($criteria);
} else {
$criteria->addJoin(AppDelegationPeer::TAS_UID, TaskPeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->addJoin(AppDelegationPeer::TAS_UID, RoutePeer::TAS_UID, Criteria::LEFT_JOIN);
$criteria->add(AppDelegationPeer::APP_UID, $arrayData["APP_UID"], Criteria::EQUAL);
$criteria->add(AppDelegationPeer::DEL_INDEX, $arrayData["DEL_INDEX"], Criteria::EQUAL);
$criteria->addAscendingOrderByColumn(RoutePeer::ROU_CASE);
$rsCriteria = AppDelegationPeer::doSelectRS($criteria);
}
$rsCriteria->setFetchmode(ResultSet::FETCHMODE_ASSOC);
$flagDefault = false;
$aSecJoin = array();
$count = 0;
while ($rsCriteria->next()) {
$arrayRouteData = G::array_merges($rsCriteria->getRow(), $arrayData);
if ((int) $arrayRouteData["ROU_DEFAULT"] == 1) {
$arrayNextTaskDefault = $arrayRouteData;
$flagDefault = true;
continue;
}
$flagAddDelegation = true;
//Evaluate the condition if there are conditions defined
if (trim($arrayRouteData["ROU_CONDITION"]) != "" && $arrayRouteData["ROU_TYPE"] != "SELECT") {
G::LoadClass("pmScript");
$pmScript = new PMScript();
$pmScript->setFields($arrayApplicationData["APP_DATA"]);
$pmScript->setScript($arrayRouteData["ROU_CONDITION"]);
$flagAddDelegation = $pmScript->evaluate();
}
if (trim($arrayRouteData["ROU_CONDITION"]) == "" && $arrayRouteData["ROU_NEXT_TASK"] != "-1") {
$arrayTaskData = $task->load($arrayRouteData["ROU_NEXT_TASK"]);
if ($arrayRouteData["ROU_TYPE"] != "SEC-JOIN" && $arrayTaskData["TAS_TYPE"] == "GATEWAYTOGATEWAY") {
$flagAddDelegation = true;
}
if ($arrayRouteData["ROU_TYPE"] == "SEC-JOIN") {
$aSecJoin[$count]["ROU_PREVIOUS_TASK"] = $arrayRouteData["ROU_NEXT_TASK"];
$aSecJoin[$count]["ROU_PREVIOUS_TYPE"] = "SEC-JOIN";
$count++;
}
}
if ($arrayRouteData["ROU_TYPE"] == "EVALUATE" && !empty($arrayNextTask)) {
$flagAddDelegation = false;
}
if ($flagAddDelegation && preg_match("/^(?:EVALUATE|PARALLEL-BY-EVALUATION)\$/", $arrayRouteData["ROU_TYPE"]) && trim($arrayRouteData["ROU_CONDITION"]) == "") {
$flagAddDelegation = false;
}
if ($flagAddDelegation) {
$arrayNextTask[++$i] = $this->prepareInformationTask($arrayRouteData);
}
}
if (count($arrayNextTask) == 0 && count($arrayNextTaskDefault) > 0) {
$arrayNextTask[++$i] = $this->prepareInformationTask($arrayNextTaskDefault);
}
//Check Task GATEWAYTOGATEWAY, END-MESSAGE-EVENT, END-EMAIL-EVENT
$arrayNextTaskBackup = $arrayNextTask;
$arrayNextTask = array();
$i = 0;
foreach ($arrayNextTaskBackup as $value) {
$arrayNextTaskData = $value;
$regexpTaskTypeToInclude = "GATEWAYTOGATEWAY|END-MESSAGE-EVENT|END-EMAIL-EVENT";
if ($arrayNextTaskData["NEXT_TASK"]["TAS_UID"] != "-1" && preg_match("/^(?:" . $regexpTaskTypeToInclude . ")\$/", $arrayNextTaskData["NEXT_TASK"]["TAS_TYPE"])) {
$arrayAux = $this->prepareInformation($arrayData, $arrayNextTaskData["NEXT_TASK"]["TAS_UID"]);
foreach ($arrayAux as $value2) {
$arrayNextTask[++$i] = $value2;
//.........这里部分代码省略.........