Generate an outbound EDI file name¶
NameBuilder.GetFileName produces a timestamped, environment-tagged file name intended to precede Write an EDI interchange file.
| Field | Value |
|---|---|
| Operation ID | OP-11 |
| Trigger | Caller request prior to writing an EDI file. |
| Inputs | fileType, isProd. |
| Outputs | "{yyyyMMddHHmmss}_SAIF_{P\|T}_{fileType}.txt" using DateTime.Now. |
| Primary components | NameBuilder.GetFileName |
| Entry point | Common\SAIF.Common.Files\Edi\NameBuilder.cs |
Steps¶
- Capture the current timestamp via
DateTime.Nowand format it asyyyyMMddHHmmss. - Select the environment flag:
PwhenisProdis true,Totherwise. - Compose
"{timestamp}_SAIF_{flag}_{fileType}.txt"(BR-055).
No delegation to SAIF.Framework.Common occurs, and no database access is involved.
Process flow¶
flowchart TD
Start(["Caller: GetFileName(fileType, isProd)"]) --> Ts["Capture DateTime.Now as yyyyMMddHHmmss"]
Ts --> Flag{isProd?}
Flag -->|Yes| P["Environment flag = P"]
Flag -->|No| T["Environment flag = T"]
P --> Compose["Compose<br>{timestamp}_SAIF_{flag}_{fileType}.txt"]
T --> Compose
Compose --> EndOk([File name string returned])
Failure and edge-case behavior¶
- The file name uses
DateTime.Now(local server time), so file names generated across a daylight-saving or time-zone boundary are not directly comparable to UTC timestamps recorded elsewhere.*
Related documentation¶
Note: Statements marked with
*were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.
Sources¶
- Common\SAIF.Common.Files\Edi\NameBuilder.cs