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


PHP Step::remove方法代码示例

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


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

示例1: removeProcessRows

    /**

     * this function remove all Process except the PROCESS ROW

     *

     * @param string $sProUid

     * @return boolean

     */

    public function removeProcessRows ($sProUid)

    {

        try {

            //Instance all classes necesaries

            $oProcess = new Process();

            $oDynaform = new Dynaform();

            $oInputDocument = new InputDocument();

            $oOutputDocument = new OutputDocument();

            $oTrigger = new Triggers();

            $oStepTrigger = new StepTrigger();

            $oRoute = new Route();

            $oStep = new Step();

            $oSubProcess = new SubProcess();

            $oCaseTracker = new CaseTracker();

            $oCaseTrackerObject = new CaseTrackerObject();

            $oObjectPermission = new ObjectPermission();

            $oSwimlaneElement = new SwimlanesElements();

            $oConnection = new DbSource();

            $oStage = new Stage();

            $oEvent = new Event();

            $oCaseScheduler = new CaseScheduler();

            $oConfig = new Configuration();



            //Delete the tasks of process

            $oCriteria = new Criteria( 'workflow' );

            $oCriteria->add( TaskPeer::PRO_UID, $sProUid );

            $oDataset = TaskPeer::doSelectRS( $oCriteria );

            $oDataset->setFetchmode( ResultSet::FETCHMODE_ASSOC );

            $oDataset->next();

            $oTask = new Task();

            while ($aRow = $oDataset->getRow()) {

                $oCriteria = new Criteria( 'workflow' );

                $oCriteria->add( StepTriggerPeer::TAS_UID, $aRow['TAS_UID'] );

                StepTriggerPeer::doDelete( $oCriteria );

                if ($oTask->taskExists( $aRow['TAS_UID'] )) {

                    $oTask->remove( $aRow['TAS_UID'] );

                }

                $oDataset->next();

            }



            //Delete the dynaforms of process

            $oCriteria = new Criteria( 'workflow' );

            $oCriteria->add( DynaformPeer::PRO_UID, $sProUid );

            $oDataset = DynaformPeer::doSelectRS( $oCriteria );

//.........这里部分代码省略.........
开发者ID:rrsc,项目名称:processmaker,代码行数:101,代码来源:class.processes.php

示例2: deleteAll

    /**
     * Delete Steps and triggers of a Task
     *
     * @param string $stepUid Unique id of Step
     * @param string $taskUid Unique id of Step
     *
     * return void
     */
    public function deleteAll($taskUid)
    {
        try {
            $step = new \Step();
            $stepTrigger = new \ProcessMaker\BusinessModel\Step\Trigger();

            $criteriaTrigger = new \Criteria("workflow");
            $criteriaTrigger->addSelectColumn(\StepTriggerPeer::STEP_UID);
            $criteriaTrigger->addSelectColumn(\StepTriggerPeer::ST_TYPE);
            $criteriaTrigger->addSelectColumn(\StepTriggerPeer::TRI_UID);
            $criteriaTrigger->add(\StepTriggerPeer::TAS_UID, $taskUid, \Criteria::EQUAL);
            $rsCriteriaTrigger = \StepTriggerPeer::doSelectRS($criteriaTrigger);
            $rsCriteriaTrigger->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
            $rsCriteriaTrigger->next();

            while ($aRowTrigger = $rsCriteriaTrigger->getRow()) {

                $stepTrigger->delete($aRowTrigger['STEP_UID'], $aRowTrigger['ST_TYPE'], $taskUid, $aRowTrigger['TRI_UID']);
                $rsCriteriaTrigger->next();
            }

            $criteria = new \Criteria("workflow");
            $criteria->addSelectColumn(\StepPeer::STEP_UID);
            $criteria->add(\StepPeer::TAS_UID, $taskUid, \Criteria::EQUAL);
            $rsCriteria = \StepPeer::doSelectRS($criteria);
            $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
            $rsCriteria->next();

            while ($aRow = $rsCriteria->getRow()) {
                $step->remove($aRow['STEP_UID']);
                $rsCriteria->next();
            }

        } catch (\Exception $e) {
            throw $e;
        }
    }
开发者ID:rrsc,项目名称:processmaker,代码行数:45,代码来源:Step.php

示例3: switch

 * You should have received a copy of the GNU Affero General Public License
 * along with this program. If not, see <http://www.gnu.org/licenses/>.
 *
 * For more information, contact Colosa Inc, 2566 Le Jeune Rd.,
 * Coral Gables, FL, 33134, USA, or email info@colosa.com.
 */
try {
    global $RBAC;
    switch ($RBAC->userCanAccess('PM_FACTORY')) {
        case -2:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_SYSTEM', 'error', 'labels');
            G::header('location: ../login/login');
            die;
            break;
        case -1:
            G::SendTemporalMessage('ID_USER_HAVENT_RIGHTS_PAGE', 'error', 'labels');
            G::header('location: ../login/login');
            die;
            break;
    }
    require_once 'classes/model/Step.php';
    $oStep = new Step();
    $oStep->reOrder($_POST['STEP_UID'], $_POST['STEP_POSITION']);
    $oStep->remove($_POST['STEP_UID']);
    G::auditlog("StepDelete", "Step Deleted -> " . $_POST['STEP_UID'] . ' In Task -> ' . $_POST['TASK'] . ' Step Position -> ' . $_POST['STEP_POSITION']);
    G::LoadClass('processMap');
    $oProcessMap = new ProcessMap();
    $oProcessMap->getStepsCriteria($_POST['TASK']);
} catch (Exception $oException) {
    die($oException->getMessage());
}
开发者ID:emildev35,项目名称:processmaker,代码行数:31,代码来源:steps_Delete.php

示例4: deleteTask

 /**
  * Delete a task
  * @param string $sTaskUID
  * @return void
  */
 function deleteTask($sTaskUID = '')
 {
     try {
         //Instance classes
         $oTask = new Task();
         $oTasks = new Tasks();
         $oTaskUser = new TaskUser();
         $oStep = new Step();
         $oStepTrigger = new StepTrigger();
         //Get task information
         $aFields = $oTask->load($sTaskUID);
         //Delete routes
         $oTasks->deleteAllRoutesOfTask($aFields['PRO_UID'], $sTaskUID, true);
         //Delete gateways
         $oTasks->deleteAllGatewayOfTask($aFields['PRO_UID'], $sTaskUID, true);
         //Delete the users assigned to task
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(TaskUserPeer::TAS_UID, $sTaskUID);
         $oDataset1 = TaskUserPeer::doSelectRS($oCriteria);
         $oDataset1->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset1->next();
         while ($aRow1 = $oDataset1->getRow()) {
             $oTaskUser->remove($aRow1['TAS_UID'], $aRow1['USR_UID'], $aRow1['TU_TYPE'], $aRow1['TU_RELATION']);
             $oDataset1->next();
         }
         //Delete the steps of task
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(StepPeer::TAS_UID, $sTaskUID);
         $oDataset1 = StepPeer::doSelectRS($oCriteria);
         $oDataset1->setFetchmode(ResultSet::FETCHMODE_ASSOC);
         $oDataset1->next();
         while ($aRow1 = $oDataset1->getRow()) {
             //Delete the triggers assigned to step
             /*$oCriteria = new Criteria('workflow');
               $oCriteria->add(StepTriggerPeer::STEP_UID, $aRow1['STEP_UID']);
               $oDataset2 = StepTriggerPeer::doSelectRS($oCriteria);
               $oDataset2->setFetchmode(ResultSet::FETCHMODE_ASSOC);
               $oDataset2->next();
               while ($aRow2 = $oDataset2->getRow()) {
                 $oStepTrigger->remove($aRow2['STEP_UID'], $aRow2['TAS_UID'], $aRow2['TRI_UID'], $aRow2['ST_TYPE']);
                 $oDataset2->next();
               }*/
             $oStep->remove($aRow1['STEP_UID']);
             $oDataset1->next();
         }
         //Delete step triggers
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(StepTriggerPeer::TAS_UID, $sTaskUID);
         StepTriggerPeer::doDelete($oCriteria);
         //Delete permissions
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(ObjectPermissionPeer::TAS_UID, $sTaskUID);
         ObjectPermissionPeer::doDelete($oCriteria);
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(ObjectPermissionPeer::OP_TASK_SOURCE, $sTaskUID);
         ObjectPermissionPeer::doDelete($oCriteria);
         //Delete task
         $oTask->remove($sTaskUID);
         //Delete cases schedulers added by krlos
         $oCriteria = new Criteria('workflow');
         $oCriteria->add(CaseSchedulerPeer::TAS_UID, $sTaskUID);
         CaseSchedulerPeer::doDelete($oCriteria);
     } catch (Exception $oError) {
         throw $oError;
     }
 }
开发者ID:nshong,项目名称:processmaker,代码行数:71,代码来源:class.tasks.php

示例5: RemoveStep

 function RemoveStep($data, $fields)
 {
     try {
         $Step = new Step();
         $result = $Step->remove($fields['STEP_UID']);
         return $result;
     } catch (Exception $e) {
         return array('Exception!! ' => $e->getMessage());
     }
 }
开发者ID:emildev35,项目名称:processmaker,代码行数:10,代码来源:classStepTest.php

示例6: update

 /**
  * Update WebEntry-Event
  *
  * @param string $webEntryEventUid Unique id of WebEntry-Event
  * @param string $userUidUpdater   Unique id of updater User
  * @param array  $arrayData        Data
  *
  * return array Return data of the WebEntry-Event updated
  */
 public function update($webEntryEventUid, $userUidUpdater, array $arrayData)
 {
     try {
         //Verify data
         $process = new \ProcessMaker\BusinessModel\Process();
         $validator = new \ProcessMaker\BusinessModel\Validator();
         $validator->throwExceptionIfDataIsNotArray($arrayData, "\$arrayData");
         $validator->throwExceptionIfDataIsEmpty($arrayData, "\$arrayData");
         //Set data
         $arrayData = array_change_key_case($arrayData, CASE_UPPER);
         $arrayDataBackup = $arrayData;
         unset($arrayData["WEE_UID"]);
         unset($arrayData["PRJ_UID"]);
         unset($arrayData["WEE_WE_UID"]);
         unset($arrayData["WEE_WE_TAS_UID"]);
         //Set variables
         $arrayWebEntryEventData = $this->getWebEntryEvent($webEntryEventUid, true);
         $arrayFinalData = array_merge($arrayWebEntryEventData, $arrayData);
         //Verify data
         $this->throwExceptionIfNotExistsWebEntryEvent($webEntryEventUid, $this->arrayFieldNameForException["webEntryEventUid"]);
         $this->throwExceptionIfDataIsInvalid($webEntryEventUid, $arrayWebEntryEventData["PRJ_UID"], $arrayData);
         //Update
         $cnn = \Propel::getConnection("workflow");
         $this->webEntryEventWebEntryUid = "";
         $this->webEntryEventWebEntryTaskUid = "";
         try {
             //WebEntry
             $option = "UPDATE";
             if (isset($arrayData["WEE_STATUS"])) {
                 if ($arrayData["WEE_STATUS"] == "ENABLED") {
                     if ($arrayWebEntryEventData["WEE_STATUS"] == "DISABLED") {
                         $option = "INSERT";
                     }
                 } else {
                     if ($arrayWebEntryEventData["WEE_STATUS"] == "ENABLED") {
                         $option = "DELETE";
                     }
                 }
             }
             switch ($option) {
                 case "INSERT":
                     $this->createWebEntry($arrayFinalData["PRJ_UID"], $arrayFinalData["EVN_UID"], $arrayFinalData["ACT_UID"], $arrayFinalData["DYN_UID"], $arrayFinalData["USR_UID"], $arrayFinalData["WEE_TITLE"], $arrayFinalData["WEE_DESCRIPTION"], $userUidUpdater);
                     $arrayData["WEE_WE_UID"] = $this->webEntryEventWebEntryUid;
                     $arrayData["WEE_WE_TAS_UID"] = $this->webEntryEventWebEntryTaskUid;
                     break;
                 case "UPDATE":
                     if ($arrayWebEntryEventData["WEE_WE_UID"] != "") {
                         $task = new \Tasks();
                         //Task - Step
                         if (isset($arrayData["DYN_UID"]) && $arrayData["DYN_UID"] != $arrayWebEntryEventData["DYN_UID"]) {
                             //Delete
                             $step = new \Step();
                             $criteria = new \Criteria("workflow");
                             $criteria->add(\StepPeer::TAS_UID, $arrayWebEntryEventData["WEE_WE_TAS_UID"]);
                             $rsCriteria = \StepPeer::doSelectRS($criteria);
                             $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
                             while ($rsCriteria->next()) {
                                 $row = $rsCriteria->getRow();
                                 $result = $step->remove($row["STEP_UID"]);
                             }
                             //Add
                             $step = new \Step();
                             $stepUid = $step->create(array("PRO_UID" => $arrayWebEntryEventData["PRJ_UID"], "TAS_UID" => $arrayWebEntryEventData["WEE_WE_TAS_UID"]));
                             $result = $step->update(array("STEP_UID" => $stepUid, "STEP_TYPE_OBJ" => "DYNAFORM", "STEP_UID_OBJ" => $arrayData["DYN_UID"], "STEP_POSITION" => 1, "STEP_MODE" => "EDIT"));
                         }
                         //Task - User
                         if (isset($arrayData["USR_UID"]) && $arrayData["USR_UID"] != $arrayWebEntryEventData["USR_UID"]) {
                             //Unassign
                             $taskUser = new \TaskUser();
                             $criteria = new \Criteria("workflow");
                             $criteria->add(\TaskUserPeer::TAS_UID, $arrayWebEntryEventData["WEE_WE_TAS_UID"]);
                             $rsCriteria = \TaskUserPeer::doSelectRS($criteria);
                             $rsCriteria->setFetchmode(\ResultSet::FETCHMODE_ASSOC);
                             while ($rsCriteria->next()) {
                                 $row = $rsCriteria->getRow();
                                 $result = $taskUser->remove($row["TAS_UID"], $row["USR_UID"], $row["TU_TYPE"], $row["TU_RELATION"]);
                             }
                             //Assign
                             $result = $task->assignUser($arrayWebEntryEventData["WEE_WE_TAS_UID"], $arrayData["USR_UID"], 1);
                         }
                         //Route
                         if (isset($arrayData["ACT_UID"]) && $arrayData["ACT_UID"] != $arrayWebEntryEventData["ACT_UID"]) {
                             //Delete
                             $result = $task->deleteAllRoutesOfTask($arrayWebEntryEventData["PRJ_UID"], $arrayWebEntryEventData["WEE_WE_TAS_UID"], true);
                             //Add
                             $workflow = \ProcessMaker\Project\Workflow::load($arrayWebEntryEventData["PRJ_UID"]);
                             $result = $workflow->addRoute($arrayWebEntryEventData["WEE_WE_TAS_UID"], $arrayData["ACT_UID"], "SEQUENTIAL");
                         }
                         //WebEntry
                         $arrayDataAux = array();
                         if (isset($arrayData["DYN_UID"])) {
//.........这里部分代码省略.........
开发者ID:emildev35,项目名称:processmaker,代码行数:101,代码来源:WebEntryEvent.php


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