• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/lib/integration/bizproc/automation/factory.php
  • Класс: BitrixTasksIntegrationBizprocAutomationFactory
  • Вызов: Factory::runOnAdd
static function runOnAdd($documentType, $documentId, array $fields = null)
{
	if (empty($documentId) || !static::canUseAutomation())
	{
		return;
	}

	$automationTarget = static::createTarget($documentType, $documentId);
	if ($fields)
	{
		$automationTarget->setFields($fields);
	}

	$automationTarget->getRuntime()->onDocumentAdd();
}