Skip to content

ATS-PFM-DJE-012Import records using their producer identities: Capability Test Specification

Markdown

ATS-PFM-DJE-012

Import records using their producer identities: Capability Test Specification

Markdown
  • DocumentProposed

KindAcceptance test setProduct areaPlatformModuleData Job EngineRevision2

Read atmacroservice-libraries 54536a44services-crm a8d1364freact-console baf6dae3

Coverage

  • Rule covered
  • Transition gap: FND-PFM-DJE-072
  • Validation gap: FND-PFM-DJE-072
  • Permission gap: FND-PFM-DJE-072
  • Edge gap: FND-PFM-DJE-072
  • Failure covered
  • Boundary covered
  • Concurrency gap: FND-PFM-DJE-072
  • Invariant covered
  • Interaction covered

Test Scenarios

17 scenarios proving CAP-PFM-DJE-012; 9 bound to an existing test.

01 Import operations have distinct write behaviorruleapitest
Proves
BR-CAP-PFM-DJE-012-01
Preconditions
Prepare an organization input file.
Steps
[ { "do": "Process insert, repeated insert, upsert and update passes.", "expect": "The passes create, skip mapped keys, replace records and apply patches respectively.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#creates one organization per record of the file" } ]
Expected
The passes create, skip mapped keys, replace records and apply patches respectively.
Data
An organization input file.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#creates one organization per record of the file
02 Upsert revision checks skip old or repeated deliveryboundaryapitest
Proves
BR-CAP-PFM-DJE-012-02
Preconditions
Prepare a mapping at revision 10.
Steps
[ { "do": "Send upserts at revisions 10, 9 and 11.", "expect": "Equal input is duplicate, older input is stale and newer input applies.", "provenance": "test", "source": "macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#skips a delivery of a revision already applied, which is what a rerun of yesterday’s file is" } ]
Expected
Equal input is duplicate, older input is stale and newer input applies.
Data
A keyed record fixture.
Bound to
Source
macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#skips a delivery of a revision already applied, which is what a rerun of yesterday’s file is
03 Rejected creation reserves no identityfailureapinegativetest
Proves
BR-CAP-PFM-DJE-012-03
Preconditions
Prepare a delivery with one invalid record.
Steps
[ { "do": "Submit it and then submit corrected input.", "expect": "The rejected record has no mapping and its correction creates the record.", "provenance": "test", "source": "macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#creates the record and writes one crosswalk row, then updates that record and still has one row" } ]
Expected
The rejected record has no mapping and its correction creates the record.
Data
A keyed record fixture.
Bound to
Source
macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#creates the record and writes one crosswalk row, then updates that record and still has one row
04 Dependency retry uses retained inputtransitionapitest
Proves
BR-CAP-PFM-DJE-012-04
Preconditions
Deliver child input before its parent.
Steps
[ { "do": "Load the children, load their parent and retry the blocked job.", "expect": "The children move from blocked to applied.", "provenance": "test", "source": "macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#blocks the child, and a retry after the parent is loaded applies it and finishes the job" } ]
Expected
The children move from blocked to applied.
Data
Parent and child input files.
Bound to
Source
macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#blocks the child, and a retry after the parent is loaded applies it and finishes the job
05 Invalid owned details prevent partial creationinvariantapinegativetest
Proves
BR-CAP-PFM-DJE-012-05
Preconditions
Mix valid organizations with an unknown type or invalid address.
Steps
[ { "do": "Import the selection.", "expect": "Invalid records leave no record, address or mapping; valid neighbors apply.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#rejects the organization naming a type the tenant does not have and the one with two addresses of a type, and applies the two beside them" } ]
Expected
Invalid records leave no record, address or mapping; valid neighbors apply.
Data
An organization input file.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#rejects the organization naming a type the tenant does not have and the one with two addresses of a type, and applies the two beside them
06 Destination numbering and producer identity are separateruleapitest
Proves
BR-CAP-PFM-DJE-012-06
Preconditions
Prepare numbered producer records and identified configuration items.
Steps
[ { "do": "Import both kinds.", "expect": "Records receive workspace numbers and retain external identity; configuration identifiers are preserved.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#keeps each producer key as its organization’s external id, the record sending none of its own" } ]
Expected
Records receive workspace numbers and retain external identity; configuration identifiers are preserved.
Data
Record and configuration input files.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#keeps each producer key as its organization’s external id, the record sending none of its own
07 Initial import retains supported historical valuesboundaryapinegativetest
Proves
BR-CAP-PFM-DJE-012-07
Preconditions
Prepare a loading workspace and a contact package carrying an archived option.
Steps
[ { "do": "Load the package and inspect the contact and its crosswalk.", "expect": "The stored contact retains its historical archived option and receives its producer-key crosswalk.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#keeps the archived option an initial import carries, as history" } ]
Expected
The stored contact retains its historical archived option and receives its producer-key crosswalk.
Data
A migration package.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#keeps the archived option an initial import carries, as history
08 Deleting a record releases its producer keytransitionapitest
Proves
BR-CAP-PFM-DJE-012-08
Preconditions
Load keyed records.
Steps
[ { "do": "Delete them and deliver those keys again.", "expect": "Their mappings disappear on deletion and subsequent input can create records.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#takes the keys of the deleted records with them" } ]
Expected
Their mappings disappear on deletion and subsequent input can create records.
Data
Keyed input files.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#takes the keys of the deleted records with them
09 Unsavable files isolate their own recordsfailureapinegativetest
Proves
BR-CAP-PFM-DJE-012-09
Preconditions
Prepare organization logos including two that cannot be made permanent.
Steps
[ { "do": "Run the import.", "expect": "Other organizations receive their logos; the two affected records have file-specific refusals.", "provenance": "test", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#applies every organization whose logo could be saved, and rejects the two that could not be written" } ]
Expected
Other organizations receive their logos; the two affected records have file-specific refusals.
Data
Organization logo input.
Bound to
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#applies every organization whose logo could be saved, and rejects the two that could not be written
10 Planned automatic-role choice distinguishes import modesruleapiproposed
Proves
BR-CAP-PFM-DJE-012-10
Preconditions
Prepare automatic role definitions and twenty employees.
Steps
[ { "do": "Import first with the planned option off and then on.", "expect": "The proposed proof expects supplied roles only when off and automatic assignment when on.", "provenance": "proposed", "source": "react-console:acceptance/crm/playwright/journeys/data-operations/CRM-ACC-0646.spec.ts#CRM-ACC-0646" } ]
Expected
The proposed proof expects supplied roles only when off and automatic assignment when on.
Data
A contact input file.
Source
react-console:acceptance/crm/playwright/journeys/data-operations/CRM-ACC-0646.spec.ts#CRM-ACC-0646
11 An invalid owned detail reserves no producer identityinteractionapiproposed
Proves
BR-CAP-PFM-DJE-003-02 BR-CAP-PFM-DJE-012-03 BR-CAP-PFM-DJE-012-05
Preconditions
Prepare a keyed contact with an invalid address and a valid neighboring contact.
Steps
[ { "do": "Import both, inspect records and mappings, then submit corrected input under the refused key.", "expect": "The valid neighbor commits, the invalid record has no partial detail or mapping, and correction can create it.", "provenance": "proposed", "source": "services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses the other five, counting each as what refused it; macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#writes no crosswalk row for an item it refused, so the corrected delivery of that key is a create; services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#writes nothing at all of the rejected organization: not the row, not its addresses, not its mapping" } ]
Expected
The valid neighbor commits, the invalid record has no partial detail or mapping, and correction can create it.
Data
Prepare a keyed contact with an invalid address and a valid neighboring contact.
Source
services-crm:modules/data-jobs/tests/integration/services/jobs/contact-data-jobs.integration.spec.js#refuses the other five, counting each as what refused it; macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#writes no crosswalk row for an item it refused, so the corrected delivery of that key is a create; services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#writes nothing at all of the rejected organization: not the row, not its addresses, not its mapping
12 Dependency arrival makes retained input retryableinteractionapiproposed
Proves
BR-CAP-PFM-DJE-004-04 BR-CAP-PFM-DJE-012-04
Preconditions
Load a child whose required parent key is absent.
Steps
[ { "do": "Inspect the blocked result, load the parent, and retry the child job without another upload.", "expect": "The retained child input applies after its parent exists without duplicating earlier successful writes.", "provenance": "proposed", "source": "macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#refuses to retry a job whose refusals are not blocked items, because correcting records is a new job; macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#blocks the child, and a retry after the parent is loaded applies it and finishes the job" } ]
Expected
The retained child input applies after its parent exists without duplicating earlier successful writes.
Data
Load a child whose required parent key is absent.
Source
macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#refuses to retry a job whose refusals are not blocked items, because correcting records is a new job; macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#blocks the child, and a retry after the parent is loaded applies it and finishes the job
13 Reject policy preserves a staff correction in a later deliveryinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-006-05 BR-CAP-PFM-DJE-006-07 BR-CAP-PFM-DJE-012-01 BR-CAP-PFM-DJE-012-03
Preconditions
Import a revisioned keyed record and make a staff correction.
Steps
[ { "do": "Send a newer producer revision under reject policy and inspect its mapping and record.", "expect": "The delivery conflicts and preserves the staff correction; the producer-written version does not adopt the staff version.", "provenance": "proposed", "source": "macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#refuses the delivery as a conflict and leaves the record alone; macroservice-libraries:packages/data-jobs/README.md#Keyed writes and the ID crosswalk; services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#skips every record of the same file delivered a second time, rather than making a second organization; macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#writes no crosswalk row for an item it refused, so the corrected delivery of that key is a create" } ]
Expected
The delivery conflicts and preserves the staff correction; the producer-written version does not adopt the staff version.
Data
Import a revisioned keyed record and make a staff correction.
Source
macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#refuses the delivery as a conflict and leaves the record alone; macroservice-libraries:packages/data-jobs/README.md#Keyed writes and the ID crosswalk; services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#skips every record of the same file delivered a second time, rather than making a second organization; macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#writes no crosswalk row for an item it refused, so the corrected delivery of that key is a create
14 Spreadsheet folding reaches the keyed domain writeinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-012-01 BR-CAP-PFM-DJE-012-05 BR-CAP-PFM-DJE-013-01 BR-CAP-PFM-DJE-013-02 BR-CAP-PFM-DJE-013-04
Preconditions
Prepare a CSV with producer keys, typed phone columns, an empty detail collection and one repeated target.
Steps
[ { "do": "Import through the column mapping and inspect records, mappings and numbered refusals.", "expect": "Valid rows retain the chosen preferred details; the ambiguous row creates no record or mapping and its refusal identifies columns.", "provenance": "proposed", "source": "services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#skips every record of the same file delivered a second time, rather than making a second organization; services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#writes nothing at all of the rejected organization: not the row, not its addresses, not its mapping; services-crm:modules/data-jobs/tests/integration/services/operations/spreadsheet-columns.integration.spec.js#maps the mobile and work phone columns to their own types, the first declared type preferred, an empty cell no value; services-crm:modules/data-jobs/tests/integration/services/operations/spreadsheet-columns.integration.spec.js#makes the preferred e-mail value that repeats the personal one the first address, the personal one, ahead of the work one; services-crm:modules/data-jobs/tests/integration/services/operations/spreadsheet-columns.integration.spec.js#refuses a column mapped to a slot the record does not declare, naming the column and no value" } ]
Expected
Valid rows retain the chosen preferred details; the ambiguous row creates no record or mapping and its refusal identifies columns.
Data
Prepare a CSV with producer keys, typed phone columns, an empty detail collection and one repeated target.
Source
services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#skips every record of the same file delivered a second time, rather than making a second organization; services-crm:modules/data-jobs/tests/integration/services/operations/record-imports.integration.spec.js#writes nothing at all of the rejected organization: not the row, not its addresses, not its mapping; services-crm:modules/data-jobs/tests/integration/services/operations/spreadsheet-columns.integration.spec.js#maps the mobile and work phone columns to their own types, the first declared type preferred, an empty cell no value; services-crm:modules/data-jobs/tests/integration/services/operations/spreadsheet-columns.integration.spec.js#makes the preferred e-mail value that repeats the personal one the first address, the personal one, ahead of the work one; services-crm:modules/data-jobs/tests/integration/services/operations/spreadsheet-columns.integration.spec.js#refuses a column mapped to a slot the record does not declare, naming the column and no value
15 File processing preserves keyed replay outcomesinteractionapiproposed
Proves
BR-CAP-PFM-DJE-012-02 BR-CAP-PFM-DJE-012-03 BR-CAP-PFM-DJE-014-03 BR-CAP-PFM-DJE-014-10
Preconditions
Prepare a multi-chunk revisioned JSON Lines file.
Steps
[ { "do": "Process it, redeliver a committed chunk, then submit the same file as another keyed import.", "expect": "Chunk redelivery creates no repeated writes and the second import reports duplicate outcomes for applied revisions.", "provenance": "proposed", "source": "macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#skips a delivery a newer one has overtaken, so a late file never undoes the current record; macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#writes no crosswalk row for an item it refused, so the corrected delivery of that key is a create; macroservice-libraries:packages/data-jobs/src/chunk-plan.ts:shouldCloseChunk; macroservice-libraries:packages/data-jobs/src/chunk-source.ts:ChunkRun; services-crm:docs/data-jobs.md#The bulk lane" } ]
Expected
Chunk redelivery creates no repeated writes and the second import reports duplicate outcomes for applied revisions.
Data
Prepare a multi-chunk revisioned JSON Lines file.
Source
macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#skips a delivery a newer one has overtaken, so a late file never undoes the current record; macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#writes no crosswalk row for an item it refused, so the corrected delivery of that key is a create; macroservice-libraries:packages/data-jobs/src/chunk-plan.ts:shouldCloseChunk; macroservice-libraries:packages/data-jobs/src/chunk-source.ts:ChunkRun; services-crm:docs/data-jobs.md#The bulk lane
16 Keyed reconciliation reads current saved recordsinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-012-03 BR-CAP-PFM-DJE-015-01 BR-CAP-PFM-DJE-015-06
Preconditions
Import contacts with producer keys and edit one afterward.
Steps
[ { "do": "Request those keys in a different order from the file, including a repeated and an unknown key.", "expect": "Lookup returns current records in requested key order once per key and names the unknown key as missing.", "provenance": "proposed", "source": "macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#writes no crosswalk row for an item it refused, so the corrected delivery of that key is a create; services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#answers each record exactly as the ordinary read of one contact does; services-crm:modules/data-jobs/services/jobs/records-by-source-key.ts" } ]
Expected
Lookup returns current records in requested key order once per key and names the unknown key as missing.
Data
Import contacts with producer keys and edit one afterward.
Source
macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#writes no crosswalk row for an item it refused, so the corrected delivery of that key is a create; services-crm:modules/data-jobs/tests/integration/services/jobs/records-by-source-key.integration.spec.js#answers each record exactly as the ordinary read of one contact does; services-crm:modules/data-jobs/services/jobs/records-by-source-key.ts
17 Dependency-driven datasets use the owning applicationinteractionapinegativeproposed
Proves
BR-CAP-PFM-DJE-012-04 BR-CAP-PFM-DJE-012-07 BR-CAP-PFM-DJE-016-04 BR-CAP-PFM-DJE-016-06 BR-CAP-PFM-DJE-016-07 BR-CAP-PFM-DJE-016-08
Preconditions
Register a loading-workspace package with parent and child datasets and one unresolved reference.
Steps
[ { "do": "Start and poll the run, forwarding the staff caller's token, through both permitted attempts of the blocked dataset.", "expect": "Dataset jobs respect dependency waves; the remaining block is visible in readiness and no third attempt is submitted.", "provenance": "proposed", "source": "macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#blocks the child, and a retry after the parent is loaded applies it and finishes the job; services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#keeps the archived option an initial import carries, as history; services-platform:modules/data-jobs/tests/integration/services/runs/register-run.integration.spec.js#refuses a package whose datasets cannot be ordered, before any row of it is written; services-platform:modules/data-jobs/tests/integration/lifecycle/data-run-guarantees.integration.spec.js#leaves the run where it stood while nobody reads it, though a dataset finished in its service; services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#forwards the staff caller’s own token with every call, and invents no identity of its own; services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#tries a blocked dataset a second time, and only a second time" } ]
Expected
Dataset jobs respect dependency waves; the remaining block is visible in readiness and no third attempt is submitted.
Data
Register a loading-workspace package with parent and child datasets and one unresolved reference.
Source
macroservice-libraries:packages/data-jobs/src/tests/integration/keyed-data-jobs.integration.spec.ts#blocks the child, and a retry after the parent is loaded applies it and finishes the job; services-crm:modules/data-jobs/tests/integration/services/jobs/initial-import-guarantees.integration.spec.js#keeps the archived option an initial import carries, as history; services-platform:modules/data-jobs/tests/integration/services/runs/register-run.integration.spec.js#refuses a package whose datasets cannot be ordered, before any row of it is written; services-platform:modules/data-jobs/tests/integration/lifecycle/data-run-guarantees.integration.spec.js#leaves the run where it stood while nobody reads it, though a dataset finished in its service; services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#forwards the staff caller’s own token with every call, and invents no identity of its own; services-platform:modules/data-jobs/tests/integration/services/runs/run-driver.integration.spec.js#tries a blocked dataset a second time, and only a second time

The Markdown files under specs/ in rhythmsoftware/rhythm-v2-docs are the canonical source of truth. This reader is a generated, read-only projection of them.