Evidence pack builder
The evidence pack builder assembles one evidence pack: a pack type, a reporting period and the legal entity it runs in, written as a pack run with one section per piece of evidence. Every pack carries a coverage statement and a control-downtime section, whatever its type.
At a glance
| Batch class | MGCWardenAuditPackBuilder |
| Menu item | MGCWardenAuditPackBuilderMenuItem, label Evidence pack builder |
| Menu path | System administration → Setup → Evidence pack builder |
| Who may run it | MGCWardenAuditPackBuildPriv (Produce Warden evidence packs, granted at Update) → MGCWardenAuditPackBuildDuty → Warden audit administrator (MGCWardenAuditAdministrator) and Warden auditor (MGCWardenAuditor). The API operation MGCWardenBatchService.runAuditPackBuilder is granted on the same privilege and re-checks the same menu item |
| Feature toggle | Warden Evidence & Compliance (MGCWardenAuditReportingFeature). When it is off, the run is recorded as Skipped with no sections |
| License | Past the license block date that the licensing service reports, the run is recorded as Skipped with no sections. Packs already built stay readable and exportable |
| Company scope | Per legal entity. The run is stamped LegalEntityScope = the company it runs in, and every section except AccessChanges reads only that company's evidence. Build packs in each legal entity you report on |
| Scheduled by default | No. Nothing in the product creates a batch job for it |
| Recurrence | None built in. The period is a fixed pair of dates saved with the job, so a recurring job rebuilds the same period on every run. Use one job per period |
| Setup-gap rules watching it | PackNoCompletedRun (a company with store rows and no completed pack ever), PackScopeUnmapped (an active register entry outside the GxPObjects pack scope, raised only once a scope is declared) |
| Run record | MGCWardenAuditPackRun with its MGCWardenAuditPackSection rows |
| Overlap guard | Not guarded by MGCWardenBatchOverlapGuard. Each run is a new pack run with its own id, so two runs never share rows |
Purpose and business justification
Auditors ask for evidence by regime and period: SOX ITGC for a quarter, the India MCA audit trail for a financial year, 21 CFR Part 11 for a validated system. The builder answers that question from Warden's own records, in one place, and says what it does not cover.
Two rules make a pack trustworthy:
- No partial pack. Any section failure discards every section of the run and marks it Failed. Only a Completed run can be exported or rendered.
- Every build is logged. The run row and the store row that logs it commit in one transaction. A build that cannot be logged does not happen.
How and when it is triggered
- Run now from the menu item. The dialog asks for the pack type and period.
canRunInNewSession()returns false, deliberately, so an interactive build runs in the user's own session and is attributed to them. - Scheduled from the same dialog with Run in the background. The three dialog values are saved
with the job (
pack()carriespackType,periodFrom,periodTo). - API:
MGCWardenBatchService.runAuditPackBuilder(packType, periodFrom, periodTo), with the pack type by enum name and the dates asyyyy-MM-dd. The result's record key is the pack run.
Configuration and scheduling options
| Dialog field | Values | Notes |
|---|---|---|
| Pack type | India MCA audit trail (IndiaMCA), SOX ITGC (SOXITGC), 21 CFR Part 11 (CFRPart11), Workflow configuration export (WorkflowConfigExport) | Decides the type-specific sections |
| Period from, Period to | Dates | Required. validate() refuses a missing or inverted period. The period runs from 00:00:00 on the first day to 23:59:59 on the last |
There is no default period: the class has no initParmDefault() by design, because a guessed period
would be published as evidence.
Other inputs that shape a pack:
| Setting | Where | Effect |
|---|---|---|
| Evidence pack templates | Evidence pack templates (MGCWardenAuditPackTemplate) | An enabled row whose section name has no built-in assembler becomes a placeholder section carrying its mapping value. Enabled GxPObjects rows with a mapping value declare the CFR Part 11 object scope |
| Anchor feed destination | Warden audit parameters | Printed in the coverage statement, or NOT CONFIGURED |
| Audit register and retention classes | Audit register, retention classes | Active sensors and retention classes in force, printed in the coverage statement |
Scheduling. Because the saved period never moves, a recurring job is only useful to rebuild a period, for example after late evidence arrived. For a quarterly pack, create a one-off job (or run it by hand) after each quarter closes, in each legal entity. A job queued by an earlier build carries no saved parameters and fails to unpack; recreate it.
What it does
period valid? --no--> error, nothing recorded
|
license blocked? --yes--> Skipped run + EvidencePackLicenseBlocked store row
|
feature on? --no--> Skipped run + ReportingFeatureOff store row
|
Running run + EvidencePackStarted store row (one transaction)
|
build sections ----failure----> delete sections, run Failed, Error exception
|
Completed + EvidencePackProduced store row (one transaction) --failure--> as above
|
native-log exclusion gap (Warning, if any)
-
Period check. A missing or inverted period throws A valid reporting period (from/to) is required. Nothing is recorded.
-
License block (
MGCWardenLicenseGate::newPacksBlocked). If the licensing service reports the environment past its block date,recordLicenseBlockedinserts a Skipped run with the summary This environment is past its Warden license block date, so no section was assembled and no evidence for this period is claimed. Renew with Magicite, then build the pack again. and, in the same transaction, aEvidencePackLicenseBlockedself-audit row (rows written by earlier versions carryLicenseBlockedPack). It then shows a warning and stops. -
Feature gate. If Warden Evidence & Compliance is off,
recordFeatureOffdoes the same with aReportingFeatureOffself-audit row and a summary saying the run makes no statement about the period. -
Start. Composes the parameter snapshot (pack type, period, company, and the requester as a subject reference), then inserts the Running run and an
EvidencePackStartedstore row in one transaction. If either fails, nothing is recorded, an Error execution exception is filed and the build throws (refuseUnlogged). -
Sections (
buildSections), each written as its own row, capped at 500 listed lines per section:Pack type Sections Every pack CoverageStatement(active sensors, retention classes, the legal entity, latest verification and latest published anchor for this company's partition, anchor feed status, the native-log check, the pseudonymization posture, the capture boundary);ControlDowntime(everyUngovernedActionstore row in the period for this company, or No control outages in period.);NativeLogExclusionsonly when registered objects have native database-log history the pack does not containSOX ITGC AccessChanges(role events from every company, labeled system-wide),ControlOperation,PurgeCertificates,ApprovedPurges(approved and not yet run, as at build time),DeprovisioningQueue(as at build time)India MCA audit trail TrailCoverage21 CFR Part 11 GxPObjects,DeviceAttribution,SignatureManifestationsWorkflow configuration export WorkflowConfigurationsAny type One placeholder section per enabled template row with no built-in assembler People are written as subject references, except the CFR Part 11 signature manifestations, which stay clear by decision, and text quoted from older stored rows.
-
Complete. Marks the run Completed with a summary (N section(s) produced for period ... All evidence pack templates are draft pending legal review.) and writes the
EvidencePackProducedstore row in the same transaction. -
Failure. Any failure in 5 or 6 deletes the run's sections, marks the run Failed with a summary saying which of the two failed, and files an Error execution exception keyed to the run.
-
Native-log exclusion notice. After completion, if objects were excluded, files a Warning execution exception and shows a warning pointing at the NativeLogExclusions section.
Idempotency. None by design. Each run is a new pack run, even for a period already built.
Dependencies and prerequisites
- Warden Evidence & Compliance switched on (see Getting started).
- The audit store accepting writes; the build refuses to run unlogged.
- The identity vault able to issue references.
- For meaningful content: the writer, guard ingestion, role capture, integrity batch and deprovisioning scan running in the same legal entity. A pack is only as complete as the records behind it.
Inputs and outputs
| Direction | Table | What |
|---|---|---|
| Inserts, updates | MGCWardenAuditPackRun | One run: Running, then Completed, Failed or Skipped |
| Inserts, deletes | MGCWardenAuditPackSection | Sections; deleted on failure |
| Inserts | MGCWardenAuditEvent, MGCWardenAuditDetailParam | EvidencePackStarted, EvidencePackProduced, ReportingFeatureOff or EvidencePackLicenseBlocked self-audit rows |
| Reads | MGCWardenAuditEvent, MGCWardenAuditVerificationRun, MGCWardenAuditHashAnchor, MGCWardenAuditRegisterEntry, MGCWardenAuditRoleEvent (all companies), MGCWardenAuditPurgeCertificate, MGCWardenAuditPurgeProposal, deprovisioning and leaver intake tables, MGCWardenAuditPackTemplate, MGCWardenAuditParameters, workflow tables | Section content |
| Reads, inserts | MGCWardenIdentityVault | Through refFor and toRef |
| Inserts | MGCWardenExecutionException | Failures (Error) and native-log exclusions (Warning) |
Logging and monitoring
- Evidence pack runs (System administration → Setup → Evidence pack runs, also linked from the Warden Audit workspace) lists every run with its status and summary, and offers Export and Render (ER) for Completed runs.
- Setup gaps:
PackNoCompletedRunper legal entity the store captures for, andPackScopeUnmapped. - Execution exceptions: assembly and completion failures, refused builds, native-log exclusion notices.
- Audit store: the started and produced rows. A started row with no produced row is a build that failed.
Screenshot to add: the Evidence pack runs page showing one Completed, one Failed and one Skipped run.
Errors, recovery and troubleshooting
| Symptom | Cause and recovery |
|---|---|
| A valid reporting period (from/to) is required. | Period missing or inverted. On a scheduled job, the job was queued by an earlier build and has no saved period; recreate it |
| Batch task fails to unpack its parameters | A job saved before the payload was versioned. Recreate it |
| Run Skipped, license summary | The environment is past its license block date. Renew, then build again. A scheduled job keeps producing Skipped runs until then |
| Run Skipped, feature summary | Warden Evidence & Compliance is off. Switch it on and build again |
| Run Failed, Pack assembly failed; partial sections were discarded. | A section threw. The exception names the run; fix the cause and build again |
| Run Failed, ... could not be marked Completed together with its self-audit row ... | The audit store refused the produced row. Check that the store accepts writes, then build again |
| Error ... was refused: its Running run could not be recorded ..., no run on the list | The store refused the started row, so no run exists. Same recovery |
PackNoCompletedRun for a company | No pack has ever completed there. Build one in that company |
The class does not implement BatchRetryable. Failures during assembly are caught and recorded; an
invalid period and an unlogged build throw, so the batch task ends in Error.
Impact on other functionality
- Export and rendering.
MGCWardenAuditPackExporterandMGCWardenAuditPackErRendereraccept Completed runs only. - Audit store growth. Two store rows per completed build; one per skipped build. These are control evidence and cannot be purged.
- Erasure. A pack stores references. An erasure later tombstones the reference; the pack text is not rewritten. See Erasure execution.
- Retention cleanup deletes pack runs, with their sections, once the period they cover ended before the evidence window (Running and Created runs are never deleted). The store rows that logged the build stay. See Warden retention cleanup.