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¶
- Log the update's type and key, and (when counting) the document count (BR-OBKS-006)
- Build
OBEFormDataKeywordUpdate:Single_Instance_Keyword_Group.QueryType.INS_CustomQuery= the custom query mapped from the record'sDocTypeGroupviaOnBaseKeywordSync.customquerymappings;StandAlone.INS_RequestType_Collection=ASYNCHRONOUS/SYNCHRONOUS;StandAlone.INS_Username_Collection=Environment.UserName(BR-OBKS-008) - On failure: an unmapped
DocTypeGroupthrowsKeyNotFoundException→ exit code5 - Add one
QueryParameter:INS_QueryKeywordType=CLAIM NUMBER/POLICY NUMBER/AGENCY NUMBER/GROUP ACRONYMfrom theKeywordUpdate; operatorEQUAL; relationAND; value = the update's key (BR-OBKS-006) - Add one
KeywordUpdateActionat order0:INS_Action=DELETEwhen the new value is null/whitespace elseADD;INS_DataType=OnBaseKeyword;INS_DataValue= upper-cased new value (null on delete) (BR-OBKS-007, BR-OBKS-009) - Call
KeywordUpdateAsync(data)when async (Tasknot awaited), elseKeywordUpdate(data)and capture the returned document handle (BR-OBKS-001) - On failure: a WCF fault/timeout throws → exit code
5 - Sleep
OnBaseKeywordSync.onbaseclientsleepmillisecondswhen greater than zero (BR-OBKS-011) - 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
DocTypeGroupraisesKeyNotFoundException; a malformed mapping string raisesIndexOutOfRangeException. Both propagate toOnBaseKeywordSyncRunner.Execute's catch block → exit code5. - A WCF fault or timeout on either
KeywordUpdateorKeywordUpdateAsyncpropagates the same way. The async path'sTaskis never awaited or observed, so faults on that path are silently lost rather than reaching this catch block*.
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/OnBaseKeywordSyncClient.csOnBaseKeywordSync/Services/KeywordUpdater.csOnBaseKeywordSync/Contracts/KeywordUpdateExtensions.csOnBaseKeywordSync/Service References/OnBase/Reference.cs