Skip to content

MODEXPW-643 - Populate exportTransmissionMethod on ExportHistory for order exports - #750

Open
markusweigelt wants to merge 9 commits into
masterfrom
MODEXPW-643
Open

MODEXPW-643 - Populate exportTransmissionMethod on ExportHistory for order exports#750
markusweigelt wants to merge 9 commits into
masterfrom
MODEXPW-643

Conversation

@markusweigelt

Copy link
Copy Markdown
Contributor

MODEXPW-643 - Populate exportTransmissionMethod on ExportHistory for order exports

Purpose

ExportHistory records that an EDIFACT/CSV order export happened, but not how the file actually reached the vendor. The export config's transmissionMethod only states what was requested.

This fills in the exportTransmissionMethod field added to the ExportHistory schema, so the edi-export-history.create event carries the channel that actually succeeded. Later mod-orders-storage MODORDSTOR-526 consumes it and stamps poLine.lastExport.transmissionMethod, which makes PO lines filterable and sortable by how they were last transmitted.

The value is set only when the matching delivery step succeeds, so a failed or skipped transmission records no method at all rather than a misleading one.

Approach

  • Add the acqExportTransmissionMethod job-context key (JobParameterNames) and a setJobExecutionContext(StepExecution, key, value) overload in ExecutionContextUtils that writes to the job-level execution context, so the value survives from the delivery step to the later export-history step.
  • Stamp the key from each delivery tasklet, after its own work has succeeded:
    • SaveToFileStorageTaskletFTP
    • SendToEmailTaskletEmail
    • SaveToMinioTaskletFile download
  • SaveToMinioTasklet is gated on the config actually requesting FILE_DOWNLOAD. The MinIO upload runs for every job regardless of channel, so an ungated stamp would relabel FTP and Email jobs as file downloads.
  • ExportHistoryTasklet reads the key and maps it onto ExportHistory.ExportTransmissionMethodEnum, leaving the field null when no delivery step recorded one.
  • Bump the folio-export-common submodule for the exportTransmissionMethod schema field.

Depends on

folio-org/folio-export-common#113

markusweigelt and others added 8 commits July 17, 2026 19:11
Stamp how an EDIFACT/CSV export was actually delivered (FTP, Email, or
File download) onto ExportHistory, set only when the matching delivery
step succeeds so a failed or skipped transmission records no method.
Temporary development pin so the branch builds against the unmerged
schema changes. Must be reverted to the folio-org URL before merge.
@sonarqubecloud

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants