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¶
- Select
NewValueorPriorValuebased on the flag - Upper-case
OnBaseKeywordand look it up in the static yes/no translation table built in the static constructor (BR-OBKS-009) - If the keyword is a flag keyword, evaluate its predicate and return
"Y"/"N"; otherwise return the raw value unchanged (BR-OBKS-009) CLAIM EXPOSURE FLAG→Ywhen the value is not"0"CLAIM SECURED FLAG→Ywhen the value isRorTPOLICY SECURED FLAG→Ywhen 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
OnBaseKeywordon the record throwsNullReferenceExceptionwhen this operation is called from OP-004*; this propagates toOnBaseKeywordSyncRunner.Execute's catch block → exit code5.
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¶
OnBaseKeywordSync/Services/KeywordHelper.cs