...Человеческий поиск в разработке...
- Модуль: bizproc
- Путь к файлу: ~/bitrix/modules/bizproc/classes/general/workflow.php
- Класс: CBPWorkflow
- Вызов: CBPWorkflow::terminate
public function terminate(Exception $e = null, $stateTitle = '') { /** @var CBPTaskService $taskService */ $taskService = $this->GetService("TaskService"); $taskService->DeleteByWorkflow($this->GetInstanceId(), CBPTaskStatus::Running); $this->SetWorkflowStatus(CBPWorkflowStatus::Terminated); $this->persister->SaveWorkflow($this->rootActivity, true); /** @var CBPStateService $stateService */ $stateService = $this->GetService("StateService"); $stateService->SetState( $this->instanceId, array( "STATE" => "Terminated", "TITLE" => $stateTitle ? $stateTitle : GetMessage("BPCGWF_TERMINATED"), "PARAMETERS" => array() ), false//array() ); if ($e != null) { $trackingService = $this->GetService("TrackingService"); $trackingService->Write( $this->instanceId, CBPTrackingType::FaultActivity, "none", CBPActivityExecutionStatus::Faulting, CBPActivityExecutionResult::Faulted, GetMessage('BPCGWF_EXCEPTION_TITLE'), ($e->getCode()? "[".$e->getCode()."] " : '').$e->getMessage() ); } }