Versions Compared

Key

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


Tip

Role required: admin.

Local A local pack is a record in the the VCS Local Pack (sys_vcs_local_pack) table compiling relevant , that contains a specific set of records from the VCS Record (sys_vcs_record) table. It allows associating Use it to associate VCS records with a particular pack and exporting specific pack according to the type of changes they refer to, and export them as a complete configuration set.Local packs allow developing application configurations on When exporting local packs, you can move the development of the application configurations to a separate instance, exporting it . To do so, export them as a . SOP file , and implementing it deploy the changes to another instance.

See the Configuration PacksPackages article to learn more.

For The exported configuration pack export, the following elements are usedincludes:

  • Local Pack – compiles all relevant VCS records so that they are linked as a complete set. Then these related to a specific set of changes. These records can be implemented as one configuration pack in another instance. In other words, a local pack collects contains references to the records that will should be changed, inserted, or deleted on in the target instance.
  • VCS Record – contains the version of a record version.
  • .SOP filea physical file in the . SOP format. It contains all record versions from versions from the completed local pack. ImplementTransfer and implement it on in any other SimpleOne instance.
Assembling

Assemble a local pack


Local A local pack configuration and export includes include the following important stages:

  1. Create of a new local pack to store some specific VCS records.
  2. Collect Configuring VCS records in a local pack:
  3. (optional) Merging Merge several local packs (optional).
  4. Exporting Export a . SOP file.
Tip

If you are going to export When exporting records for a custom application, make sure ensure that the relevant application is implemented in the target instance or that the local pack contains the application VCS record.

Expand
titleHow to import custom applications

If you need to To implement the a custom application, perform follow the following steps on below in the source instance:

  1. Navigate to Configuration → Applications.
  2. Find the application record using the list search or the Condition Builderyou need and open it.
  3. Scroll down to the Related Lists area.
  4. In the Related Lists area, select the VCS Records tab.
  5. Open In the VCS Record tab, open a relevant record ( with the Is Current=true)selected Is current checkbox

    Tooltip
    onlyIcontrue
    appendIconinfo-filled
    iconColorblue

    The application will be imported to a target instance, even if the Action type of the VCS record is Update.


  6. In the VCS Record form, select the local pack you need in the Local Packpack field.
  7. Click Save or Save and Exitexit.


Team

Development

development


In SimpleOne, you can export separate local packs and upload them one by one. Another option is to work as a team on one task. For thisTo do so, developers should do their part of work in separate local packs and then combine the results into team's final pack. You can see the process in the scheme below:

Image Removed

merge them into the final local pack. The following diagram describes the process:

Image Added

Note

Developers can also work using the same local pack, BUT it is not recommended as it may cause errors.

To Briefly, in order to facilitate the team development process, you need to perform do the following steps:

  1. Every Each team member creates a separate local pack and works within it collecting necessary in it, collecting versions of the VCS records. The results of work on a specific task should go into a separate local packspack.
  2. When assembling is overall the developers who work on the same task complete their local packs, these local packs must be merged into the final one.

Create a local pack 
Anchor
create a local pack
create a local pack


To create a local pack, complete the steps below:

  1. Navigate to Configuration → Local Packs.
  2. Click New and fill in the fields.
  3. There are two ways to apply the changes and continue assembling a local pack:
    • Click Save. Then click Set current to switch the local pack in the Admin Preferences menu and start working on it.
    • Click Set current and Save to switch the local pack in the Admin Preferences menu, apply the changes and start working on it.
Managing

Manage VCS records
Anchor
restore a vcs record
restore a vcs record


Configure the set of record versions in the VCS Records related list to build manage the local pack content. Restore and move records to collect only those the ones you need.

Restoring

Restore a VCS record


If you need to To restore one of the previous record versions , you need to and make it actual by clicking current, click Restore Version. Actual records are marked with the Is current checkbox selected. Thus, restoring is available only to Restoring is only available for the VCS records with the cleared Is Current checkbox.

Info

Restoring is unavailable not available for the records of the Simple application with the Protected record policy and related to the Simple application.

To restore a record version, complete the steps below:

  1. Open the record you need.
  2. Scroll down to the Related Lists area and open the VCS Records In the Related Lists area, select the VCS Records tab.
  3. Open the record version you need to restore.
  4. Click Restore Versionversion.
Info

