Skip to content

entity-compliance-config schema

One config row for the generic engine-entity.compliance-sweep job — evaluate a rule-engine boolean expression against every row of an entity and flag/escalate offenders.

Pull the full JSON Schema: erp schema pull entity-compliance-config  ·  MCP: erp_get_schema {"name":"entity-compliance-config"}

Top-level properties

PropertyTypeRequiredNotes
compliance_codestringyesStable identifier / natural key for idempotent seeding.
source_entitystringyesEntity evaluated row-by-row.
status_fieldstring
when_status_instringOptional comma-separated status pre-filter.
filter_fieldstringOptional single-column equality pre-filter.
filter_valuestring
related_count_entitystringOptional: count child rows of this entity whose related_count_key_field equals the source row's id, and bind the result as related_count in the expression context.
related_count_key_fieldstringThe FK column on related_count_entity that points back to the source row's id.
related_count_status_fieldstring
related_count_status_instringOptional comma-separated status filter for the related count.
condition_exprstringyesMVEL boolean expression evaluated against each row's fields (+ now, + related_count). Whitelisted functions only (daysBetween, now, etc.). True => apply the outcome.
set_fieldstringFlag outcome: column on the source row to write when the condition is true (idempotent — skipped if already equal to set_value).
set_valuestringFlag outcome: value written into set_field.
escalation_entitystringEscalation outcome: create one row in this separate entity per violating source row, deduped by escalation_dedupe_field = source id.
escalation_dedupe_fieldstringColumn on escalation_entity that holds the source row id (used for dedupe).
escalation_timestamp_fieldstringOptional column on escalation_entity that receives now on create.
field_map_jsonobjectEscalation outcome: {targetField: sourceField} — copies source row values into the new escalation row.
escalation_template_jsonobjectEscalation outcome: static fields set on every created escalation row.
seeded_bystring
activebooleanyes