Skip to main content

Rebuild register

Rebuild register reads every Earmark parameter and registered setup table in a company again and brings the Configuration register up to date, so each setting shows its current value beside its install default. Take snapshot runs the same rebuild and then copies the register into a permanent snapshot that you can compare against later. This page is for the people who keep the configuration record: the Accounting manager and System administrator who rebuild it and take snapshots, and the Earmark auditor who reads and compares them.

Runs: on demand (the Rebuild register button on Earmark > Setup > Configuration register, or Earmark > Periodic tasks > Rebuild register), as a batch job you schedule, and by itself at the start of every Take snapshot. Set up by: Accounting manager or System administrator. Watched by: Accounting manager and Earmark auditor.

Why it exists​

The register is the one place to see how Earmark is configured in a company: every parameter, which package owns it, its type, its value now, its install default and whether the two differ. It is also what the Configuration differs from default tile counts, what an example configuration is imported into, and what Take snapshot copies.

The register is a copy, not a live view. Its rows are written only by a rebuild, so it shows the settings as they were at the last rebuild. That keeps the page fast and gives a snapshot a fixed set of rows to copy. The cost is that someone, or a batch job, has to rebuild it.

When it runs​

TriggerNotes
Rebuild register on the Configuration register pageRebuilds now and refreshes the page.
Earmark > Periodic tasks > Rebuild registerThe same dialog, where you can also schedule it.
A batch job you create from that dialogRuns in the company where you create it.
Take snapshotAlways rebuilds first, so a snapshot matches the settings at that moment.

What does not rebuild it. Saving Earmark parameters, changing a deal group or a reason flag, Apply example and Reset to install default all leave the register as it was. After any of them the register shows the old values until the next rebuild.

To run it now: on Earmark > Setup > Configuration register, click Rebuild register, then OK.

To schedule it:

  1. Open Earmark > Periodic tasks > Rebuild register.
  2. On the Run in the background tab, switch Batch processing on and set a Recurrence.
  3. Click OK.

The register is kept per company, so schedule the job in each company that uses Earmark.

How often. The product's own help suggests nightly. A rebuild is small (one row per parameter plus a handful of other rows), so nightly costs little and means the register and its tile are never more than a day old. If you rebuild only by hand, rebuild before you read the register, compare it or apply an example.

Snapshots are taken only by hand. Nothing takes a snapshot on a schedule, and Take snapshot is not a batch job. Take one at the moments you want a record of: before go-live, before and after an update, before a change of policy.

Settings​

SettingWhereDefaultEffect
(none)Rebuild register dialogThe dialog has no fields of its own, only the standard Run in the background tab.
Reason noteTake snapshot dialogBlankAn optional note stored with the snapshot and shown in its Note column. Say why you took it.
Configuration snapshot IDCompare to snapshot dialogBlankThe snapshot to compare with the register. The ids are on Earmark > Setup > Configuration snapshots.
Configuration snapshot ID number sequenceEarmark > Setup > Earmark parameters, Number sequences tabNoneNeeded by Take snapshot, which draws each snapshot's id from it. Without it, no snapshot can be taken.

What it does​

Rebuild register:

  1. Opens one transaction for the whole rebuild.
  2. Writes one row for each field of Earmark parameters in the company:
    • Current value is the value now. A choice is shown by its stored name, which can differ slightly from the text in the drop-down (for example, without spaces).
    • Install default is the value a new parameters record starts with.
    • Differs is Yes when the two are not the same.
    • Parameter last changed by and Parameter last changed are who last saved the parameters record and when. They are the same on every parameter row, because the platform records changes per record, not per field.
  3. Writes one row for each registered Earmark setup table (as shipped: deal groups and the reasons flagged for Earmark). Its Parameter type is Reference, its Current value is the number of rows the table holds in this company, and its Install default is 0. So a setup table you have filled in reads Differs Yes.
  4. Writes five rows for settings made on standard pages: the deal approval workflow, the claim approval workflow, inventory revaluation, claim statement print management and business event activation. They carry no value; they remind you that those settings live outside Earmark.
  5. Deletes any row whose parameter no longer exists, for example after an update removed one.
  6. Keeps the Example and Example value columns of every row as they were, so an imported example survives a rebuild.
  7. Commits, and reports "The configuration register was rebuilt: %1 rows."

