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

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