---
sourceDocument: Xanadu API Reference
sourceDocumentLink: https://servicenow-prod.fluidtopics.net/r/xanadu/api-reference

 Release :

    - xanadu

ft:locale :

    - en-US

ft:publication_title :

    - Xanadu API Reference

ft:clusterId :

    - crapiref

bundleId :

    - crapiref

workflow :

    - Creator


---

# AbstractReconciler - Global

# AbstractReconciler - Global {#ariaid-title1}

* Release version: Xanadu
* 
* Updated August 1, 2024
* 
* ![](https://www.servicenow.com/docs/portal-asset/ico-clock) 3 minutes to read

The AbstractReconciler script include provides methods to use as a base class to create your own Discovery reconciler.

This is an abstract base class for reconciling newly discovered data in an XMLMemoryTable to a related list in the database. The AbstractReconciler script include implements the common logic and helper methods
for reconciling related lists for a particular CMDB item against discovered information present in a MemoryTable instance.

Most of this logic is very straightforward, but one bit may not be: the resolution of
references to previously reconciled records. This feature works by collecting information while
reconciling one related list, then passing that information on to the reconciler for another
related list. For example, while switch partitions are being reconciled, information is gathered
(in a map instance) that maps an interface number for a partition to the sys_id of the
partition's record in the partition table. Then later when the switchports are being reconciled,
a reference to the switch partition that contains the switchport can be resolved by using this
map.

## AbstractReconciler - getReconciliationField() {#ariaid-title2}

Determines if the newly discovered data is different than the data already in the
database for the current item.
This method is only invoked for items that have been rediscovered.

Mandatory method, must be overridden in all concrete subclasses.
{#r_AR-getReconciliationField__table_n3w_lvc_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 1. Parameters]

{#r_AR-getReconciliationField__table_n3w_lvc_pt} {#r_AR-getReconciliationField__table_o3w_lvc_pt__entry__2}

| Type | Description |
|-|-|
| Boolean | True if the data has changed. |
[Table 2. Returns]

{#r_AR-getReconciliationField__table_o3w_lvc_pt}

## AbstractReconciler - getReconciliationKey() {#ariaid-title3}

Gets the string value of the field to be used as a key to look up a record in the newly
discovered data.
This value will be used to attempt to find a record in the discovered data, using the
column returned by the getReconciliationKey() method.

Mandatory method, must be overridden in all concrete subclasses.
{#r_AR-getReconciliationKey__table_sgn_1vc_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 3. Parameters]

{#r_AR-getReconciliationKey__table_sgn_1vc_pt} {#r_AR-getReconciliationKey__table_tgn_1vc_pt__entry__2}

| Type | Description |
|-|-|
| String | Value to use as a key into the discovered data. |
[Table 4. Returns]

{#r_AR-getReconciliationKey__table_tgn_1vc_pt}

## AbstractReconciler - hasChanged() {#ariaid-title4}

Returns true if the newly discovered data is different than the data already in the
database for this item.
This method is only invoked for items that have been rediscovered.

Mandatory method, must be overridden in all concrete subclasses.
{#r_AR-hasChanged__table_ftq_xvc_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 5. Parameters]

{#r_AR-hasChanged__table_ftq_xvc_pt} {#r_AR-hasChanged__table_gtq_xvc_pt__entry__2}

| Type | Description |
|-|-|
| Boolean | True if the discovered data is different than the data already in the database. |
[Table 6. Returns]

{#r_AR-hasChanged__table_gtq_xvc_pt}

## AbstractReconciler - markAbsent() {#ariaid-title5}

Marks CIs as absent by setting the install status to "Absent"; other tables are marked
by setting the (presumed present) field "absent" to true.
{#r_AR-markAbsent__table_mdm_rwc_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 7. Parameters]

{#r_AR-markAbsent__table_mdm_rwc_pt} {#r_AR-markAbsent__table_ndm_rwc_pt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 8. Returns]

{#r_AR-markAbsent__table_ndm_rwc_pt}

## AbstractReconciler - markPresent() {#ariaid-title6}

Marks CIs as present by setting the install status to "Installed"; other tables are
marked by setting the (presumed present) field "absent" to false.
{#r_AR-markPresent__table_sst_xwc_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 9. Parameters]

{#r_AR-markPresent__table_sst_xwc_pt} {#r_AR-markPresent__table_tst_xwc_pt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 10. Returns]

{#r_AR-markPresent__table_tst_xwc_pt}

## AbstractReconciler - process() {#ariaid-title7}

Reconciles the newly discovered data with the data already present in the database and
resolves references to previously reconciled data.
{#r_AR-process__table_u2b_xsc_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 11. Parameters]

{#r_AR-process__table_u2b_xsc_pt} {#r_AR-process__table_v2b_xsc_pt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 12. Returns]

{#r_AR-process__table_v2b_xsc_pt}

## AbstractReconciler - readDatabaseFields() {#ariaid-title8}

Reads the current memory table record of newly discovered data and checks its validity.
Mandatory method, must be overridden in all concrete subclasses.
{#r_AR-readDatabaseFields__table_xt1_35c_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 13. Parameters]

{#r_AR-readDatabaseFields__table_xt1_35c_pt} {#r_AR-readDatabaseFields__table_yt1_35c_pt__entry__2}

| Type | Description |
|-|-|
| Boolean | True if the data is valid. |
[Table 14. Returns]

{#r_AR-readDatabaseFields__table_yt1_35c_pt}

## AbstractReconciler - readDiscovered() {#ariaid-title9}

Reads the current memory table record of newly discovered data and checks its validity.
Mandatory method, must be overridden in all concrete subclasses.
{#r_AR-readDiscovered__table_kj1_r5c_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 15. Parameters]

{#r_AR-readDiscovered__table_kj1_r5c_pt} {#r_AR-readDiscovered__table_lj1_r5c_pt__entry__2}

| Type | Description |
|-|-|
| Boolean | True if the data is valid. |
[Table 16. Returns]

{#r_AR-readDiscovered__table_lj1_r5c_pt}

## AbstractReconciler - resolveReferenceFields() {#ariaid-title10}

Reads the fields in the current database record into instance member fields.
Mandatory method, must be overridden in all concrete subclasses.
{#r_AR-resolveReferenceFields__table_jcz_wtc_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 17. Parameters]

{#r_AR-resolveReferenceFields__table_jcz_wtc_pt} {#r_AR-resolveReferenceFields__table_kcz_wtc_pt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 18. Returns]

{#r_AR-resolveReferenceFields__table_kcz_wtc_pt}

## AbstractReconciler - setDatabaseFields() {#ariaid-title11}

Sets the database fields for the current record to the values in the newly discovered
information.
This method is invoked both for new database records and for existing database records when
the discovered data has changed.

Mandatory method, must be overridden in all concrete subclasses.
{#r_AR-setDatabaseFields__table_qny_gwc_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 19. Parameters]

{#r_AR-setDatabaseFields__table_qny_gwc_pt} {#r_AR-setDatabaseFields__table_rny_gwc_pt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 20. Returns]

{#r_AR-setDatabaseFields__table_rny_gwc_pt}

## AbstractReconciler - setup() {#ariaid-title12}

Optional override for concrete subclasses that require special setup.
{#r_AR-setup__table_ccw_dtc_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| None |   |   |
[Table 21. Parameters]

{#r_AR-setup__table_ccw_dtc_pt} {#r_AR-setup__table_dcw_dtc_pt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 22. Returns]

{#r_AR-setup__table_dcw_dtc_pt}

## AbstractReconciler - track(String sys_id) {#ariaid-title13}

Optional method to override in concrete subclasses that need to resolve reference
fields.
This method is invoked after valid discovered data is read. Generally implementations will
use some of this discovered data as a key into a map (passed into the concrete reconciler
class when it was instantiated) that will return the sys_id of the database record holding
the referenced information. However, implementations are not required to use this
approach.
{#r_AR-track_S__table_rvk_ltc_pt__entry__3}

| Name | Type | Description |
|-|-|-|
| sys_id | String | The sys_id of the current database record. |
[Table 23. Parameters]

{#r_AR-track_S__table_rvk_ltc_pt} {#r_AR-track_S__table_svk_ltc_pt__entry__2}

| Type | Description |
|-|-|
| void |   |
[Table 24. Returns]

{#r_AR-track_S__table_svk_ltc_pt}

