update help elma

This commit is contained in:
2025-05-27 21:32:35 +04:00
parent a6b05d6789
commit 898b22bf32
4500 changed files with 89372 additions and 120699 deletions

View File

@ -1,20 +1,19 @@
<!DOCTYPE html>
<html lang="ru">
<html lang="en">
<head>
<title>Скрипт</title>
<title>Script activity</title>
<meta name="generator" content="Help+Manual" />
<meta name="keywords" content="" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="Действие типа Скрипт можно использовать для создания интеграций, например, для отправки запросов во&nbsp;внешнюю систему. Настройки действия выполняются на трёх вкладках: Настройки,..." />
<meta name="description" content="This type of business process activity can be used to create integrations, for example, to send requests to an external system. Business process activity settings break into..." />
<meta name="picture" content="" />
<meta property="og:type" content="website" />
<meta property="og:title" content="Cправка по Low-code платформе ELMA365" />
<meta property="og:url" content="https://elma365.com/ru/help" />
<meta property="og:image" content="" />
<meta property="og:site_name" content="ELMA365" />
<meta property="og:title" content="Full documentation for BRIX365 platform. Low-code developer guide. User guide. Admin guide. Developer guide." />
<meta property="og:url" content="https://brix365.com/en/help" />
<meta property="og:image" content="" />
<link rel="icon" href="favicon.png" type="image/png" />
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet" />
@ -24,7 +23,6 @@
<link rel="stylesheet" href="./article.css" />
<link rel="stylesheet" href="./glossary.css" />
<link rel="stylesheet" href="./theme.css" />
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="helpman_settings.js"></script>
<script type="text/javascript" src="helpman_topicinit.js"></script>
@ -36,16 +34,16 @@
</head>
<body>
<script async src="https://www.googletagmanager.com/gtag/js?id=G-M6ETBEC1R9"></script><script>window.dataLayer=window.dataLayer || []; function gtag(){dataLayer.push(arguments);}gtag('js', new Date()); gtag('config', 'G-M6ETBEC1R9');</script>
<script>!function(e,t,c,n,r,a,m){e.ym=e.ym||function(){(e.ym.a=e.ym.a||[]).push(arguments)},e.ym.l=1*new Date;for(var s=0;s<document.scripts.length;s++)if(document.scripts[s].src===n)return;a=t.createElement(c),m=t.getElementsByTagName(c)[0],a.async=1,a.src=n,m.parentNode.insertBefore(a,m)}(window,document,"script","https://mc.yandex.ru/metrika/tag.js"),ym(83179930,"init",{clickmap:!0,trackLinks:!0,accurateTrackBounce:!0,webvisor:!0})</script><noscript><div><img alt=""src=https://mc.yandex.ru/watch/83179930 style=position:absolute;left:-9999px></div></noscript>
<header class="header elma-365">
<div class="container">
<a class="header__logo" href="https://elma365.com/ru/help">
<img src="./logo.svg" alt="header logo">
<a class="header__logo" href="https://brix365.com/en/help">
<img src="./logo-en.svg" alt="header logo">
</a>
<!-- <div class="hero__search-form" id="search-panel">
<form class="search-form" onsubmit="ym(83179930,'reachGoal','poisk')">
<form class="search-form" onsubmit="ym(83180416,'reachGoal','poisk')">
<label class="search-form__label">
<span id="reset-search" class="search__icon"></span>
<input class="search-form__input" type="text">
@ -65,7 +63,7 @@
</div>
<div class="header__navi">
<ul class="header__list"><li><span class="solution-select"><span class="solution-select__selected"></span><svg width="7" height="4" viewBox="0 0 7 4" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L3.5 3.5L6 1" stroke="white" stroke-linecap="round" stroke-linejoin="round"/></svg><ul class="solution-select__list"><li><a class="project-link" href="https://elma365.com/ru/help/platform/get-trial.html">Платформа</a></li><li><a class="project-link" href="https://elma365.com/ru/help/ecm/ecm-functions.html">ECM</a></li><li><a class="project-link" href="https://elma365.com/ru/help/crm/crm_overview.html">CRM</a></li><li><a class="project-link" href="https://elma365.com/ru/help/service/service-functions.html">Service</a></li><li><a class="project-link" href="https://elma365.com/ru/help/projects/projects-functions.html">Проекты</a></li><li><a class="project-link" href="https://elma365.com/ru/help/business_solutions/-elma365-store.html">Бизнес-решения</a></li></ul></span></li><li><a href="https://api.elma365.com/ru/"target="_blank">API</a></li><li><a href="https://tssdk.elma365.com/"target="_blank">SDK</a></li><li><a href="https://community.elma365.com/" target="_blank">Community</a></li><li><a href="https://elma-academy.com/ru/" target="_blank">Академия</a></li><li><a href="https://elma365.com/ru/" target="_blank">Сайт ELMA365</a></li></ul>
<ul class="header__list"><li><span class="solution-select"><span class="solution-select__selected"></span><svg width="7" height="4" viewBox="0 0 7 4" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1 1L3.5 3.5L6 1" stroke="white" stroke-linecap="round" stroke-linejoin="round"/></svg><ul class="solution-select__list"><li><a class="project-link" href="https://brix365.com/en/help/platform/get-trial.html">Platform</a></li><li><a class="project-link" href="https://brix365.com/en/help/ecm/ecm-functions.html">ECM</a></li><li><a class="project-link" href="https://brix365.com/en/help/crm/crm_overview.html">CRM</a></li><li><a class="project-link" href="https://brix365.com/en/help/service/service-functions.html">Service</a></li><li><a class="project-link" href="https://brix365.com/en/help/projects/projects-functions.html">Projects</a></li><li><a class="project-link" href="https://brix365.com/en/help/business_solutions/-elma365-store.html">Business Solutions</a></li></ul></span></li><li><a href="https://api.brix365.com/en/" target="_blank">API</a></li><li><a href="https://tssdk.brix365.com/" target="_blank">SDK</a></li></ul>
</div>
@ -80,8 +78,8 @@
<aside class="sidebar" id="sidebar">
<div class="sidebar__header">
<a class="header__logo" href="https://elma365.com/ru/help">
<img src="./logo-light.svg">
<a class="header__logo" href="https://brix365.com/en/help">
<img src="./logo-light-en.svg">
</a>
<span class="sidebar__close elma-365-close" id="close"></span>
</div>
@ -94,15 +92,15 @@
<div class="article-inner">
<div class="content">
<header class="article__header">
<div class="article__bread" style="display:flex; gap:10px;">
<div class="article__bread" style="display:flex; gap:10px;">
<span id="subcategory" class="search-res__item-category search-res__item-category_subcategory subcategory article__badge"></span>
<div class="topic__breadcrumbs">
<p><a href="360024498352.html">Модули расширения системы</a> &gt; <a href="extentions.html">Пользовательские модули</a> &gt; <a href="extention-activities.html">Действия в бизнес-процессах</a> / Скрипт</p>
<p><a href="360024498352.html">Modules</a> &gt; <a href="extentions.html">Custom modules</a> &gt; <a href="extention-activities.html">Business process activities</a> / Script activity</p>
</div>
</div>
<div class="topic__title"><h1 class="p_Heading1"><span class="f_Heading1">Скрипт</span></h1>
<div class="topic__title"><h1 class="p_Heading1"><span class="f_Heading1">Script activity</span></h1>
</div>
</header>
@ -111,87 +109,88 @@
<a href="#h1-article" class="scroll-top"></a>
</div>
<!-- Placeholder for topic body. -->
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">Действие типа </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Скрипт</span> можно использовать для создания интеграций, например, для отправки запросов во внешнюю систему. Настройки действия выполняются на трёх вкладках: <span style="font-weight: bold;">Настройки</span>, <span style="font-weight: bold;">Контекст</span>, <span style="font-weight: bold;">Скрипты</span>.</p>
<h2 class="p_Heading2"><span class="f_Heading2">Вкладка «Настройки»</span></h2>
<p class="p_Normal">На вкладке <span style="font-weight: bold;">Настройки</span> укажите:</p>
<p style="background: #ffffff; margin: 14px 0 0 0;"><img alt="exten_8" width="628" height="421" style="margin:0;width:628px;height:421px;border:none" src="exten_8.png"/></p>
<p style="line-height: 1.20; margin: 7px 0 16px 0;"><span style="font-family: Inter;">This type of business process activity can be used to create integrations, for example, to send requests to an external system. Business process activity settings break into three tabs: </span><span style="font-family: Inter; font-weight: bold;">Settings</span><span style="font-family: Inter;">, </span><span style="font-family: Inter; font-weight: bold;">Context</span><span style="font-family: Inter;">, and </span><span style="font-family: Inter; font-weight: bold;">Scripts</span><span style="font-family: Inter;">.</span></p>
<h2 class="p_Heading2"><span class="f_Heading2">Settings tab</span></h2>
<p style="line-height: 1.20; margin: 7px 0 16px 0;"><span style="font-family: Inter;">On the </span><span style="font-family: Inter; font-weight: bold;">Settings</span><span style="font-family: Inter;"> tab, specify:</span></p>
<p style="line-height: 1.20; margin: 7px 0 7px 0;"><img alt="script-activity-1" width="702" height="658" style="margin:0;width:702px;height:658px;border:none" src="script-activity-1.png"/></p>
<ul style="list-style-type:disc">
<li class="p_Normal"><span style="font-weight: bold;">Название</span> — наименование действия;</li><li class="p_Normal"><span style="font-weight: bold;">Название по умолчанию</span> — наименование, отображающееся на блоке действия при добавлении его на схему бизнес‑процесса;</li><li class="p_Normal"><span style="font-weight: bold;">Цвет блока</span> — цвет, в который будет окрашен блок действия на схеме процесса;</li><li class="p_Normal"><a id="description" class="hmanchor"></a><span style="font-weight: bold;">Описание</span> — описание функциональных возможностей действия и его особенностей;</li><li class="p_Normal"><span style="font-weight: bold;">Устаревшее</span> — опция позволяет скрыть элемент из дизайнера бизнес-процессов, чтобы пользователи не смогли добавлять его на схемы новых процессов. Устаревшие действия продолжат работать без изменений в уже созданных процессах. Например, можно включить опцию для блока после обновления модуля;</li><li class="p_Normal"><a id="execution-model" class="hmanchor"></a><span style="font-weight: bold;">Модель выполнения</span> — способ выполнения действия:<ul style="list-style-type:circle">
<li class="p_Normal"><span style="font-weight: bold;">Синхронное</span> — простое выполнение заданного в действии скрипта, то есть синхронное исполнение функции <code><b>action()</b></code>. Действие с синхронным выполнением можно вызвать как функцию из других скриптов. Подробнее читайте в разделе <a href="script-activity.html#call-actions-in-scripts" class="topiclink">«Вызов действий в скриптах»</a>;</li><li class="p_Normal"><span style="font-weight: bold;">Запрос результата</span> — после выполнения заданного скрипта во внешний сервис отправится запрос о значении статуса. Для реализации такого подхода в действии нужно определить функцию проверки результата <code><b>check()</b></code>. Бизнес‑процесс продолжится только после того, как функция <code><b>check()</b></code> вернёт ответ <code><b>true</b></code>;</li><li class="p_Normal"><span style="font-weight: bold;">Обратный вызов</span> — в обращении к внешнему сервису передаётся URL, на который необходимо вернуть результат. То есть в параметрах вызова передаётся адрес, который будет вызван после выполнения задачи внешним сервисом, и на который будут отправлены результаты выполнения. URL ответа передаётся как входной аргумент функции <code><b>action()</b></code>. Любой запрос на данный URL передаётся в функцию <code><b>callback()</b></code>. После этого выполнение процесса продолжится;</li></ul>
<li class="p_Normal"><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Период проверки результата</span><span style="font-size: 15px; font-family: Inter; font-weight: bold; color: #ff0000;">* </span><span style="font-size: 15px; font-family: Inter;">— задайте частоту вызова функции </span><code><b>check()</b></code><span style="font-size: 15px; font-family: Inter;">. Опция используется для модели выполнения </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Запрос результата</span><span style="font-size: 15px; font-family: Inter;">;</span></li><li class="p_Normal"><span style="font-weight: bold;">Количество повторов при ошибке</span> — укажите количество попыток выполнения действия;</li><li class="p_Normal"><span style="font-weight: bold;">Пауза между повторами при ошибке (сек)</span><span style="font-weight: bold; color: #ff0000;">*</span> — определите частоту попыток.</li></ul>
<h2 class="p_Heading2"><a id="context" class="hmanchor"></a><span class="f_Heading2">Вкладка «Контекст»</span></h2>
<p style="background: #ffffff; margin: 14px 0 0 0;"><span style="color: #394149;">На вкладке </span><span style="font-weight: bold; color: #394149;">Контекст</span><span style="color: #394149;"> вы можете добавить переменные, </span><span style="font-size: 15px; font-family: Inter;">с помощью которых передаются данные между действием и процессом или приложением. Для этого нажмите </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">+ Добавить</span><span style="font-size: 15px; font-family: Inter;"> и настройте переменную в зависимости от её </span><span style="font-size: 15px; font-family: Inter; color: #0563c1;"><a href="360009707032.html" class="topiclink">типа</a></span><span style="font-size: 15px; font-family: Inter;">. Затем определите, какие переменные являются входными и выходными, и укажите обязательность их заполнения.</span></p>
<p style="background: #ffffff; margin: 14px 0 0 0;"><img alt="script-activity-2" width="964" height="369" style="margin:0;width:964px;height:369px;border:none" src="script-activity-2.png"/></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">Для действия типа </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Скрипт</span><span style="font-size: 15px; font-family: Inter;"> также можно настроить </span><span style="font-size: 15px; font-family: Inter; color: #0563c1;"><a href="activities-features.html#script" class="topiclink">динамическое создание переменных с помощью скрипта</a></span><span style="font-size: 15px; font-family: Inter;">. В этом случае набор переменных не задаётся в настройках действия, а формируется при открытии формы сопоставления. Например, это удобно для интеграции с внешними сервисами, в которых набор полей может изменяться. </span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">Кроме того, вы можете настроить пользовательскую форму сопоставления, например, чтобы сотрудник увидел информационный блок с подсказками.</span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">Подробнее о настройке и сопоставлении переменных читайте в статье </span><span style="font-size: 15px; font-family: Inter; color: #0563c1;"><a href="activities-features.html" class="topiclink">«Биндинг переменных для действий в бизнес‑процессах»</a></span><span style="font-size: 15px; font-family: Inter;">.</span></p>
<h2 class="p_Heading2"><a id="scripts-tab" class="hmanchor"></a><span class="f_Heading2">Вкладка «Скрипты»</span></h2>
<p style="background: #ffffff; margin: 14px 0 0 0;"><span style="color: #394149;">На вкладке </span><span style="font-weight: bold; color: #394149;">Скрипты</span><span style="color: #394149;"> создаётся скрипт действия. </span><span style="font-size: 13px; color: #394149; background-color: #ffffff;">Для написания скриптов используется язык программирования </span><span style="font-size: 13px; background-color: #ffffff;"><a href="https://www.typescriptlang.org/" target="_blank" class="weblink">TypeScript</a></span><span style="font-size: 13px; color: #394149; background-color: #ffffff;">. Подробнее о принципах написания скриптов в ELMA365 вы можете прочитать в <a href="https://tssdk.elma365.com/ru/latest/index.html" target="_blank" class="weblink">справке ELMA365 TS SDK</a>.</span><span style="font-family: 'Times New Roman',Times,Georgia,serif;"> </span></p>
<p style="background: #ffffff; margin: 14px 0 0 0;"><span style="font-size: 15px; font-family: Inter;">По умолчанию в скрипте действия можно обращаться только к свойствам, процессам, методам API из модуля, на уровне которого действие настроено. Вы можете предоставить доступ к другим объектам системы в скрипте, используя </span><span style="font-size: 15px; font-family: Inter; color: #0563c1;"><a href="global-constants.html" class="topiclink">глобальные константы</a></span><span style="font-size: 15px; font-family: Inter;">. Для этого на верхней панели нажмите </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Настройки</span><span style="font-size: 15px; font-family: Inter;">.</span></p>
<p style="background: #ffffff; margin: 14px 0 0 0;"><img alt="api-2" width="873" height="306" style="margin:0;width:873px;height:306px;border:none" src="api-2.png"/></p>
<p style="page-break-after: avoid; background: #ffffff; margin: 14px 0 0 0;"><span style="font-size: 15px; font-family: Inter;">Вы можете использовать опции:</span></p>
<li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter; font-weight: bold;">Name</span><span style="font-family: Inter;">. Name of the business process activity.</span></li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter; font-weight: bold;">Default name.</span><span style="font-family: Inter;"> This name is displayed on the business process activity element when it is added to the business process diagram.</span></li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter; font-weight: bold;">Activity color</span><span style="font-family: Inter;">. The color of the business process activity shape on the process diagram.</span></li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter; font-weight: bold;">Description</span><span style="font-family: Inter;">. The description of the business process activitys functionality and features.</span></li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter; font-weight: bold;">Outdated</span><span style="font-family: Inter;">. This option allows you to hide the element from the business process designer so that users cannot add it to the diagrams of new processes. Outdated actions will continue to work unchanged in already created processes. For example, you can enable the option for an activity after a module update.</span></li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter; font-weight: bold;">Message if the activity is outdated</span><span style="font-family: Inter;">. Text of the alert informing that a process includes outdated activities. This message is shown when a user publishes a process with outdated activities.</span></li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter; font-weight: bold;">Execution model</span><span style="font-family: Inter;">. Specify the way the activity is performed:</span></li></ul>
<ul style="list-style-type:disc"><ul style="list-style-type:circle">
<li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter; font-weight: bold;">Synchronous</span><span style="font-family: Inter;">. Simple execution of a script specified in the activity, i. e. synchronous execution of the </span><code><b>action()</b></code><span style="font-family: Inter;"> function. An action with synchronous execution can be called as a function from other scripts. For more details, see the <a href="script-activity.html#call-actions-in-scripts" class="topiclink">Call activity in scripts</a> section of the article.</span></li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter; font-weight: bold;">Result Request</span><span style="font-family: Inter;">.The system executes the specified script and sends a status request to an external service. To implement this approach in a business process activity, you need to define the </span><code><b>check()</b></code><span style="font-family: Inter;"> function that checks the result. The business process will continue after the </span><code><b>check()</b></code><span style="font-family: Inter;"> function returns </span><code><b>true()</b></code><span style="font-family: Inter;">.</span></li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter; font-weight: bold;">Callback</span><span style="font-family: Inter;">.In a request to an external service, a URL that the result needs to be returned to is passed. This means that this URL is passed as the call parameter, and this URL will be called when the external service completes the task. Results of the call will be sent to this URL. The response URL is provided as an input argument to the </span><code><b>action()</b></code><span style="font-family: Inter;"> function. Any request for this URL is passed to the </span><code><b>callback()</b></code><span style="font-family: Inter;"> function. After that, the process continues</span></li></ul></li></ul>
<ul style="list-style-type:disc">
<li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Глобальные константы</span><span style="font-size: 15px; font-family: Inter;"> — установите флажок напротив опции </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Global</span><span style="font-size: 15px; font-family: Inter;">, чтобы получить возможность обращаться к объектам из всех разделов системы и к глобальным параметрам. Для этого применяется константа </span><span style="font-size: 15px; font-family: Inter; color: #0563c1;"><a href="https://tssdk.elma365.com/ru/latest/pages/quick-start/intro_globals.html#global" target="_blank" class="weblink">Global</a></span><span style="font-size: 15px; font-family: Inter;">;</span></li></ul>
<li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter; font-weight: bold;">Number of retries in case of error</span><span style="font-family: Inter;">. Specifies how many times the system will try to execute the activity.</span></li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter; font-weight: bold;">Retry delay (sec)</span><span style="font-family: Inter; font-weight: bold; color: #ff0000;">*</span><span style="font-family: Inter;">. Defines the frequency of attempts.</span></li></ul>
<h2 class="p_Heading2"><span class="f_Heading2">Context tab</span></h2>
<p style="line-height: 1.20; margin: 7px 0 16px 0;"><span style="font-family: Inter;">On the </span><span style="font-family: Inter; font-weight: bold;">Context</span><span style="font-family: Inter;"> tab, you can add variables to use in the business process activity. To create a new context variable, click </span><span style="font-family: Inter; font-weight: bold;">+Add</span><span style="font-family: Inter;">. Read more about variable types in the <a href="360009707032.html" class="topiclink">System data types</a> article.</span></p>
<p style="line-height: 1.20; margin: 7px 0 16px 0;"><img alt="script_activity_01" width="708" height="272" style="margin:0;width:708px;height:272px;border:none" src="script_activity_01.png"/></p>
<p style="line-height: 1.20; margin: 7px 0 16px 0;">Context variables of an activity can be passed to the business process this activity is added to. An activity, in turn, can get the values of the variables from the business process context. </p>
<p style="line-height: 1.20; margin: 7px 0 16px 0;">To pass variables, you must define which variables are input and output ones. Once you have added the activity to the process diagram, you can map these variables to the process context. Read more about this in the <a href="activities-features.html" class="topiclink">Binding and other aspects of business process activities</a> article.</p>
<h2 class="p_Heading2"><a id="scripts-tab" class="hmanchor"></a><span class="f_Heading2">Scripts tab</span></h2>
<p style="line-height: 1.20; margin: 7px 0 16px 0;"><span style="font-size: 13px; font-family: Inter; color: #394149;">On the </span><span style="font-size: 13px; font-family: Inter; font-weight: bold; color: #394149;">Scripts</span><span style="font-size: 13px; font-family: Inter; color: #394149;"> tab, you can create a business process activity script. Scripts are written in the </span><span style="font-size: 13px; font-family: Inter; color: #0000ff;"><a href="https://www.typescriptlang.org/" target="_blank" class="weblink">TypeScript</a></span><span style="font-size: 13px; font-family: Inter; color: #394149;"> programming language. If you want to know more about the basic principles of script-writing in </span><span style="font-size: 13px; font-family: Inter; color: #394149; background-color: #ffffff;">BRIX</span><span style="font-size: 13px; font-family: Inter; color: #394149;">, please visit <a href="https://tssdk.brix365.com/en/latest/" target="_blank" class="weblink">BRIX TypeScript SDK</a>.</span></p>
<p style="line-height: 1.20; margin: 7px 0 16px 0;"><span style="font-size: 13px; font-family: Inter; color: #394149;">By default, in an activity script, you can only access properties, processes, and API methods from the module where the activity is configured. You can grant access to other system objects in the script using <a href="https://tssdk.brix365.com/en/modules/_03_globals_.html" target="_blank" class="weblink">Global constants</a>. To do this, click </span><span style="font-size: 13px; font-family: Inter; font-weight: bold; color: #394149;">Settings</span><span style="font-size: 13px; font-family: Inter; color: #394149;"> in the menu at the top of the page.</span></p>
<p style="line-height: 1.20; margin: 7px 0 16px 0;"><img alt="script-activity-6" width="710" height="405" style="margin:0;width:710px;height:405px;border:none" src="script-activity-6.png"/></p>
<p style="line-height: 1.20; page-break-after: avoid; background: #ffffff; margin: 14px 0 0 0;"><span style="font-family: Inter;">You can use the following options:</span></p>
<ul style="list-style-type:disc">
<li style="line-height: 1.20; background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-family: Inter; font-weight: bold;">Global constants</span><span style="font-family: Inter;">. Check the Global option to be able to refer to objects from all workspaces in the system and to global parameters. For this purpose, the </span><span style="font-family: Inter; color: #0563c1;"><a href="https://tssdk.brix365.com/en/latest/pages/quick-start/intro_globals.html#global" target="_blank" class="weblink">Global</a></span><span style="font-family: Inter;"> constant is used.</span></li></ul>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">начало&nbsp;внимание</span></p>
<p style="background: #ffffff; margin: 14px 0 0 0;"><span style="font-size: 15px; font-family: Inter;">При использовании константы </span><code><b>Global</b></code><span style="font-size: 15px; font-family: Inter;"> в скрипте действия модуль с этим действием нельзя </span><span style="font-size: 15px; font-family: Inter; color: #0563c1;"><a href="export_extention.html" class="topiclink">экспортировать</a></span><span style="font-size: 15px; font-family: Inter;">.</span></p>
<p style="line-height: 1.20; background: #ffffff; margin: 14px 0 0 0;"><span style="font-size: 15px; font-family: Inter;">When the </span><code><b>Global</b></code><span style="font-size: 15px; font-family: Inter;"> constant is used in a script, the module with this activity cannot be </span><span style="font-size: 15px; font-family: Inter; color: #0563c1;"><a href="export_extention.html" class="topiclink">exported</a></span><span style="font-size: 15px; font-family: Inter;">.</span></p>
<p class="p_CodeExample" style="page-break-inside: avoid;"><span class="f_CodeExample">конец&nbsp;внимание</span></p>
<ul style="list-style-type:disc">
<li style="background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Опциональные зависимости (доступны в объекте Imports) </span><span style="font-size: 15px; font-family: Inter;">— выберите разделы или пользовательские модули, чтобы установить от них </span><span style="font-size: 15px; font-family: Inter; color: #0000ff;"><a href="optional-dependencies.html" class="topiclink">опциональные зависимости</a></span><span style="font-size: 15px; font-family: Inter;">. После этого к ним можно обращаться через константу </span><span style="font-size: 15px; font-family: Inter; color: #0563c1;"><a href="optional-dependencies.html#use-imports" class="topiclink">Imports</a></span><span style="font-size: 15px; font-family: Inter;">. При использовании опциональных зависимостей модуль можно экспортировать без ограничений.</span></li></ul>
<p style="background: #ffffff; margin: 14px 0 0 34px;"><span style="font-size: 15px; font-family: Inter;">Чтобы создать зависимость, нажмите </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">+ Добавить раздел</span><span style="font-size: 15px; font-family: Inter;"> и выберите компонент системы. Затем в колонке </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Псевдоним</span><span style="font-size: 15px; font-family: Inter;"> задайте для него уникальное имя, которое будет использоваться в скрипте. Допустимы латинские буквы и цифры, для разделения слов можно использовать знак подчёркивания. По умолчанию используется код раздела или ID модуля.</span></p>
<p style="margin: 7px 0 7px 0;"><span style="font-size: 13px; color: #394149;">После внесения данных о действии нажмите на верхней панели </span><span style="font-size: 13px; font-weight: bold; color: #394149;">Сохранить</span><span style="font-size: 13px; color: #394149;"> и </span><span style="font-size: 13px; font-weight: bold; color: #394149;">Опубликовать</span><span style="font-size: 13px; color: #394149;">.</span></p>
<p style="margin: 7px 0 7px 0;">При включённом модуле действие <span style="color: #394149;">будет доступно </span><span style="font-family: 'Times New Roman',Times,Georgia,serif;">в <a href="360012265552.html#process-page" class="topiclink">дизайнере бизнес-процессов</a>, на панели инструментов справа от поля для моделирования, на вкладке </span><span style="font-family: 'Times New Roman',Times,Georgia,serif; font-weight: bold;">Интеграции</span><span style="font-family: 'Times New Roman',Times,Georgia,serif;">. Блок можно добавить на схему процесса и <a href="module-action.html" class="topiclink">задать настройки для его выполнения</a>.</span></p>
<h2 class="p_Heading2"><a id="tracing" class="hmanchor"></a><span class="f_Heading2">Трассировка скрипта действия</span></h2>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">Когда действие опубликовано, вы можете собирать информацию о выполнении его скрипта. Это позволяет оценить продолжительность отдельных запросов, оптимизировать код и выявить причины ошибок.</span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">Для этого в разделе </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Администрирование &gt; Инструменты разработчика</span><span style="font-size: 15px; font-family: Inter;"> включите трассировку по действию. После этого вы сможете посмотреть собранные данные, выбрав в настройках действия на верхней панели опцию </span><span style="font-size: 15px; font-family: Inter; font-weight: bold;">Трассировка</span><span style="font-size: 15px; font-family: Inter;">.</span></p>
<p style="line-height: 1.28; margin: 0 0 11px 0;"><span style="font-size: 15px; font-family: Inter;">Подробнее о включении трассировки и информации в трейсе читайте в статье </span><span style="font-size: 15px; font-family: Calibri,Vectora,'Droid Sans','Open Sans',Frutiger,sans-serif; color: #0563c1;"><a href="server-script-tracing.html" class="topiclink">«Трассировка серверных скриптов»</a></span><span style="font-size: 15px; font-family: Inter;">.</span></p>
<h2 class="p_Heading2"><a id="call-actions-in-scripts" class="hmanchor"></a><span class="f_Heading2">Вызов действий в скриптах</span></h2>
<p style="margin: 7px 0 7px 0;"><span style="font-family: Inter;">С помощью действий в бизнес-процессах можно создать в модуле пользовательскую библиотеку функций. В отличие от методов API, в действиях задаются входные и выходные переменные, для которых указывается определённый </span><span style="font-family: Inter; color: #0563c1;"><a href="360009707032.html" class="topiclink">тип</a></span><span style="font-family: Inter;">. Это позволяет при написании скрипта чётко понимать, данные каких типов нужно передавать при вызове действия и каким будет результат его выполнения.</span></p>
<p style="margin: 7px 0 7px 0;"><span style="font-family: Inter;">В скриптах можно вызывать только действия типа </span><span style="font-family: Inter; font-weight: bold;">Скрипт</span><span style="font-family: Inter;"> с моделью выполнения </span><span style="font-family: Inter; color: #0000ff;"><a href="script-activity.html#execution-model" class="topiclink">Синхронное</a></span><span style="font-family: Inter;">.</span></p>
<p style="margin: 7px 0 7px 0;"><span style="font-family: Inter;">Действие можно использовать:</span></p>
<li style="line-height: 1.20; background: #ffffff; margin-top: 14px; margin-right: 0; margin-bottom: 0;"><span style="font-family: Inter; font-weight: bold;">Optional dependencies (available in the Imports object)</span><span style="font-family: Inter;">. Select workspaces or custom modules to add </span><span style="font-family: Inter; color: #0000ff;"><a href="optional-dependencies.html" class="topiclink">optional dependencies</a> </span><span style="font-family: Inter;">to them. They can then be accessed via the </span><span style="font-family: Inter; color: #0563c1;"><a href="optional-dependencies.html#use-imports" class="topiclink">Imports</a></span><span style="font-family: Inter;"> constant. When using optional dependencies, the module can be exported without restrictions.</span></li></ul>
<p style="line-height: 1.20; background: #ffffff; margin: 14px 0 0 34px;"><span style="font-family: Inter;">To create a dependency, click </span><span style="font-family: Inter; font-weight: bold;">+Add workspace</span><span style="font-family: Inter;"> and select a system component. Then, in the </span><span style="font-family: Inter; font-weight: bold;">Alias</span><span style="font-family: Inter;"> column, give it a unique name to be used in the script. Latin letters and numbers are acceptable, and you can use an underscore to separate words. By default, the workspace code or module ID is used.</span></p>
<p style="line-height: 1.20; margin: 7px 0 7px 0;">After entering the activity details, click <span style="font-weight: bold;">Save</span> and <span style="font-weight: bold;">Publish</span> in the top pane of the settings window.</p>
<p style="line-height: 1.20; margin: 7px 0 7px 0;">With the module enabled, the activity will be available in the <a href="360012265552.html#process-page" class="topiclink">business process designer</a>, on the toolbar to the right of the modeling field, on the <span style="font-weight: bold;">Integrations</span> tab. You can add the graphical element on the process flow chart and <a href="module-action.html" class="topiclink">configure the settings for its execution</a>.</p>
<h2 class="p_Heading2"><a id="tracing" class="hmanchor"></a><span class="f_Heading2">Trace activity scripts</span></h2>
<p style="line-height: 1.20; margin: 7px 0 7px 0;">When an activity is published, you can collect information about the execution of its script. This helps you evaluate the duration of individual requests, optimize the code, and identify the causes of errors.</p>
<p style="line-height: 1.20; margin: 7px 0 7px 0;">To do this, enable tracing by activity in <span style="font-weight: bold;">Administration &gt; Developer Tools</span>. After that, you will be able to view the collected data by selecting the <span style="font-weight: bold;">Tracing</span> option in the activity settings.</p>
<p style="line-height: 1.20; margin: 7px 0 7px 0;">Read more about enabling tracing and trace information in the <a href="server-script-tracing.html" class="topiclink">Trace server scripts</a> article.</p>
<h2 class="p_Heading2"><a id="call-actions-in-scripts" class="hmanchor"></a><span class="f_Heading2">Call activity in scripts</span></h2>
<p style="line-height: 1.20; margin: 7px 0 7px 0;"><span style="font-family: Inter;">In business processes, custom function libraries can be created within modules through the use of actions. Unlike API methods, actions specify input and output variables with defined </span><span style="font-family: Inter; color: #0563c1;"><a href="360009707032.html" class="topiclink">types</a></span><span style="font-family: Inter;">. This helps to clearly understand what types of data need to be passed when calling an action and what the result of its execution will be.</span></p>
<p style="line-height: 1.20; margin: 7px 0 7px 0;"><span style="font-family: Inter;">Activities of the type </span><span style="font-family: Inter; font-weight: bold;">Script</span><span style="font-family: Inter;"> with the </span><span style="font-family: Inter; font-weight: bold;">Synchronous</span><span style="font-family: Inter;"> model can only be called in scripts.</span></p>
<p style="line-height: 1.20; margin: 7px 0 7px 0;"><span style="font-family: Inter;">An activity can be used:</span></p>
<ul style="list-style-type:disc">
<li style="margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter;">внутри модуля, на уровне которого оно настроено: в скриптах других действий, методов API, бизнес‑процессов, обработчиков событий;</span></li><li style="margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter;">в скриптах других компонентов системы, в которых установлена </span><span style="font-family: Inter; color: #0563c1;"><a href="optional-dependencies.html" class="topiclink">опциональная зависимость</a></span><span style="font-family: Inter;"> от модуля с данным действием.</span></li></ul>
<p style="margin: 7px 0 7px 0;"><span style="font-family: Inter;">Для обращения к действию используется свойство </span><code><b>action</b></code><span style="font-family: Inter;">, которое доступно, если в модуле опубликовано подходящее действие. Для вызова применяется метод </span><code><b>call()</b></code><span style="font-family: Inter;">, в качестве параметра которого передаётся объект с входными переменными действия.</span></p>
<p style="margin: 7px 0 7px 0;"><span style="font-family: Inter;">При обращении к свойству </span><code><b>action</b></code><span style="font-family: Inter;"> и действию используется оператор </span><code><b>?.</b></code><span style="font-size: 13px;"> —</span><span style="font-family: Inter;"> </span><span style="font-family: Inter; color: #0563c1;"><a href="https://tssdk.elma365.com/ru/latest/index.html#elvis-operator-" target="_blank" class="weblink">оператор опциональной последовательности</a></span><span style="font-family: Inter;">. Это необходимо, чтобы в случае удаления действия обращение к модулю обрабатывалось корректно.</span></p>
<p style="margin: 7px 0 7px 0;"><span style="font-family: Inter;">Обратите внимание, если входная переменная действия обязательна и имеет значение по умолчанию, во входной структуре метода </span><code><b>call()</b></code><span style="font-family: Inter;"> она становится необязательной. В выходной структуре метода, вне зависимости от обязательности выходной переменной, она также становится необязательной.</span></p>
<p style="margin: 16px 0 7px 0;"><span style="font-family: Inter;">В качестве примера рассмотрим действие, которое позволяет получить курсы валют ЦБ РФ. У действия есть входные переменные — код валюты (тип </span><span style="font-family: Inter; color: #0563c1;"><a href="https://tssdk.elma365.com/ru/latest/modules/_02_types_.html#tstring" target="_blank" class="weblink">Строка</a></span><span style="font-family: Inter;">) и текущая дата (тип </span><span style="font-family: Inter; color: #0563c1;"><a href="https://tssdk.elma365.com/ru/latest/interfaces/_02_types_.tdate.html" target="_blank" class="weblink">Дата</a></span><span style="font-family: Inter;">), а также выходная переменная — курс валюты (тип </span><span style="font-family: Inter; color: #0563c1;"><a href="https://tssdk.elma365.com/ru/latest/modules/_02_types_.html#tfloat" target="_blank" class="weblink">Число</a></span><span style="font-family: Inter;">).</span></p>
<p style="margin: 16px 0 7px 0;"><span style="font-family: Inter;">В скриптах модуля действие можно вызвать следующим образом:</span></p>
<p class="p_CodeExample" style="white-space: normal; page-break-inside: avoid;"><span class="f_CodeExample">// Создание объекта, в который передаются параметры для выполнения действия — код валюты и текущая дата</span><br />
<li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter;">Within the module where it is configured: in scenarios of other actions, API methods, business processes, and event handlers.</span></li><li style="line-height: 1.20; margin-top: 7px; margin-right: 0; margin-bottom: 7px;"><span style="font-family: Inter;">In scripts of other system components that have an </span><span style="font-family: Inter; color: #0563c1;"><a href="optional-dependencies.html" class="topiclink">optional dependency</a> </span><span style="font-family: Inter;">on the module with this action.</span></li></ul>
<p style="line-height: 1.20; margin: 7px 0 7px 0;"><span style="font-family: Inter;">To call the activity, the </span><code><b>action</b></code><span style="font-family: Inter;"> property is used; it is available if an appropriate activity is published in the module. The method </span><code><b>call()</b></code><span style="font-family: Inter;"> is used to call it, and an object with the activitys input variables is passed as a parameter.</span></p>
<p style="line-height: 1.20; margin: 7px 0 7px 0;"><span style="font-family: Inter;">When accessing the </span><code><b>action</b></code><span style="font-family: Inter;"> property and the activity, the </span><code><b>?.</b></code><span style="font-family: Inter;"> operator is used, </span><span style="font-family: Inter; color: #0563c1;"><a href="https://tssdk.brix365.com/en/latest/index.html#elvis-operator-" target="_blank" class="weblink">optional chaining operator</a></span><span style="font-family: Inter;">. This is necessary to handle the scenario correctly in case the action is deleted from the module.</span></p>
<p style="line-height: 1.20; margin: 7px 0 7px 0;"><span style="font-family: Inter;">Note that if an input variable of the activity is mandatory and has a default value, it becomes optional in the input structure of the </span><code><b>call()</b></code><span style="font-size: 13px;"> </span><span style="font-family: Inter;">method. Regardless of the mandatory nature of the output variable, it also becomes optional in the output structure of the method.</span></p>
<p style="line-height: 1.20; margin: 7px 0 7px 0;"><span style="font-family: Inter;">As an example, consider an action that retrieves exchange rates from the Central Bank. The action has input variable: currency code (type </span><span style="font-family: Inter; color: #0563c1;"><a href="https://tssdk.brix365.com/en/latest/modules/_02_types_.html#tstring" target="_blank" class="weblink">String</a></span><span style="font-family: Inter;">) and current date (type </span><span style="font-family: Inter; color: #0563c1;"><a href="https://tssdk.brix365.com/en/latest/interfaces/_02_types_.tdate.html" target="_blank" class="weblink">Date</a></span><span style="font-family: Inter;">). The output variable is the exchange rate (type </span><span style="font-family: Inter; color: #0563c1;"><a href="https://tssdk.brix365.com/en/latest/modules/_02_types_.html#tfloat" target="_blank" class="weblink">Number</a></span><span style="font-family: Inter;">).</span></p>
<p style="line-height: 1.20; margin: 7px 0 7px 0;"><span style="font-family: Inter;">In module scripts, the action can be called as follows:</span></p>
<p class="p_CodeExample" style="white-space: normal; page-break-inside: avoid;"><span class="f_CodeExample">// Create an object for passing activity execution parameters — the currency code and current date</span><br />
<span class="f_CodeExample">let input: {</span><br />
<span class="f_CodeExample"> &nbsp; &nbsp;currency_code: TString;</span><br />
<span class="f_CodeExample"> &nbsp; &nbsp;date: TDate;</span><br />
<span class="f_CodeExample">};</span><br />
<span class="f_CodeExample">&nbsp;</span><br />
<span class="f_CodeExample">// Создание объекта, в который будет записываться результат выполнения действия — курс валюты</span><br />
<span class="f_CodeExample">// Create an object that will store the result of the activity — currency code</span><br />
<span class="f_CodeExample">let output: {</span><br />
<span class="f_CodeExample"> &nbsp; &nbsp;currency_rate?: TFloat;</span><br />
<span class="f_CodeExample">}</span><br />
<span class="f_CodeExample">&nbsp;</span><br />
<span class="f_CodeExample">// Запись кода валюты из контекста и текущей даты, чтобы передать данные во входные переменные действия</span><br />
<span class="f_CodeExample">// Write currency code from the context, and the current date, in order to pass the date to the input variables of the activity</span><br />
<span class="f_CodeExample">input = {</span><br />
<span class="f_CodeExample"> &nbsp; &nbsp;currency_code: Context.data.currency_code,</span><br />
<span class="f_CodeExample"> &nbsp; &nbsp;date: new TDate(),</span><br />
<span class="f_CodeExample">};</span><br />
<span class="f_CodeExample">&nbsp;</span><br />
<span class="f_CodeExample">// Вызов действия для получения курса валюты, настроенного внутри модуля</span><br />
<span class="f_CodeExample">// Call the activity for getting the exchange rate set inside the module</span><br />
<span class="f_CodeExample">output = await Namespace.action?.get_currency_rate?.call(input);</span><br />
<span class="f_CodeExample">&nbsp;</span><br />
<span class="f_CodeExample">// Проверка, что результат выполнения действия получен</span><br />
<span class="f_CodeExample">// Check if the result is received</span><br />
<span class="f_CodeExample">if (output) {</span><br />
<span class="f_CodeExample"> &nbsp; &nbsp;// Получение данных из объекта, в который записан результат </span><br />
<span class="f_CodeExample"> &nbsp; &nbsp;// Get data from the object that stores the result </span><br />
<span class="f_CodeExample"> &nbsp; &nbsp;Context.data.current_currency_rate = output.currency_rate;</span><br />
<span class="f_CodeExample">}</span></p>
<p style="margin: 32px 0 7px 0;"><span style="font-family: Inter;">Действие также можно вызвать из скрипта компонента, который не является частью модуля. Например, из виджета на уровне раздела или из обработчика событий на уровне другого модуля. Для этого в настройках скриптов компонента нужно установить опциональную зависимость от модуля с данным действием. После этого к действию можно обратиться с помощью глобальной константы </span><code><b>Imports</b></code><span style="font-family: Inter;">. Подробнее читайте в статье </span><span style="font-family: Inter; color: #0563c1;"><a href="optional-dependencies.html" class="topiclink">«Опциональные зависимости»</a></span><span style="font-family: Inter;">.</span></p>
<p style="margin: 7px 0 7px 0;"><span style="font-family: Inter;">Допустим, в скрипте бизнес-процесса на уровне раздела установлена опциональная зависимость от модуля, в котором настроено действие для получения курса валют. Для модуля в настройках зависимостей установлено уникальное имя </span><code><b>currency_module</b></code><span style="font-family: Inter;">. Вызвать действие из скрипта процесса можно следующим образом:</span></p>
<p class="p_CodeExample" style="white-space: normal; page-break-inside: avoid;"><span class="f_CodeExample">// Вызов действия `get_currency`, настроенного в модуле</span><br />
<span class="f_CodeExample">// Во входные переменные действия передаются код валюты и текущая дата</span><br />
<p style="line-height: 1.20; margin: 32px 0 7px 0;"><span style="font-family: Inter;">An activity can also be called from a script of a component that is not part of the module. For example, from a widget that belongs to a workspace or from an event handler of another module. To do this, in the component</span><span style="color: #202122; background-color: #ffffff;"></span><span style="font-family: Inter;">s script settings,set an optional dependency from the module with this activity. After this, the activity can be accessed using the </span><code><b>Imports</b></code><span style="font-family: Inter;"> constant. For more details, see <a href="optional-dependencies.html" class="topiclink">Optional dependencies</a>.</span></p>
<p style="line-height: 1.20; margin: 7px 0 7px 0;"><span style="font-family: Inter;">Suppose in a business process script in a workspace, you set up an optional dependency from the module in which the activity to retrieve exchange rates is configured. In the dependency settings of the module, a unique name </span><code><b>currency_module</b></code><span style="font-family: Inter;"> is set. The activity can be called from the process script in the following way:</span></p>
<p class="p_CodeExample" style="white-space: normal; page-break-inside: avoid;"><span class="f_CodeExample">// Call `get_currency` activity set up in the module</span><br />
<span class="f_CodeExample">// Pass the currency code and current date to the activity input variable</span><br />
<span class="f_CodeExample">const output = await Imports?.currency_module?.action?.get_currency_rate?.call({</span><br />
<span class="f_CodeExample"> &nbsp; &nbsp;currency_code: Context.data.currency_code,</span><br />
<span class="f_CodeExample"> &nbsp; &nbsp;date: new TDate(),</span><br />
<span class="f_CodeExample">});</span><br />
<span class="f_CodeExample">&nbsp;</span><br />
<span class="f_CodeExample">// Проверка, что результат выполнения действия получен</span><br />
<span class="f_CodeExample">// Chech that the result of the activity is received</span><br />
<span class="f_CodeExample">if (output) {</span><br />
<span class="f_CodeExample"> &nbsp; &nbsp;// Запись курса валюты, полученного с помощью модуля, в переменную из контекста процесса</span><br />
<span class="f_CodeExample"> &nbsp; &nbsp;// Write the exchange rate obtained with the module to the process context variable</span><br />
<span class="f_CodeExample"> &nbsp; &nbsp;Context.data.current_currency_rate = output.currency_rate;</span><br />
<span class="f_CodeExample">}</span></p>
@ -210,7 +209,7 @@
</div>
<!-- добавляет на страницу строку блок Была ли статья полезной? -->
<div class="feedback-wrap"><div class="feedback" id="feedback"><span><b>Была ли статья полезной?</b></span><form action="" method="POST" class="feedback-form" id="feedback-form"><div class="feedback__popup feedback__popup-response" id="feedback__popup_thx">Спасибо за ваш отзыв!</div><div id="feedback-success-popup"><div class="wrap"><button type="button" class="feedback-popup-close">×</button><svg width="44" height="44" viewBox="0 0 44 44" fill="none" xmlns="http://www.w3.org/2000/svg"><g clip-path="url(#clip0_212_2187)"><path d="M22 0.6875C10.2294 0.6875 0.6875 10.2294 0.6875 22C0.6875 33.7706 10.2294 43.3125 22 43.3125C33.7706 43.3125 43.3125 33.7706 43.3125 22C43.3125 10.2294 33.7706 0.6875 22 0.6875ZM22 40.5625C11.8023 40.5625 3.4375 32.3078 3.4375 22C3.4375 11.8024 11.6922 3.4375 22 3.4375C32.1977 3.4375 40.5625 11.6922 40.5625 22C40.5625 32.1976 32.3078 40.5625 22 40.5625ZM34.1713 16.933L18.6613 32.3186C18.257 32.7197 17.604 32.7171 17.203 32.3128L9.82283 24.873C9.42176 24.4686 9.42434 23.8157 9.82867 23.4146L10.5609 22.6884C10.9652 22.2873 11.6181 22.2899 12.0192 22.6942L17.9468 28.6697L31.9926 14.7366C32.3969 14.3356 33.0498 14.3382 33.4509 14.7425L34.1772 15.4747C34.5783 15.879 34.5757 16.532 34.1713 16.933Z" fill="#27AE60"></path></g><defs><clipPath id="clip0_212_2187"><rect width="44" height="44" fill="white"></rect></clipPath></defs></svg><p>Ваш отзыв успешно отправлен!</p><span>Спасибо за обратную связь.</span></div></div><div class="feedback__popup" id="feedback__popup_why"><button type="button" class="feedback-popup-close">×</button><div class="feedback__popup-header">Уточните, почему:</div><input type="radio" name="category" id="bad_recommendation" value="bad_recommendation"><label for="bad_recommendation">Рекомендации не помогли</label><input type="radio" name="category" id="difficult_text" value="difficult_text"><label for="difficult_text">Текст трудно понять</label><input type="radio" name="category" id="no_answer" value="no_answer"><label for="no_answer">Нет ответа на мой вопрос</label><input type="radio" name="category" id="bad_header" value="bad_header"><label for="bad_header">Содержание статьи не соответствует заголовку</label><input type="radio" name="category" id="other_reason" value="other_reason"><label for="other_reason">Другая причина</label></div><div class="feedback__popup" id="feedback__popup-other"><button type="button" class="feedback-popup-close">×</button> <div class="feedback__popup-header">Расскажите, что вам не понравилось в статье:</div><textarea class="feedback__textarea" name="other" id=""></textarea><input type="submit" class="feedback__other-btn" value="Отправить"></div><div class="feedback-form__btn-group"><input type="radio" name="useful" id="feedback__useful_yes" value="true"><label for="feedback__useful_yes"><img src="like.svg"/><span class="feedback-form__btn-group_yes-btn">Да</span></label><input type="radio" name="useful" id="feedback__useful_no" value="false"><label for="feedback__useful_no"><img src="dislike.svg"/><span class="feedback-form__btn-group_no-btn">Нет</span></label></div><select name="category"><option disabled>Выберите вариант</option><option value="bad_recommendation" selected>Рекомендации не помогли</option><option value="difficult_text">Текст трудно понять</option><option value="no_answer">Нет ответа на мой вопрос</option><option value="bad_header">Содержание статьи не соответствует заголовку</option><option value="other_reason">Другая причина</option></select><input type="submit"></form></div></div>
<div class="feedback" id="feedback"><div class="feedback-help"><span><b>Was this helpful?</b></span><form action="" method="POST" class="feedback-form" id="feedback-form"><div class="feedback__popup feedback__popup-response" id="feedback__popup_thx" style="display: none;">Thanks for your feedback!</div><div class="feedback__popup" id="feedback__popup_why" style="display: none;"><div class="feedback__popup-header">Please specify why:</div><input type="radio" name="category" id="bad_recommendation" value="bad_recommendation"><label for="bad_recommendation">Recommendations did not help me</label><input type="radio" name="category" id="difficult_text" value="difficult_text"><label for="difficult_text">Article is hard to understand</label><input type="radio" name="category" id="no_answer" value="no_answer"><label for="no_answer">Didn`t answer my question</label><input type="radio" name="category" id="bad_header" value="bad_header"><label for="bad_header">Content does not match the topic</label><input type="radio" name="category" id="other_reason" value="other_reason"><label for="other_reason">Other</label></div><div class="feedback__popup" id="feedback__popup-other" style="display: none;"><div class="feedback__popup-header">How we can improve it?</div><textarea class="feedback__textarea" name="other" id=""></textarea><input type="submit" class="feedback__other-btn" value="Submit"></div><div class="feedback-form__btn-group"><input type="radio" name="useful" id="feedback__useful_yes" value="true"><label for="feedback__useful_yes"><img src="like.svg" class="small-img" alt="like"><spanclass="feedback-form__btn-group_yes-btn">Yes</spanclass="feedback-form__btn-group_yes-btn"></label><input type="radio" name="useful" id="feedback__useful_no" value="false"><label for="feedback__useful_no"><img src="dislike.svg" class="small-img" alt="dislike"><spanclass="feedback-form__btn-group_no-btn">No</spanclass="feedback-form__btn-group_no-btn"></label></div><select name="category"><option disabled="">Please specify why</option><option value="bad_recommendation" selected="">Recommendations did not help me</option><option value="difficult_text">Article is hard to understand</option><option value="no_answer">Didn`t answer my question</option><option value="bad_header">Content does not match the topic</option><option value="other_reason">Other</option></select><input type="submit"></form></div><div class="found_typo"><p style="margin: 0px; margin-top: 16px !important;"><span><b>Found a typo?</b></span> Select it and press <i>Ctrl+Enter</i> to send us feedback</p></div></div>
</section>
</div>
@ -218,7 +217,7 @@
<input type="checkbox" />
<div class="article__arrow"></div>
<div class="table-of-contents elma365-right" id="toc2Content">
<h3 class="h3-toc">В этой статье</h3>
<h3 class="h3-toc">In this topic</h3>
<nav id="toc2"></nav>
</div>
</aside>
@ -229,63 +228,30 @@
<div class="footer-container">
<div class="footer-mobile">
<ul class="footer-mobile__list"><li><a href="https://api.elma365.com/ru/" target="_blank">API</a></li><li><a href="https://tssdk.elma365.com/" target="_blank">TS SDK</a></li><li><a href="https://community.elma365.com/" target="_blank">Community</a></li><li><a href="https://elma-academy.com/ru/elma365" target="_blank">Академия</a></li></ul><ul class="footer-mobile__list"><li><a href="https://elma365.com/ru/help/platform/get-trial.html">Платформа</a></li><li><a href="https://elma365.com/ru/help/ecm/ecm-functions.html">ECM</a></li><li><a href="https://elma365.com/ru/help/service/service-functions.html">Service</a></li><li><a href="https://elma365.com/ru/help/projects/projects-functions.html">Проекты</a></li></ul>
<ul class="footer-mobile__list"><li><a href="https://brix365.com/en/" target="_blank">BRIX</a></li><li><a href="https://tssdk.brix365.com/en/latest/" target="_blank">SDK</a></li><li><a href="https://api.brix365.com/en/" target="_blank">API</a></li></ul><ul class="footer-mobile__list"><li><a href="https://brix365.com/en/help/platform/get-trial.html">Platform</a></li><li><a href="https://brix365.com/en/help/ecm/ecm-functions.html">ECM</a></li><li><a href="https://brix365.com/en/help/service/service-functions.html">Service</a></li><li><a href="https://brix365.com/en/help/projects/projects-functions.html">Projects</a></li></ul>
</div>
<div class="container">
<div class="footer-wrap">
<div><span class="mobile-question-popup">Отправить фидбэк</span><form method="POST" action class="question__popup question-xs" id="question__popup"><div class="question-wrap"><span class="close"></span><span class="title">Задать вопрос</span><label for="help_question" style="display: none;"></label><textarea name="help_question" id="help_question"></textarea><input type="submit" value="Отправить"></div></form><div class="hidden fade-in question-success-xs">Ваш фидбэк отправлен.</div></div>
<div class="footer-flex-b">
<div class="footer-top">
<span class="footer-copy">&copy; 2025
ELMA365
</span>
<a href="https://navigator.sk.ru/orn/1122971" target="_blank">
<img src="sk-resident.svg" alt="sk icon" class="footer-img" width="117" height="34">
</a>
</div>
<div class="footer-line">
<div class="footer-line-copy">
<span class="footer-copy">&copy; 2025
ELMA365
</span>
</div>
<ul class="footer-list">
<li class="footer-item"><a href="https://elma365.com/ru/" target="_blank" class="footer-link" style="color: #0D4A75;"><img src="browse.svg" alt="browse icon" class="footer-img">elma365.com</a></li><li class="footer-item"><a href="https://www.youtube.com/user/ELMABPM" target="_blank" class="footer-link"><img src="yt.svg" alt="youtube icon" class="footer-img"></a></li><li class="footer-item"><a href="https://vk.com/elma_bpm" target="_blank" class="footer-link"><img src="vk.svg" alt="vk icon" class="footer-img"></a></li><li class="footer-item"><a href="https://t.me/elmaday" target="_blank" class="footer-link"><img src="tg.svg" alt="telegram icon" class="footer-img"></a></li><li class="footer-item"><a href="https://dzen.ru/elma" target="_blank" class="footer-link"><img src="dzen.svg" alt="dzen icon" class="footer-img"></a></li>
<li class="footer-item">
<a href="https://navigator.sk.ru/orn/1122971" target="_blank">
<img src="sk-resident.svg" alt="sk icon" class="footer-img" width="117" height="34">
</a>
</li>
</ul>
</div>
</div>
<div class="footer-wrap">
<div><span class="mobile-question-popup">Send feedback</span><form method="POST" action class="question__popup question-xs" id="question__popup"><div class="question-wrap"><span class="close"></span><span class="title">Ask a question</span><label for="help_question" style="display: none;"></label><textarea name="help_question" id="help_question"></textarea><input type="submit" value="Send"></div></form><div class="hidden fade-in question-success-xs">Sent</div></div>
<div class="footer-flex-b">
<span class="footer-copy">&copy; 2025 BRIX</span>
<ul class="footer-list">
<li class="footer-item">
<a href="#" class="arrow-top" style="display: block;"></a>
</li>
</ul>
</div>
</div>
<a href="#" class="arrow-top"></a>
</div>
</footer>
<!-- <script type="text/javascript" src="jquery1.min.js"></script>-->
<iframe name="hmnavigation" style="display:none!important"></iframe>
<!--<script src="./jquery-ui.js"></script> -->
<script src="./jquery-ui.min.js"></script>
<script src="./jquery-ui.js"></script>
<!--script src="//cdn.jsdelivr.net/npm/featherlight@1.7.14/release/featherlight.min.js" type="text/javascript" charset="utf-8"></script-->
<script src="./jquery.tocify.min.js"></script>
<script src="./TypoReporter.min.js"></script>