Another way to restore a record version is the following:

  1. Navigate to Configuration → VCS Records.
  2. Find the record to be recovered. You can use list search boxes or the Condition Buildercondition builder.
  3. Open the record you need.
  4. Click Restore Versionversion.

After that, a new VCS record is created in the current local pack.

Removing

Remove a VCS record
Anchor
remove a vcs record
remove a vcs record


VCS records cannot be deleted; thereforeThe SimpleOne platform is designed in such a way that no record can be removed from the system. When you click Move to Default, they are moved to the default local packIf one of your local pack packs contains a VCS record that is was created accidentally or belongs to another configuration pack, you can remove it from this local pack.

To move a VCS record, perform do the following steps:

  1. Navigate to Configuration → Local Packs.
  2. Open the local pack containing the VCS record you need to move.
  3. Scroll down to the Related Lists area and open the VCS Record tabIn the Related Lists area, select the VCS Records tab.
  4. Select a record or records to be moved using the checkboxes and click Move to Default.
  5. These records will be moved to the default local pack of the same corresponding application.

As a result:

  • All selected record versions are moved to the default pack.
  • All record versions with the same Record IDas the selected ones are moved to the default pack, too. That is, all previous and current versions of the same record are moved.
Note

This option is not available in It is impossible to delete records from the default local packspack.

Changing

Change a local pack for a VCS record
Anchor
move a vcs record
move a vcs record


If a version was created in a wrong local pack by mistake (for example, in the default local pack), then you can move it to the required local pack. For thisTo do so, complete the steps below:

  1. Navigate to Configuration → VCS Records.
  2. Find a record to recovermove. You can use list search or the Condition Buildercondition builder.
  3. Open the record you need.
  4. Click the magnifier icon by the Local Packpack field and choose select the desired required local pack.
  5. Click Save or Save and Exitexit to apply the changes.

Snapshots


Snapshots restore record versions in the following cases:

  • a record lacks has no current versions.
  • the current version of a record is outdated – when the JSON Copy of this record version has a later date than the Updated at field of the record itself.

In the version control systems (VCS), a snapshot is the a fixed state description of a system or database status description.

There are two ways to create a table snapshot:

  • via table managing form table form (table configuration).
  • with the SimpleVcs class of the server-side API class SimpleVcs.

Option 1


  1. Navigate to System Definition → Settings → All Tables.
  2. Using the search bar and/or a Condition Buildercondition builder, find the table for which you want need to create a snapshot, and navigate to it.
  3. Open the hamburger menu and navigate to Configure → Table.
  4. Click the Create VCS snapshot button at the right top. This button is visible only when visible when the versioning for this table is on (the Is VCS Enabledenabled checkbox is selected).

Option 2


  1. Navigate to System Definition → Settings → Server Scripts.
  2. Write down a Write a script and call the createTableSnapshot(tableName) method in it.

The example script below makes snapshot of all versioned tables within the current application:

Code Block
languagejs
themeEclipse
titleTable Shapshot Script
linenumberstrue
const table = new SimpleRecord('sys_db_table');
table.addQuery('is_vcs_enabled', true);
table.addQuery('sys_id', '!=', '999999999999999998'); // exclude REM
table.selectAttributes('name');
table.query();
while (table.next()) {
  const vcs = new SimpleVcs();
  const versionCount = vcs.createTableSnapshot(table.name);
  if (versionCount > 0) {
    ss.info(`${table.name.padStart(80, " ")}: ${versionCount} versions created`);
  }
}
/

Complete local packs


To complete local packs, complete the steps below:

  1. Click on the gear 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 Image Added on the right to the Local Pack choice field.
  4. Change the value of the State field to Completed.
  5. Click Save or Save and exit to apply the changes.
  6. Click the Export local pack button to download the application, to install it in different instances. See the Configuration Packs article to learn more.
Info

Another way to open a 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 the changes.
  5. Click the Export local pack button to download the application, to install it in other instances.


Note

When you develop an application, the records created in the pipeline of another application are not available for updating (either editing or deleting). Any attempt to modify a record related to another application causes a warning message.

To perform any actions with a record, switch to the application it belongs to.

For more information about switching between the applications, see the Admin Preferences article.


Table of Contents
absoluteUrltrue
classfixedPosition
printablefalse

Panel
  • Configuration Packs
  • Importing configuration packs
  • Retrieved Pack Import
  • Collisions processing