You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 23 Next »

Local pack is a record in the VCS Local Pack (sys_vcs_local_pack) table containing versions of instance records from the VCS Record (sys_vcs_record) table. Local packs allow developing application configurations on a separate instance, exporting it as a .SOP file, and implementing it to the main instance.

See the Configuration Packs article to learn more.

For configuration pack export, the following elements are used:

  • Local Pack  contains all VCS records that can be implemented as one configuration pack into another instance. In other words, it contains records that will be changed, inserted, or deleted on the target instance.
  • VCS Records – contains versions of records.
  • .SOP file – the final result of a completed local pack which you can implement on any other SimpleOne instance.

Developing a local pack


Local pack configuration and export includes the following important stages:

  1. Configuring VCS records in a local pack:
  2. Merging several local packs (optional):
  3. Exporting a .SOP file.

Team Development

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

In brief, in order to facilitate the team development process, you need to perform the following steps:

  1. Every team member creates a separate local pack and works within it collecting necessary records. The results go into this separate local pack.
  2. When the development is over, these local packs must be merged into the main one.
  3. After merging, work on collisions if there are some, and after that, the final configuration pack is ready for implementation.

Create a local pack 


To create a local pack, please 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 changes and continue local pack development:
    • click Save or Save and Exit. 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 and apply changes and start working on it.

VCS Local Pack form fields

FieldMandatoryDescription
NameYName of the local pack.
Is DefaultNSelect this checkbox to set the local pack as default. That is, all users will switch to this configuration pack within the application. When configuring other local packs, selected versions will be removed to this default pack.
StateY

Local pack state. Available options:

  • In progress
  • Completed
  • Ignored
  • Rollback Previewed
  • Rollbacked.
ApplicationNApplication to which this local packs relates to and which records contains. One local pack cannot contain records belonging to different applications.
DescriptionNLocal pack description.

Managing VCS records


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

Restoring a VCS record

VCS Records are available for tables with the Is VCS Enabled checkbox selected. See the Table Attributes article to learn more.

If you need to restore one of previous record versions, you need to make it actual. Actual records a marked with the Is current checkbox selected.

To restore a record version, please complete the steps below:

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

Another way to restore a record version is through related list:

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

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

Removing a VCS record 

If your local pack contains a VCS record that should not be there (created accidentally or belonging to another configuration pack), you can remove it. Please note that VCS records cannot be removed in the sense of "deleted"; therefore, they are moved to the default local pack.

To remove a VCS record, perform the following steps:

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

As a result:

  • All selected record versions are moved to the default pack.
  • All record versions with the same Record ID as the selected ones are moved to the default pack, too. That is, all previous versions of the same record are removed.

This option is not available in default local packs.

Moving a VCS record 

If a version has been created in a wrong local pack by mistake (for example, in a default local pack), then you can move it to the required local pack. For this, please complete the steps below:

  1. Navigate to Configuration → VCS Records.
  2. Find a record to recover. You can use list search or the Condition Builder.
  3. Open the record you need.
  4. Click the magnifier icon by the Local Pack field and choose the desired local pack.
  5. Click Save or Save and Exit to apply changes.

Local Pack Merging 


Sometimes you need to combine two or more local packs together, for example, in case of team development. Merged local packs speed up implementation process and help to arrange updates and development in one pack.

Before merging local packs, make sure that:

  • Both local packs are in the Completed state.
  • Both local packs belong to the same application.

To merge local packs, please complete the steps below:

  1. Navigate to Configuration → Local Packs.
  2. Choose local packs you need to merge by selecting the appropriate checkboxes, then click Merge.
  3. Fill in the name and description of the consequent local pack.
  4. Click Merge.

To check if there are any collisions, perform these steps:

  1. In the Local Pack record you need, scroll down to the Related Lists area.
  2. Open the VCS Preview Log tab.
  3. Filter out the Good state using the Condition Builder.
  4. If the selection contains records, process them as described in the Collisions processing article.
  5. Repeat the procedure if needed until all records in the VCS Preview Log tab are in the Good state.

As a result:

  • A new local pack is created. It contains latest versions of the VCS Record (sys_vcs_record) from merged local packs.
  • This new local pack state is In Progress.
  • The original local packs are removed.
  • VCS records in the merged local pack will have the Local Pack field cleared as the original local packs are removes.

Exporting a local pack


After you completed collecting record versions, you need to export the changes for further import to other instances. For this, please complete the steps below:

  1. Navigate to Configuration → Local Packs.
  2. Find the local pack to export. You can use list search boxes or the Condition Builder.
  3. Open the desired local pack.
  4. Change the state value to Completed.
  5. Export the local pack as a .SOP file:
    • in the hamburger menu , select Export → As a New Application.
    • at the top of the form, click Export Local Pack.


The downloaded .SOP file will be named automatically as this:

Local Pack name_2021-12-31 18:00:00
  • Datetime format is YYYY-MM-DD.
  • The timestamp indicates the datetime when the local pack was transferred to the Complete state.
  • The time is displayed according to the locale of the user who exported the file. That is, if the local pack was transferred to the Complete state at 12:00:00 (UTC), then for a user from UTC+3 the file will have the 15:00:00 timestamp.
  • If the local pack name contains the symbols listed below, they will be replaced by the underscore symbol ( _ ): 

    \\, /, :, *, ?, ", <, >, |

.SOP file export comparison


Export Local PackExport → As a New Application
Protection PolicyDoes not changeChanges to Open
DescriptionUse this export for minor record version changes.Use this export for local pack containing a huge number of record versions.

It is a good practice to download your local pack straight away after the job is done; otherwise, the versions stored in it may go out of date.

Snapshots


Snapshots are used in case a record lacks current version for some reason, that is, snapshot restores lacking record versions.

In version control systems (VCS), snapshot is the fixed system or database status description. There are two ways to create a table snapshot:

  • via table managing form
  • with server-side API class SimpleVcs.

Role required: admin.

Option 1


  1. Navigate to System Definition → All Tables.
  2. Using the search bar and/or a Condition Builder, find the table for which you want 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 the versioning for this table is on (the Is VCS Enabled checkbox is selected).

Option 2


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

/


  • No labels