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

Compare with Current View Page History

« Previous Version 8 Next »

Local packs allow developing application configurations on a separate instance, exporting it as a .SOP file, and implementing it to the main instance. This approach allows minimizing risks of mistakes, error and conflicts, which may affect the main instance during application development.

All system configuration activities should be performed within a separate local pack. Do not use a default local pack for these needs.

Default local pack is a local pack with the Is Default checkbox selected.

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. Every single version is an atomic state of versioned tables (those ones which have the Is VCS Enabled checkbox selected). All record versions in the local pack are displayed in the Related Lists area.



Team Development


In SimpleOne, developers can work on their task separately and then combine the results into team's final configuration 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. The results go into this 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. Click Save or Save and Exit to apply changes.

VCS Local Pack form fields

FieldMandatoryDescription
NameYDefine the name of the local pack.
Is DefaultNThis attribute defines that this local pack will be set as default for any user changing the application to the one specified in the Application field.
StateY

Local pack state. Available options:

  • In progress
  • Completed
  • Ignored
  • Rollback Previewed
  • Rollbacked.
ApplicationNSpecify an application of which record changes are stored in this local pack.
DescriptionNLocal pack description.

Managing VCS records


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

Restoring a VCS record

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 for the Condition Builder.
  3. Open the record you need.
  4. Click Restore Version.

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

You can add a versions list to a versioned table form as a related list. After that, all previous versions of the current record are displayed on the record form.

To do that, perform the following steps:

  1. Open a record from the table you need to add the related table.
  2. In the hamburger menu, select Configure → Related List → Layout.
  3. Move the VCS Record->Document Record element from the Available box to the Selected box.
  4. Click Save to apply changes.

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.

Both local packs must be in the Completed state.

Both local packs must 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 the Merge button.
  3. Fill in the name and description of the consequent local pack.
  4. Click Merge.

As a result:

  • A new local pack is created. It contains last 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.
  • If any versions were referenced to original local packs and didn't get into the resulting one, then this reference is reset.

Local Pack Exporting


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 for the Condition Builder.
  3. Open the desired local pack.
  4. Change the state value to Completed.
  5. In the hamburger menu , select Export → As a New Application.

It is a good practice to:

  1. Give a relevant name to the local pack after exporting, for example:

    GoodNew Incident States.sop
    Bad

    task 1.sop

    2020-08-06_08-47-19_159654161718816631.sop

  2. Download your local pack straight away after the job is done; otherwise, the versions stored in it may go out of date.

Snapshots


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 attribute is set to TRUE).

Option 2


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

In both cases, the result is the snapshot, that is, the set of the VCS records for all the documents in this table that do not have such records at the moment of the snapshot creating.

Any completed local pack can be rolled back. Rollback will restore the versions of all the records in this local pack as they were before the start of the update collection within this local pack, or before committing this local pack.

Deleted records will be restored, and created records will be deleted.

Example

  • Before local pack committing, the record had a version X.
  • After the local pack committing, it has version Y.
  • And after rollbacking, it will have version X again, even if after local pack completing it had any other version.

Rollback a local pack


Any completed local pack can be rolled back. Rollback will restore the versions of all the records in this local pack as they were before the start of the update collection within this local pack, or before committing this local pack.

Deleted records will be restored, and created records will be deleted.

Example

  • Before local pack committing, the record had a version X.
  • After the local pack committing, it has version Y.
  • And after rollbacking, it will have version X again, even if after local pack completing it had any other version.

To rollback a local pack, please complete the steps below:

  1. Navigate to Configuration → Local Pack.
  2. Click on the local pack you need to rollback and navigate into it.
  3. Click Rollback Preview to preview the list of the records that are going to be restored.
  4. Review the contents of the local pack, fix possible collisions if required. After fixing the collision, complete the steps below:
    1. Navigate to Configuration → VCS Preview Log.
    2. Click on the record that was causing the collision.
    3. In the State field, select the Allowed value.
    4. Click Save or Save and Exit to apply changes.
  5. Click Rollback to restore records to the previous version.
  6. Resolve the issues encountered.

The currently selected application affects what options are available for the local pack. So please make sure that you select the application, such as Platform, that matches the content of the local pack.

Rollback of any local pack is an operation that shouldn't be invoked without an emergency need. Use it cautiously.


Do not rollback the Default 1 local pack without an absolute necessity; otherwise, your SimpleOne instance configuration may be damaged.

This process both record updates and dictionary changes. Some changes caused by the rollback may lead to data loss.

Here is the expected result of the process:

Update

Rollback result

A new tableThe table is dropped from the database, deleting any data from it.
A new fieldThe field is dropped from the database, deleting any data from it.
A deleted fieldThe field is restored to the database, but the original data is lost.
A record is insertedThe record is deleted.
A record is deletedThe record is restored with its original data.










>>> Рабочее название: Exporting a configuration pack <<<

  • No labels