- Модуль: bizproc
- Путь к файлу: ~/bitrix/modules/bizproc/lib/integration/rest/appconfiguration.php
- Класс: BitrixBizprocIntegrationRestAppConfiguration
- Вызов: AppConfiguration::exportBizproc
static function exportBizproc($step)
{
$result = [
'FILE_NAME' => '',
'CONTENT' => [],
'NEXT' => false,
];
$res = WorkflowTemplateTable::getList(
[
'order' => [
'ID' => 'ASC',
],
'filter' => [
'=MODULE_ID' => static::$accessModules,
' CBPDocumentEventType::Script,
],
'limit' => 1,
'offset' => $step,
]
);
if ($tpl = $res->fetchObject())
{
$result['NEXT'] = $step;
if (in_array($tpl->getModuleId(), static::$accessModules))
{
$result['FILE_NAME'] = $step;
$packer = new BitrixBizprocWorkflowTemplatePackerBpt();
$data = $packer->makePackageData($tpl);
$result['CONTENT'] = [
'ID' => $tpl->getId(),
'MODULE_ID' => $tpl->getModuleId(),
'ENTITY' => $tpl->getEntity(),
'DOCUMENT_TYPE' => $tpl->getDocumentType(),
'DOCUMENT_STATUS' => $tpl->getDocumentStatus(),
'NAME' => $tpl->getName(),
'AUTO_EXECUTE' => $tpl->getAutoExecute(),
'DESCRIPTION' => $tpl->getDescription(),
'SYSTEM_CODE' => $tpl->getSystemCode(),
'ORIGINATOR_ID' => $tpl->getOriginatorId(),
'ORIGIN_ID' => $tpl->getOriginId(),
'TEMPLATE_DATA' => $data,
];
}
}
return $result;
}