7 protected function writeDebugTrack(
14 int $trackType = \CBPTrackingType::Debug
18 $trackingService = \CBPRuntime::GetRuntime(
true)->getDebugService(
'TrackingService');
19 if ($trackingService && $trackingService->canWrite($trackType, $workflowId))
21 return $trackingService->write($workflowId, $trackType, $name, $status, $result, $title, $toWrite);
27 protected function preparePropertyForWritingToTrack($value,
string $name =
''): array
32 $toWrite[
'propertyName'] = $name;
35 $toWrite[
'propertyValue'] = $value;
40 protected function writeSessionLegendTrack($workflowId): ?int
47 $debugSession = \Bitrix\Bizproc\Debugger\Session\Manager::getActiveSession();
53 return $this->writeDebugTrack(
56 \CBPActivityExecutionStatus::Closed,
57 \CBPActivityExecutionResult::Succeeded,
59 $debugSession->getShortDescription()
63 protected function writeDocumentStatusTrack($workflowId, array $status): ?int
71 'STATUS_ID' => $status[
'STATUS_ID'],
72 'NAME' => $status[
'NAME'],
73 'COLOR' => $status[
'COLOR'],
76 return $this->writeDebugTrack(
79 \CBPActivityExecutionStatus::Closed,
80 \CBPActivityExecutionResult::Succeeded,
83 \CBPTrackingType::DebugAutomation
87 protected function writeAppliedTriggerTrack($workflowId, array $trigger): ?int
94 return $this->writeDebugTrack(
97 \CBPActivityExecutionStatus::Closed,
98 \CBPActivityExecutionResult::Succeeded,
100 $trigger[
'APPLIED_RULE_LOG'] ?? [],
101 \CBPTrackingType::DebugAutomation
105 protected function writeDocumentCategoryTrack($workflowId, $categoryName): ?int
112 return $this->writeDebugTrack(
115 \CBPActivityExecutionStatus::Closed,
116 \CBPActivityExecutionResult::Succeeded,
119 \CBPTrackingType::DebugAutomation