Skip to content

OP-006: Translate a keyword value

This operation selects either the prior or new value from a keyword-sync record and, for three known flag keywords, translates the value to Y/N. All other keywords pass through unchanged.

Field Value
Operation ID OP-006
Trigger Step 1 of OP-004 and step 4 of OP-005
Lifecycle stage Execute
Owning component KeywordHelper.GetKeywordValue(ImageKeywordSync keyword, bool newValue)
Inputs One ImageKeywordSync record, a flag selecting NewValue or PriorValue
Outputs The translated (or pass-through) keyword value string
Failure exit code None — errors are logged and processing continues*

Steps

  1. Select NewValue or PriorValue based on the flag
  2. Upper-case OnBaseKeyword and look it up in the static yes/no translation table built in the static constructor (BR-OBKS-009)
  3. If the keyword is a flag keyword, evaluate its predicate and return "Y"/"N"; otherwise return the raw value unchanged (BR-OBKS-009)
  4. CLAIM EXPOSURE FLAG → Y when the value is not "0"
  5. CLAIM SECURED FLAG → Y when the value is R or T
  6. POLICY SECURED FLAG → Y when the value is non-blank

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    A["Select NewValue<br>or PriorValue"] --> B["Upper-case OnBaseKeyword<br>look up in flag table"]
    B --> C{"Is a known<br>flag keyword?"}
    C -->|Yes| D["Evaluate flag predicate<br>return Y or N"]
    C -->|No| E["Return raw value<br>unchanged"]

Logging

No logging occurs directly in this operation; the caller (OP-004, OP-005) logs the resolved value.

Error handling

  • A null OnBaseKeyword on the record throws NullReferenceException when this operation is called from OP-004*; this propagates to OnBaseKeywordSyncRunner.Execute's catch block → exit code 5.

Note: Statements marked with * were inferred from code structure, naming conventions, or contextual evidence where direct confirmation was not available in source artifacts.

Sources

  • OnBaseKeywordSync/Services/KeywordHelper.cs