• Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/lib/automation/engine/delayinterval.php
  • Класс: BitrixBizprocAutomationEngineDelayInterval
  • Вызов: DelayInterval::toActivityProperties
public function toActivityProperties(array $documentType)
{
	$properties = [
		'TimeoutTimeIsLocal' => 'N',
	];

	$worker = Helper::getResponsibleUserExpression($documentType);

	if (
		$this->getBasis() === Helper::CURRENT_DATETIME_BASIS
		&& $this->getType() === static::TYPE_AFTER
		&& !$this->isWorkTime()
	)
	{
		$valueType = $this->getValueType();
		if ($valueType === 'i')
		{
			$valueType = 'm';
		}

		$properties['TimeoutDuration'] = $this->getValue();
		$properties['TimeoutDurationType'] = $valueType;
	}
	elseif ($this->getType() === static::TYPE_IN && !$this->isWorkTime() && !$this->getInTime())
	{
		$properties['TimeoutTime'] = $this->getBasis();
	}
	else
	{
		$intervalProperties = $this->toArray();
		$intervalProperties['worker'] = $worker;

		$properties['TimeoutTime'] = Helper::getDateTimeIntervalString($intervalProperties);
	}

	if ($this->isWaitWorkDay())
	{
		$properties['WaitWorkDayUser'] = $worker;
	}

	return $properties;
}