Take snapshot:

  1. Runs the rebuild above, which commits on its own.
  2. Draws a new id from the Configuration snapshot ID number sequence.
  3. In one transaction, copies every register row into the snapshot, with Taken by (you), Taken (now) and your Note.
  4. Reports "Configuration snapshot %1 taken." The snapshot cannot be changed or deleted afterwards.

Compare to snapshot writes nothing. It lists each parameter in the snapshot with its Current value in the register, its Snapshot value and Differs. It reads the register as it stands, without rebuilding it, so rebuild first for a true comparison. A parameter the register no longer carries shows an empty current value and reads as differing (unless its snapshot value was empty too); a parameter added since the snapshot is not listed.

Before it can run​

  • Access. Rebuild register and Take snapshot need the Maintain Earmark configuration duty (Accounting manager, System administrator). Viewing the register and the snapshots, and Compare to snapshot, need Inquire into Earmark configuration (Earmark auditor, Accounting manager); the System administrator can open them too (security reference).
  • For snapshots, a Configuration snapshot ID number sequence in the company (Set up number sequences).
  • No module needs to be on. The register, the rebuild and the snapshots all work while every Earmark module is off.

What goes in and what comes out​

InOut
The Earmark parameters record of the companyOne register row per parameter, with its current value and install default
The registered setup tables (row counts only)One register row per table
The fixed list of five standard-page settingsFive register rows with no value
The register (for Take snapshot)A permanent snapshot: one row per register row, under one id
The register and a snapshot (for Compare to snapshot)The Compare to snapshot page; nothing stored

A rebuild writes no timeline row and no business event. The register is also available as data: the Earmark configuration registers entity (/data/MGCEarmarkConfigurationRegisters) is described in the entity reference. No entity carries the snapshots; read them on Configuration snapshots.

Watching it​

  • The register itself. Earmark > Setup > Configuration register shows every row. Filter Differs on Yes to see what your company changed from the shipped values.
  • The Configuration differs from default tile on Earmark > Workspaces > Earmark configuration counts register rows that read Differs Yes. It counts the register, not the live settings, so it is only as fresh as the last rebuild, and the tile itself refreshes once a day. Setup tables that hold rows count toward it.
  • The batch job, if you scheduled one: System administration > Inquiries > Batch jobs. The task's class is MGCEarmarkConfigurationRegisterRebuildController, and the job's log holds the "rebuilt" line.
  • The snapshots. Earmark > Setup > Configuration snapshots lists every snapshot with Configuration snapshot ID, Taken by, Taken, Note and the rows it holds.

When it fails​

What you seeWhat it isWhat to do
An error during Rebuild register or Take snapshotA failure. The rebuild is one transaction, so nothing changes: the register keeps the rows of the last good rebuild, and no snapshot is taken. This includes a setup table the rebuild cannot read: the whole rebuild stops, it does not leave that table out.Read the error, fix its cause, then rebuild again.
"No number sequence is set up for the configuration snapshot identifier, so no snapshot can be taken. ..."A refusal. The register has been rebuilt, but no snapshot was written.Set up the Configuration snapshot ID sequence, then take the snapshot again.
"Snapshot %1 was not found. Check the id against the configuration snapshot list."A refusal from Compare to snapshot.Copy the id from Configuration snapshots.

A re-run is always safe. Every rebuild writes every row again from the live settings and removes the rows that no longer apply, so running it twice gives the same register as running it once. The batch framework may retry the task after an interruption for the same reason. A second Take snapshot is never a duplicate: it is a new snapshot under a new id.

Effects on the rest of Earmark​

  • Apply example and Reset to install default work from the register. They act only on the parameters the register lists, and they do not rebuild it first. After installing or updating Earmark, rebuild the register before using either, so that every current parameter is on it.
  • Importing an example needs the rows to exist. The register refuses new rows from anything but a rebuild, so an example imported through the Earmark configuration registers entity can only fill rows that a rebuild has already written. Rebuild, then import. A later rebuild keeps the imported example.
  • Locks. The rebuild updates the register's rows in one short transaction. It does not lock Earmark parameters or any setup table, so nobody's work waits for it.
  • Snapshots are permanent. They cannot be edited or deleted, and they are never purged by Earmark retention cleanup.