CBPRuntime :: makeRestRobotDescription: Bitrix method

      
<?php 
//  CBPRuntime :: makeRestRobotDescription()
//  /dist/bitrix/modules/bizproc/classes/general/runtime.php:710

    
private function makeRestRobotDescription($activity$lang false$documentType null)
    {
        if (
$lang === false)
            
$lang LANGUAGE_ID;

        
$code = static::REST_ACTIVITY_PREFIX.$activity['INTERNAL_CODE'];
        
$result = array(
            
'NAME' => '['.RestActivityTable::getLocalization($activity['APP_NAME'], $lang).'] '
                
.RestActivityTable::getLocalization($activity['NAME'], $lang),
            
'DESCRIPTION' => RestActivityTable::getLocalization($activity['DESCRIPTION'], $lang),
            
'TYPE' => array('activity''robot_activity'),
            
'CLASS' => $code,
            
'JSCLASS' => 'BizProcActivity',
            
'CATEGORY' => array(),
            
'RETURN' => array(),
            
//compatibility
            
'PATH_TO_ACTIVITY' => '',
            
'ROBOT_SETTINGS' => array(
                
'CATEGORY' => 'other'
            
)
        );

        if (
            isset(
$activity['FILTER']) && is_array($activity['FILTER'])
            && !
$this->checkActivityFilter($activity['FILTER'], $documentType)
        )
            
$result['EXCLUDED'] = true;

        if (!empty(
$activity['RETURN_PROPERTIES']))
        {
            foreach (
$activity['RETURN_PROPERTIES'] as $name => $property)
            {
                
$result['RETURN'][$name] = array(
                    
'NAME' => RestActivityTable::getLocalization($property['NAME'], $lang),
                    
'TYPE' => isset($property['TYPE']) ? $property['TYPE'] : \Bitrix\Bizproc\FieldType::STRING
                
);
            }
        }
        if (
$activity['USE_SUBSCRIPTION'] !== 'N')
        {
            
$result['RETURN']['IsTimeout'] = array(
                
'NAME' => GetMessage('BPRA_IS_TIMEOUT'),
                
'TYPE' => \Bitrix\Bizproc\FieldType::INT
            
);
        }

        return 
$result;
    }