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


PHP CBPActivity::RemoveStatusChangeHandler方法代码示例

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


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

示例1: OnEvent

 public function OnEvent(CBPActivity $sender, $arEventParameters = array())
 {
     if ($sender == null) {
         throw new Exception("sender");
     }
     $sender->RemoveStatusChangeHandler(self::ClosedEvent, $this);
     if (!$this->TryNextIteration()) {
         $this->workflow->CloseActivity($this);
     }
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:10,代码来源:whileactivity.php

示例2: OnEvent

 public function OnEvent(CBPActivity $sender, $arEventParameters = array())
 {
     $sender->RemoveStatusChangeHandler(self::ClosedEvent, $this);
     $bCloseActivity = false;
     if (is_a($sender, "CBPStateInitializationActivity")) {
         if (strlen($this->nextStateName) > 0) {
             $stateFinalization = null;
             for ($i = 0, $s = sizeof($this->arActivities); $i < $s; $i++) {
                 if (is_a($this->arActivities[$i], "CBPStateFinalizationActivity")) {
                     $stateFinalization = $this->arActivities[$i];
                 }
             }
             if ($stateFinalization != null) {
                 $stateFinalization->AddStatusChangeHandler(self::ClosedEvent, $this);
                 $this->workflow->ExecuteActivity($stateFinalization);
             } else {
                 $bCloseActivity = true;
             }
         } else {
             //$stateService = $this->workflow->GetService("StateService");
             //$stateService->SetStateParameters($this->GetWorkflowInstanceId(), $this->GetAvailableStateEvents());
             $status = $this->ExecuteState();
             if ($status != CBPActivityExecutionStatus::Executing) {
                 $bCloseActivity = true;
             }
         }
     } elseif (is_a($sender, "CBPStateFinalizationActivity")) {
         $bCloseActivity = true;
     } else {
         $stateFinalization = null;
         if (strlen($this->nextStateName) > 0) {
             for ($i = 0, $s = sizeof($this->arActivities); $i < $s; $i++) {
                 if (is_a($this->arActivities[$i], "CBPStateFinalizationActivity")) {
                     $stateFinalization = $this->arActivities[$i];
                 }
             }
         }
         if ($stateFinalization != null) {
             $stateFinalization->AddStatusChangeHandler(self::ClosedEvent, $this);
             $this->workflow->ExecuteActivity($stateFinalization);
         } else {
             $bCloseActivity = true;
         }
     }
     if ($bCloseActivity) {
         $this->arActivityState = array();
         $this->isListenTrigerred = false;
         $arEP = array();
         if (strlen($this->nextStateName) > 0) {
             $arEP["NextStateName"] = $this->nextStateName;
         }
         $this->workflow->CloseActivity($this, $arEP);
     }
 }
开发者ID:Satariall,项目名称:izurit,代码行数:54,代码来源:stateactivity.php

示例3: OnEvent

 public function OnEvent(CBPActivity $sender, $arEventParameters = array())
 {
     $sender->RemoveStatusChangeHandler(self::ClosedEvent, $this);
     if ($this->executionStatus == CBPActivityExecutionStatus::Canceling || $this->executionStatus == CBPActivityExecutionStatus::Faulting) {
         $this->workflow->CloseActivity($this);
     } else {
         if ($this->executionStatus == CBPActivityExecutionStatus::Executing && !$this->TryScheduleNextChild($context)) {
             $this->OnSequenceComplete();
             $this->workflow->CloseActivity($this);
         }
     }
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:12,代码来源:sequenceactivity.php

示例4: OnEvent

 public function OnEvent(CBPActivity $sender, $arEventParameters = array())
 {
     $sender->RemoveStatusChangeHandler(self::ClosedEvent, $this);
     $flag = true;
     for ($i = 0; $i < count($this->arActivities); $i++) {
         $activity = $this->arActivities[$i];
         if ($activity->executionStatus != CBPActivityExecutionStatus::Initialized && $activity->executionStatus != CBPActivityExecutionStatus::Closed) {
             $flag = false;
             break;
         }
     }
     if ($flag) {
         $this->workflow->CloseActivity($this);
     }
 }
开发者ID:k-kalashnikov,项目名称:geekcon,代码行数:15,代码来源:parallelactivity.php

示例5: OnEvent

 public function OnEvent(CBPActivity $sender, $arEventParameters = array())
 {
     $sender->RemoveStatusChangeHandler(self::ClosedEvent, $this);
     if (array_key_exists("NextStateName", $arEventParameters) && strlen($arEventParameters["NextStateName"]) > 0) {
         $nextStateActivity = $this->GetStateActivityByName($arEventParameters["NextStateName"]);
         if ($nextStateActivity == null) {
             throw new Exception("nextStateActivity");
         }
         $nextStateActivity->ReInitialize();
         $nextStateActivity->AddStatusChangeHandler(self::ClosedEvent, $this);
         $this->workflow->ExecuteActivity($nextStateActivity);
     } else {
         $this->workflow->CloseActivity($this);
     }
 }
开发者ID:k-kalashnikov,项目名称:geekcon_new,代码行数:15,代码来源:statemachineworkflowactivity.php

示例6: OnEvent

 protected function OnEvent(CBPActivity $sender)
 {
     $sender->RemoveStatusChangeHandler(self::ClosedEvent, $this);
     $this->workflow->CloseActivity($this);
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:5,代码来源:reviewactivity.php

示例7: OnEvent

 public function OnEvent(CBPActivity $sender, $arEventParameters = array())
 {
     $sender->RemoveStatusChangeHandler(self::ClosedEvent, $this);
     $this->workflow->CloseActivity($this);
 }
开发者ID:Satariall,项目名称:izurit,代码行数:5,代码来源:listenactivity.php


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