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


PHP CBPActivity::IsPropertyExists方法代码示例

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


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

示例1: RunQueuedItem

 private function RunQueuedItem(CBPActivity $activity, $activityOperation, Exception $exception = null)
 {
     if ($activityOperation == CBPActivityExecutorOperationType::Execute) {
         if ($activity->executionStatus == CBPActivityExecutionStatus::Executing) {
             try {
                 $trackingService = $this->GetService("TrackingService");
                 $trackingService->Write($this->GetInstanceId(), CBPTrackingType::ExecuteActivity, $activity->GetName(), $activity->executionStatus, $activity->executionResult, $activity->IsPropertyExists("Title") ? $activity->Title : "", "");
                 $newStatus = $activity->Execute();
                 if ($newStatus == CBPActivityExecutionStatus::Closed) {
                     $this->CloseActivity($activity);
                 } elseif ($newStatus != CBPActivityExecutionStatus::Executing) {
                     throw new Exception("InvalidExecutionStatus");
                 }
             } catch (Exception $e) {
                 throw $e;
             }
         }
     } elseif ($activityOperation == CBPActivityExecutorOperationType::Cancel) {
         if ($activity->executionStatus == CBPActivityExecutionStatus::Canceling) {
             try {
                 $trackingService = $this->GetService("TrackingService");
                 $trackingService->Write($this->GetInstanceId(), CBPTrackingType::CancelActivity, $activity->GetName(), $activity->executionStatus, $activity->executionResult, $activity->IsPropertyExists("Title") ? $activity->Title : "", "");
                 $newStatus = $activity->Cancel();
                 if ($newStatus == CBPActivityExecutionStatus::Closed) {
                     $this->CloseActivity($activity);
                 } elseif ($newStatus != CBPActivityExecutionStatus::Canceling) {
                     throw new Exception("InvalidExecutionStatus");
                 }
             } catch (Exception $e) {
                 throw $e;
             }
         }
     } elseif ($activityOperation == CBPActivityExecutorOperationType::HandleFault) {
         if ($activity->executionStatus == CBPActivityExecutionStatus::Faulting) {
             try {
                 $trackingService = $this->GetService("TrackingService");
                 $trackingService->Write($this->GetInstanceId(), CBPTrackingType::FaultActivity, $activity->GetName(), $activity->executionStatus, $activity->executionResult, $activity->IsPropertyExists("Title") ? $activity->Title : "", $exception != null ? "[" . $exception->getCode() . "] " . $exception->getMessage() : "");
                 $newStatus = $activity->HandleFault($exception);
                 if ($newStatus == CBPActivityExecutionStatus::Closed) {
                     $this->CloseActivity($activity);
                 } elseif ($newStatus != CBPActivityExecutionStatus::Faulting) {
                     throw new Exception("InvalidExecutionStatus");
                 }
             } catch (Exception $e) {
                 throw $e;
             }
         }
     }
 }
开发者ID:mrdeadmouse,项目名称:u136006,代码行数:49,代码来源:workflow.php


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