Conflict Resolution Configuration

Conflict Resolution Configuration

Starting with CST 4.2 you have the possibility to configure some automatic conflict resolution. This possibilities are again improved with CST 4.3. The remainder of this page will be mainly referencing to CST 4.3 but is possibly valid for other versions >= 4.2, too.

Most of the possibilities of the Configuration are documented within the "Smallworld Core Spatial Technology Documentation - Main" within the Section "Database Administration" Chapter 7 "Conflict detection and resolution". On this Wiki page are just a few additional technical informations.

An abbreviation widely use within this context is crpe for Conflict Resolution Process Engine.

Loading a Configuration into the ACE

The Configuration is strored within the top alternative of the ace database. Following the documentation (chapter 7.3.3), you may load the example configuration into a Cambridge Database with the following code (provided your CST 4.3 installation is located at C:\Smallworld43\product):

_block 
    _local my_crsteng << conflict_rules_storage_engine.new(gis_program_manager.ace(:Electricity))
    my_crsteng.make_writable()
    my_crsteng.import_rules(:gis,:test,"C:/Smallworld43/product/data/conflict_resolution_example/custom_ruleset.xml")
    my_crsteng.make_rules_standard(:gis,:test)
    my_crsteng.save_changes()
    my_crsteng.make_readonly()
_endblock 
$

This will raise a crpe!configuration!missing_class condition unless you have loaded the two magik files comparison_rule.magik and validation_process.magik into your image. Both files are located in the same directory as the loaded xml file.

Showing the most recently used view's Configuration

With

simple_xml.write_element_on(!terminal!, conflict_resolution_process_engine.configuration_as_xml())
$

you'll see the corrent configuratino of the crpe. This refers to the most recently used dataset, i.e. the dataset in which the last merge has been performed, or the last time the configuration has been changed. The output of that command essentially follows the contents of the loaded xml file, with some added default values and with some attributes being rearranged.

Showing the Complete Configuration

If you want to see the complete configuration for one ACE you may use the following procedure print_crpe_configuration_for_ace:

Configuation loaded for the Example

For the Example Output below, besides the CST example configuration (see above), the following configurations are loaded as well:

  • a quite simple configuration for the Electricity Database, which is configured as standard rule
  • A variant of the a.m. example configuration for the gis view, which is not configured as standard rule

Example Output

With the Example Configuration you'll get the following output from the print_crpe_configuration_for_ace procedure. The output is interrupted by some comments .

print_crpe_configuration_for_ace("Electricity")
$

"crse_1": Dataset Rule with id "1", not shown in detail here
====================
"crse_1" 
<?xml version="1.0" encoding="ISO-10646-UCS-2" standalone="yes"?>
<conflict_resolution_process_engine>
...
</conflict_resolution_process_engine>

"crse_2": Dataset Rule with id "2", c.f. Electricity Configuration File above
====================
"crse_2"

"crse_3": Dataset Rule with id "3", not shown in detail here
====================
"crse_3" 
...

"crse_ds_rules": Reference for all stored rules:
  • dataset: name of the dataset, the rule is registered for
  • rule_name: name given as second argument of the import_rules() method
  • id: number of the Rule (see above)
  • validated_against: value of gis_program_manager.cached_dataset(dataset).current_dd_version, when the rule last has been validated
====================
"crse_ds_rules" 
<?xml version="1.0" encoding="ISO-10646-UCS-2" standalone="yes"?>
<dataset_rules_list>
    <dataset_rule dataset="electricity" rule_name="test_elec" id="2" validated_against="8210199731448578141"/>
    <dataset_rule dataset="gis" rule_name="test" id="1" validated_against="412391"/>
    <dataset_rule dataset="gis" rule_name="test2" id="3" validated_against="412391"/>
</dataset_rules_list>

"crse_ds_standard_rules": For each dataset the name of the standard rule, set by the make_rules_standard() method, if applicable:
====================
"crse_ds_standard_rules" 
<?xml version="1.0" encoding="ISO-10646-UCS-2" standalone="yes"?>
<standard_rules_list>
    <dataset_standard_rule dataset="electricity" rule_name="test_elec"/>
    <dataset_standard_rule dataset="gis" rule_name="test"/>
</standard_rules_list>
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License