...Человеческий поиск в разработке...
- Модуль: bizproc
- Путь к файлу: ~/bitrix/modules/bizproc/classes/general/schedulerservice.php
- Класс: CBPSchedulerService
- Вызов: CBPSchedulerService::subscribeOnEvent
public function subscribeOnEvent($workflowId, $eventHandlerName, $eventModule, $eventName, $entityId = null): ?int { $resultId = null; $entityKey = null; if (is_array($entityId)) { foreach ($entityId as $entityKey => $entityId) break; } elseif ($entityId !== null) { $entityKey = 0; } if (is_array($entityId)) { $entityId = current(CBPHelper::makeArrayFlat($entityId)); } if (!SchedulerEventTable::isSubscribed($workflowId, $eventHandlerName, $eventModule, $eventName, $entityId)) { $result = SchedulerEventTable::add(array( 'WORKFLOW_ID' => (string)$workflowId, 'HANDLER' => (string)$eventHandlerName, 'EVENT_MODULE' => (string)$eventModule, 'EVENT_TYPE' => (string)$eventName, 'ENTITY_ID' => (string)$entityId )); $resultId = (int)$result->getId(); } RegisterModuleDependences( $eventModule, $eventName, 'bizproc', 'CBPSchedulerService', 'sendEvents', 100, '', array($eventModule, $eventName, $entityKey) ); return $resultId; }