You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 16 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 exporting a configuration pack, 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, 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.
Local pack configuration and export includes the following important stages:
- Configuring VCS records in a local pack:
- restoring records (optional)
- moving records (optional)
- Merging several local packs (optional):
- process collisions if there are any (optional)
- 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:
- Every team member creates a separate local pack and works within it. The results go into this local pack.
- When the development is over, these local packs must be merged into the main one.
- 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:
- Navigate to Configuration → Local Packs.
- Click New and fill in the fields.
- Click Save or Save and Exit to apply changes.
VCS Local Pack form fields
Field | Mandatory | Description |
---|---|---|
Name | Y | Define the name of the local pack. |
Is Default | N | This 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. |
State | Y | Local pack state. Available options:
|
Application | N | Specify an application of which record changes are stored in this local pack. |
Description | N | Local 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
VCS Records are available for tables with the 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:
- Navigate to Configuration → VCS Records.
- Find the record to be recovered. You can use list search for the Condition Builder.
- Open the record you need.
- Click Restore Version.
Another way to restore a record version is the following:
- Open the record you need.
- Scroll down to the Related Lists area and open the VCS Records tab.
- Open the record version you need to restore.
- Click Restore Version.
After that, a new VCS record is created in the current local pack.
Some forms may not have the VCS Records related list. You can add it 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:
- Open a record from the table you need to add the related table.
- In the hamburger menu, select Configure → Related List → Layout.
- Move the VCS Record->Document Record element from the Available box to the Selected box.
- 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:
- Navigate to Configuration → VCS Records.
- Find a record to recover. You can use list search or the Condition Builder.
- Open the record you need.
- Click the magnifier icon
by the Local Pack field and choose the desired local pack.
- 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:
- Navigate to Configuration → Local Packs.
- Choose local packs you need to merge by selecting the appropriate checkboxes, then click the Merge button.
- Fill in the name and description of the consequent local pack.
- Click Merge.
To check if there are any collisions, perform these steps:
- In the Local Pack record you need, scroll down to the Related Lists area.
- Open the VCS Preview Log tab.
- Filter out the Good state using the Condition Builder.
- If the selection contains records, process them as described in the Collisions processing article.
- 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 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.
- 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:
- Navigate to Configuration → Local Packs.
- Find the local pack to export. You can use list search for the Condition Builder.
- Open the desired local pack.
- Change the state value to Completed.
- In the hamburger menu
, select Export → As a New Application.
It is a good practice to:
Give a relevant name to the local pack after exporting, for example:
Good New Incident States.sop Bad task 1.sop
2020-08-06_08-47-19_159654161718816631.sop
- 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
- Navigate to System Definition → All Tables.
- Using the search bar and/or a Condition Builder, find the table for which you want to create a snapshot, and navigate to it.
- Open the hamburger menu and navigate to Configure → Table.
- 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
- Navigate to System Definition → Scripts.
- 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 To rollback a local pack, please complete the steps below: Do not rollback the a default local pack without an absolute necessity; otherwise, your SimpleOne instance configuration may be damaged. Default local pack is a local pack with the Is Default checkbox selected. Here is the expected result of the process: Update Rollback resultRollback a local pack
A new table The table is dropped from the database, deleting any data from it. A new field The field is dropped from the database, deleting any data from it. A deleted field The field is restored to the database, but the original data is lost. A record is inserted The record is deleted. A record is deleted The record is restored with its original data.
/
>>> Рабочее название: Exporting a configuration pack <<<
Related articles
- No labels