当前位置: 首页>>代码示例>>PHP>>正文


PHP Process::remove方法代码示例

本文整理汇总了PHP中Process::remove方法的典型用法代码示例。如果您正苦于以下问题:PHP Process::remove方法的具体用法?PHP Process::remove怎么用?PHP Process::remove使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Process的用法示例。


在下文中一共展示了Process::remove方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createProcessRow

    /**

     * creates a process new process if a process exists with the same uid of the

     * $row['PRO_UID'] parameter then deletes it from the database and creates

     * a new one based on the $row parameter

     *

     * @param $row array parameter with the process data

     * @return $oProcess Process object

     */

    public function createProcessRow ($row)

    {

        $oProcess = new Process();

        if ($oProcess->processExists( $row['PRO_UID'] )) {

            $oProcess->remove( $row['PRO_UID'] );

        }

        return $oProcess->createRow( $row );

    }
开发者ID:rrsc,项目名称:processmaker,代码行数:31,代码来源:class.processes.php

示例2: InputFilter

ini_set("max_execution_time", 0);
G::LoadSystem('inputfilter');
$filter = new InputFilter();
$_FILES = $filter->xssFilterHard($_FILES);
$_SESSION['USER_LOGGED'] = $filter->xssFilterHard($_SESSION['USER_LOGGED']);
if (isset($_FILES["PROCESS_FILENAME"]) && pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_EXTENSION) == "bpmn") {
    try {
        $createMode = $_REQUEST["createMode"];
        $createMode = $filter->xssFilterHard($createMode);
        $name = pathinfo($_FILES["PROCESS_FILENAME"]["name"], PATHINFO_FILENAME);
        $data = array("type" => "bpmnProject", "PRO_TITLE" => $name, "PRO_DESCRIPTION" => "", "PRO_CATEGORY" => "", "PRO_CREATE_USER" => $_SESSION['USER_LOGGED']);
        if ($createMode === "overwrite") {
            $process = Process::getByProTitle($data["PRO_TITLE"]);
            if ($process !== null) {
                $oProcess = new Process();
                $oProcess->remove($process["PRO_UID"]);
            }
        }
        if ($createMode === "rename") {
            $data["PRO_TITLE"] = Process::getNextTitle($data["PRO_TITLE"]);
        }
        $project = new \ProcessMaker\Project\Adapter\WorkflowBpmn($data);
        copy($_FILES["PROCESS_FILENAME"]["tmp_name"], PATH_DOCUMENT . $project->getUid());
        $result = array("success" => true, "catchMessage" => "", "prj_uid" => $project->getUid(), "createMode" => $createMode);
    } catch (Exception $e) {
        $result = array("success" => "confirm", "catchMessage" => $e->getMessage(), "createMode" => $createMode);
    }
    echo G::json_encode($result);
    exit(0);
} else {
    $result = array("success" => "error", "catchMessage" => G::LoadTranslation("ID_FILE_UPLOAD_INCORRECT_EXTENSION"));
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:processes_Import_Bpmn.php

示例3: deleteProcess

 public function deleteProcess($sProcessUID)
 {
     try {
         G::LoadClass('case');
         G::LoadClass('reportTables');
         //Instance all classes necesaries
         $oProcess = new Process();
         $oDynaform = new Dynaform();
         $oInputDocument = new InputDocument();
         $oOutputDocument = new OutputDocument();
         $oTrigger = new Triggers();
         $oRoute = new Route();
         $oGateway = new Gateway();
         $oEvent = new Event();
         $oSwimlaneElement = new SwimlanesElements();
         $oConfiguration = new Configuration();
         $oDbSource = new DbSource();
         $oReportTable = new ReportTables();
         $oCaseTracker = new CaseTracker();
         $oCaseTrackerObject = new CaseTrackerObject();
         //Delete the applications of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(ApplicationPeer::PRO_UID, $sProcessUID);
         $oDataset = ApplicationPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         $oCase = new Cases();
         while ($aRow = $oDataset->getRow()) {
             $oCase->removeCase($aRow['APP_UID']);
             $oDataset->next();
         }
         //Delete the tasks of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(TaskPeer::PRO_UID, $sProcessUID);
         $oDataset = TaskPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $this->deleteTask($aRow['TAS_UID']);
             $oDataset->next();
         }
         //Delete the dynaforms of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(DynaformPeer::PRO_UID, $sProcessUID);
         $oDataset = DynaformPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $oDynaform->remove($aRow['DYN_UID']);
             $oDataset->next();
         }
         //Delete the input documents of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(InputDocumentPeer::PRO_UID, $sProcessUID);
         $oDataset = InputDocumentPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $oInputDocument->remove($aRow['INP_DOC_UID']);
             $oDataset->next();
         }
         //Delete the output documents of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(OutputDocumentPeer::PRO_UID, $sProcessUID);
         $oDataset = OutputDocumentPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $oOutputDocument->remove($aRow['OUT_DOC_UID']);
             $oDataset->next();
         }
         //Delete the triggers of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(TriggersPeer::PRO_UID, $sProcessUID);
         $oDataset = TriggersPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $oTrigger->remove($aRow['TRI_UID']);
             $oDataset->next();
         }
         //Delete the routes of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(RoutePeer::PRO_UID, $sProcessUID);
         $oDataset = RoutePeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $oRoute->remove($aRow['ROU_UID']);
             $oDataset->next();
         }
         //Delete the gateways of process
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(GatewayPeer::PRO_UID, $sProcessUID);
         $oDataset = GatewayPeer::doSelectRS($oCriteria);
         $oDataset->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset->next();
         while ($aRow = $oDataset->getRow()) {
             $oGateway->remove($aRow['GAT_UID']);
             $oDataset->next();
//.........这里部分代码省略.........
开发者ID:rodrigoivan,项目名称:processmaker,代码行数:101,代码来源:class.processMap.php

示例4: Process

    //#30
    $t->isa_ok($e, 'Exception', 'remove() returns error when UID is not defined');
    //#31
    //$t->is ( $e->getMessage(),   "This row doesn't exist!",   "remove() This row doesn't exist!" );
    $t->todo($e->getMessage() . "  <> The row ''in table Process doesn't exist! " . "     line 213");
}
//remove with $fields
$Fields['PRO_UID'] = $proUid;
try {
    $obj = new Process();
    $res = $obj->remove($Fields);
    //#32
    $t->is($res, NULL, "remove() remove row {$proUid}");
} catch (Exception $e) {
    //#14
    $t->isa_ok($e, 'PropelException', 'remove() return error ' . $e->getMessage());
}
//remove with $proUid
$obj = new Process();
$proUid = $obj->create('1');
try {
    $obj = new Process();
    $res = $obj->remove($proUid);
    //#33
    $t->is($res, NULL, "remove() remove row {$proUid}");
} catch (Exception $e) {
    //#14
    $t->isa_ok($e, 'PropelException', 'remove() return error ' . $e->getMessage());
}
$t->todo('Test to verify if delete works correctly :p ...');
$t->todo('how can I change dynamically the Case Title based in a definition, right now the case title is the same as the process title.  We need another field in process to have the case title definition');
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:classProcessTest.php


注:本文中的Process::remove方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。