Skip to content

OP-004: Decide whether a record is sent to OnBase

For each unprocessed record, this operation resolves the prior and new keyword values, logs the decision context, and returns a send/skip decision based on document counts and value equality.

Field Value
Operation ID OP-004
Trigger Step 3 of OP-003; returns the send/skip decision
Lifecycle stage Execute
Owning component KeywordUpdater.PerformUpdate(ImageKeywordSync keyword, bool getDocumentCount)
Inputs One ImageKeywordSync record, the document-counting flag
Outputs Boolean send/skip decision; a logged record-header block
Failure exit code 5 — a null OnBaseKeyword throws NullReferenceException*

Steps

  1. Resolve the prior value and the new value through OP-006 (BR-OBKS-009)
  2. On failure: a null OnBaseKeyword throws NullReferenceException*
  3. Log ID, trigger type (ImageKeywordSync.TriggerType), doc type group, keyword name, prior value, new value (BR-OBKS-006)
  4. If document counting is on and TotalDocumentUpdates > 0: log the count of updates with documents and the total document count, and return true (BR-OBKS-004)
  5. Else if prior and new values are equal case-insensitively: log that no updates will be sent, return false (BR-OBKS-005)
  6. Else if document counting is on (implying zero documents): log "No documents to update", return false (BR-OBKS-004)
  7. Else return true — document counting off, send without checking document counts (BR-OBKS-004)

Ordering finding: because step 3 is evaluated first, a record whose prior and new values are identical is still sent when document counting is on and documents exist — the equality short-circuit (BR-OBKS-005) only applies when document counting is off or no documents exist*.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    A["Resolve prior/new values<br>via OP-006"] --> B["Log record header block"]
    B --> C{"Document counting on<br>AND TotalDocumentUpdates &gt; 0?"}
    C -->|Yes| D["Log update counts<br>return true - send"]
    C -->|No| E{"Prior value equals<br>new value?"}
    E -->|Yes| F["Log no updates needed<br>return false - skip"]
    E -->|No| G{"Document counting on?"}
    G -->|Yes| H["Log no documents<br>return false - skip"]
    G -->|No| I["Return true - send"]

Logging

Log id Written content
Not application-assigned (fans out to all registered file0–file4 writers) Record ID, trigger type, doc type group, keyword name, prior value, new value, and either the update counts or the skip reason

Error handling

  • A null OnBaseKeyword on the resolved record throws NullReferenceException, which 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/KeywordUpdater.cs
  • OnBaseKeywordSync/Services/KeywordHelper.cs