本文整理匯總了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;
}
}
}
}