Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Applications aggregate versioned objects in the system (these are, for example, tables, columns, scripts, widgets). They are Application is a pack of the VCS-records united by the same value in the application_id field. Applications are intended to hoard some businessworthy functionality that can be contributed into the system as a single entity. All the objects in the application have the same value in the application_id fieldIn fact, this is an individual system module that can be packed in the .SOP file in order to install it on other instances. For example, you can have your SimpleOne platform with the base functionality, and you can expand it by installing the ITSM, HRM, CRM and other applications that may be developed and delivered.

Tip

Role required: admin.

Creating an application


To create an application and to add it into the repository, please complete the steps below:

  1. Add a new application:Click on the gear icon at icon Image Added at the top right to enter the admin preferences menu;.
  2. Click on the icon icon Image Addedon the right to the application selection choice list; Application choice field.
  3. Click New and fill in the fields.
  4. Click Save or Save and Exit to apply changes.
Info

Another way to create a new application is the following:

  1. Navigate to Configuration → Applications.
  2. Click New
,
  1.  and fill in the
form and click Save.
  • Name - the name of the application created;
  • Version - application version;
    1. fields.
    2. Click Save or Save and Exit to apply changes.

    Application form fields

    FieldMandatoryDescription
    NameYThe application name.
    Table PrefixNPrefixes of the tables created within of this application.
    SlugNUnique identifier combined from the application name and the table prefix. This field is populated automatically.

    After that, switch to the created application. For this, enter the admin preferences menu again and select the created application in the Application choice list. Make sure that local pack for storing changes is created and available (the value in the Local Pack choice list is not empty).

    Prefix table - prefixes of the tables that are created within of this application.

    When creating an application, a configuration pack will be automatically created

    that is

    and named Default 1

    , bound

    . It will bound to this application and

    containing

    contain one or more VCS-records.

    Info

    It is not recommended to use the Default 1 local pack. Please create another one. For this, perform the following steps:

    1. Navigate to Configuration → Local Packs.
    2. Click New, and fill in the fields.
    3. Click Save or Save and Exit to apply changes.

    Configuring the structure and logic


    Developer responsible for this application has to configure its structure and to set up the logic

    , creating the tables and columns and records. Note: all necessary tables must be versioned (the is_vcs_enabled attribute must be equal to true);

    . The developer should create:

    See the Developer Tools articles to learn more.

    Completing local packs


    To complete local packs

    After that, finish the development with the configuration pack completing. For this

    , please complete the steps below:

    1. Click on the gear icon icon Image Added at the top right to enter the admin preferences menu;.
    2. Select your application in the Application choice list;.
    3. Click the icon icon Image Added on the right to the Configuration Pack choice list; Local Pack choice field.
    4. Change the configuration pack state value of the State field to Completed and click Save;
    5. Click Create Product Version Component button.
    6. The application will be added to the Application choice list.

    Application

    https://docs.servicenow.com/bundle/newyork-application-development/page/build/applications/concept/c_Applications.html

    https://docs.servicenow.com/bundle/london-application-development/page/build/applications/concept/c_Applications.html

    https://docs.servicenow.com/bundle/newyork-servicenow-platform/page/product/service-mapping/concept/c_BusinessServices.html

    https://docs.servicenow.com/bundle/newyork-application-development/page/build/applications/concept/c_ApplicationList.html

    Приложение – совокупность версионируемых объектов в системе (таблицы, колонки, скрипты, виджеты). Цель Приложения – аккумулировать в себе объединенную неким общим признаком функциональность для дальнейшего добавления в систему в качестве единого целого. Все объекты в приложении объединены полем application_id. Конфиг-пак всегда относится к какому-то Приложению, равно как и записи в нём.

    В системе всегда есть как минимум одно приложение и один локалпак, в котором фиксируются изменения записей в версионируемых таблицах, т.е. приложение "по умолчанию" и локалпак "по умолчанию".

    Приложений, как и привязанных к ним локалпаков, может быть несколько. Локалпаков в составе одного приложения может быть больше одного.

    Рассмотрим кейс

    В системе создано несколько приложений:

    Application 1, Application 2, Application 3.

    В каждом из них создано по 3 локалпака. В итоге структура имеет такой вид:

    • Application 1
      • Localpack 1
      • Localpack 2 – is_default
      • Localpack 3
    • Application 2
      • Localpack 4 – is_default
      • Localpack 5
      • Localpack 6
    • Application 3
      • Localpack 7
      • Localpack 8
      • Localpack 9 – is_default

    В таком случае допустимо установить флаг is_default на один локалпак в рамках каждого приложения. В итоге в системе может быть теоретически более одного локалпака «по умолчанию», но в каждый момент времени может быть выбран только один.

    В аппликейшенах используется полиси

    Политика защиты (Policy) используется для защиты конфигурационных данных платформы или бизнес-приложений, чувствительных к изменениям. У каждой записи в системе указано одно из трёх значений Policy, представленных ниже.

    Как создать приложение

    Для создания приложения необходимо проделать следующие действия:

  • Создать новое приложение:
    1. Зайти в настройки администратора, нажав шестеренку сверху справа;
    2. Нажать иконку рядом со списком выбора приложений;
    3. Нажать кнопку New на форме;
    4. Заполнить форму:
      1. Name / Наименование – наименование создаваемого приложения;
      2. Version / Версия – версия приложения;
      3. Prefix table / Таблица префиксов – префиксы таблиц, создаваемые в рамках данного приложения.
  • При создании приложения автоматически будет создан локалпак с названием Default 1, привязанный к этому приложению и содержащий VCS-запись о нём. Состояние локалпака: is_default, In Progress.
  • Для того, чтобы изменения конкретного Разработчика Бизнес-Решения (РБР) писались в этот локал-пак, он должен выбрать его у себя в настройках (если так сделают несколько разработчиков, в один и тот же локалпак будут писаться изменения нескольких разработчиков. Так реализована совместная работа в рамках локалпака).
  • Далее РБР должен создать структуру приложения, настроить его логику, следя, чтобы на всех необходимых таблицах было включено версионирование (флаг is_vcs_enabled = TRUE).
  • После завершения разработки локалпак переводится в статус Completed:
    1. Зайти в настройки администратора, нажав шестеренку сверху справа;
    2. Нажать на иконку рядом со списком выбора «Configuration Pack / Конфигурационный пакет»;
    3. Изменить статус в списке выбора «State / Статус» на «Completed / Завершено». После этого появляется возможность экспортировать локалпак в архивный файл формата .sop.
  • Далее необходимо произвести тестирование установки этого приложения на различных серверах с различными сочетаниями других приложений. Методика установки приложения будет рассмотрена далее в рамках данной инструкции.
  • При наличии каких-либо дефектов необходимо:
    1. Перевести локалпак в статус In Progress;
    2. Провести доработку, необходимую для их устранения;
    3. Повторно перевести локалпак в статус Completed и выгрузить .sop-файл.
    1. .
    2. Click Save or Save and Exit to apply changes.
    3. Click the Export Local Pack button to download the application so it can be installed on different instances. See the Configuration Packs article to learn more.
    Info

    Another way to open the local pack record is the following:

    1. Navigate to Configuration → Local Packs.
    2. Open the record you need to complete and export.
    3. Change the value of the State field to Completed.
    4. Click Save or Save and Exit to apply changes.
    5. Click the Export Local Pack button to download the application so it can be installed on other instances.


    Note

    Please note that when you develop an application, the records created in the pipeline of another application will be unavailable for updating (either editing or deleting). If you try to modify a record related to another application, you will get a warning message.

    In case you need to perform actions with this record, please switch to the application it belongs to.

    For information about switching between applications, please refer to the Admin Preferences article

    Файл .sop с приложением отправляется в репозиторий приложений

    .


    Table of Contents
    absoluteUrltrue
    classfixedPosition