Skip to content

OP-005: Send one keyword update to OnBase

For each KeywordUpdate that OP-004 decided to send, this operation builds the OnBase E-Form payload with one keyword action, invokes the SOAP client either synchronously or asynchronously, throttles with a configured sleep, and logs the result.

Field Value
Operation ID OP-005
Trigger Step 4 of OP-003
Lifecycle stage Execute
Owning component OnBaseKeywordSyncClient.UpdateKeyword(KeywordUpdate update, ImageKeywordSync keyword), invoked from KeywordUpdater.UpdateKeyword
Inputs One KeywordUpdate, the owning ImageKeywordSync record
Outputs One SOAP call to OnBase; a document handle when synchronous
Failure exit code 5 — an unmapped DocTypeGroup or a WCF fault/timeout propagates

Steps

  1. Log the update's type and key, and (when counting) the document count (BR-OBKS-006)
  2. Build OBEFormDataKeywordUpdate: Single_Instance_Keyword_Group.QueryType.INS_CustomQuery = the custom query mapped from the record's DocTypeGroup via OnBaseKeywordSync.customquerymappings; StandAlone.INS_RequestType_Collection = ASYNCHRONOUS/SYNCHRONOUS; StandAlone.INS_Username_Collection = Environment.UserName (BR-OBKS-008)
  3. On failure: an unmapped DocTypeGroup throws KeyNotFoundException → exit code 5
  4. Add one QueryParameter: INS_QueryKeywordType = CLAIM NUMBER / POLICY NUMBER / AGENCY NUMBER / GROUP ACRONYM from the KeywordUpdate; operator EQUAL; relation AND; value = the update's key (BR-OBKS-006)
  5. Add one KeywordUpdateAction at order 0: INS_Action = DELETE when the new value is null/whitespace else ADD; INS_DataType = OnBaseKeyword; INS_DataValue = upper-cased new value (null on delete) (BR-OBKS-007, BR-OBKS-009)
  6. Call KeywordUpdateAsync(data) when async (Task not awaited), else KeywordUpdate(data) and capture the returned document handle (BR-OBKS-001)
  7. On failure: a WCF fault/timeout throws → exit code 5
  8. Sleep OnBaseKeywordSync.onbaseclientsleepmilliseconds when greater than zero (BR-OBKS-011)
  9. Log "Update sent to OnBase" (async) or "Update sent to OnBase - update doc handle: {docHandle}" (sync) (BR-OBKS-001)

Payload finding: Multi_Instance_Keyword_Group.KeywordUpdateAction_Collection is allocated with exactly one element and AddKeywordUpdateAction is called once with actionOrder = 0, so each SOAP call carries exactly one keyword action.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    A["Log update type and key"] --> B["Build OBEFormDataKeywordUpdate<br>map DocTypeGroup to custom query"]
    B --> C["Add QueryParameter<br>from update key"]
    C --> D["Add one KeywordUpdateAction<br>ADD or DELETE"]
    D --> E{"Async mode?"}
    E -->|Yes| F["KeywordUpdateAsync -<br>fire and forget"]
    E -->|No| G["KeywordUpdate -<br>capture doc handle"]
    F --> H["Sleep sleepmilliseconds<br>if greater than zero"]
    G --> H
    H --> I["Log update sent to OnBase"]
    B -.->|Unmapped DocTypeGroup| ERR["Exit code 5"]
    F -.->|WCF fault/timeout| ERR
    G -.->|WCF fault/timeout| ERR

Logging

Log id Written content
Not application-assigned (fans out to all registered file0–file4 writers) Update type/key, optional document count, "Update sent to OnBase" (async) or "Update sent to OnBase - update doc handle: {n}" (sync)

Error handling

  • An unmapped DocTypeGroup raises KeyNotFoundException; a malformed mapping string raises IndexOutOfRangeException. Both propagate to OnBaseKeywordSyncRunner.Execute's catch block → exit code 5.
  • A WCF fault or timeout on either KeywordUpdate or KeywordUpdateAsync propagates the same way. The async path's Task is never awaited or observed, so faults on that path are silently lost rather than reaching this catch block*.

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/OnBaseKeywordSyncClient.cs
  • OnBaseKeywordSync/Services/KeywordUpdater.cs
  • OnBaseKeywordSync/Contracts/KeywordUpdateExtensions.cs
  • OnBaseKeywordSync/Service References/OnBase/Reference.cs