You are viewing an old version of this page. View the current version.
Compare with Current View Page History
« Previous Version 7 Next »
echnically, a local pack is a record in the VCS Local Pack (sys_vcs_local_pack) table related to versions of the related records in a 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 a related list on a local pack form.
Default local pack is a local pack named "Default 1" created automatically after creating a new application.
It is not recommended to use the Default 1 local pack to store versions for the purpose of further import to other instances. Create separate packs for these tasks.
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. 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:
Team Development
In SimpleOne, you can perform your parallel development on multiple instances. For now, team development is represented an operation approach and is handled by two engines:
- Configuration packs
- Merging.
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. |
Version restoring
A non-actual version (the is_current attribute value is equal to 'false') can be restored if needed. To perform this, 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.
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:
- 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 VCS records
If a version has been 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 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.
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:
- 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.
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:
- 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
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
- 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.
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: 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 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.
- No labels