DelayInterval::toActivityProperties: Bitrix method

      
<?php 
//  Bitrix\Bizproc\Automation\Engine\DelayInterval :: toActivityProperties()
//  /dist/bitrix/modules/bizproc/lib/automation/engine/delayinterval.php:234

    
public function toActivityProperties(array $documentType null)
    {
        
$properties = [
            
'TimeoutTimeIsLocal' => 'N',//$this->isLocalTime() ? 'Y' : 'N'
        
];

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

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

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

        return 
$properties;
    }