本文整理汇总了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;
}
}
}
}