• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/automation/engine/template.php
  • Класс: BitrixBizprocAutomationEngineTemplate
  • Вызов: Template::areRobotsEqual
private function areRobotsEqual(Robot $lhsRobot, Robot $rhsRobot): bool
{
	$lhsCondition = $lhsRobot->getCondition() ?? new ConditionGroup();
	$rhsCondition = $rhsRobot->getCondition() ?? new ConditionGroup();

	$lhsDelay = $lhsRobot->getDelayInterval();
	$rhsDelay = $rhsRobot->getDelayInterval();
	if (!isset($lhsDelay) || $lhsDelay->isNow())
	{
		$lhsDelay = new DelayInterval();
	}
	if (!isset($rhsDelay) || $rhsDelay->isNow())
	{
		$rhsDelay = new DelayInterval();
	}

	return
		$lhsCondition->toArray()['items'] === $rhsCondition->toArray()['items']
		&& $lhsDelay->toArray() === $rhsDelay->toArray()
		&& $lhsRobot->getBizprocActivity() === $rhsRobot->getBizprocActivity()
	;
}