Skip to content

Register data clients

Register the Guidewire data-client configuration, HTTP clients, and cache infrastructure in the DI container.

Field Value
Operation ID OP-SD-01
Trigger Host application calls AddDataClients during startup.
Inputs SystemType, systemName, optional configure action
Outputs Registered IDataClientConfiguration singleton, 7 API clients, cache infrastructure
Primary components ContainerBuilderExtensions.AddDataClients
Entry point Data/SAIF.Data/Configuration/ContainerBuilderExtensions.cs

Steps

  1. Create a DataClientConfiguration with the SystemType and systemName, then apply the optional configure action (SD-BR-001).
  2. Delegates: SAIF.Data.Guidewire / DataClientConfiguration.
  3. Register IDataClientConfiguration as a singleton.
  4. Register the 7 API clients per their configured lifetime scope (delegates to the Guidewire client classes).
  5. Register the cache: MemoryCacheProvider, and a Polly CacheAsync policy keyed by CachePolicyKey with MaxCacheDuration (SD-BR-002).
  6. Register the Options and MemoryCache infrastructure.

Process flow

The following diagram visualizes this operation's control flow.

flowchart TD
    Start(["Host application calls `AddDataClients` during startup."]) --> S1["`ContainerBuilderExtensions.AddDataClients`"]
    S1 --> S2{"Rules satisfied?"}
    S2 -->|Yes| EndOk([Result returned])
    S2 -->|No| EndErr([Exception / empty result])

Failure and edge-case behavior

  • Missing configuration action: defaults are used from DataClientConfiguration's constructor.

Sources

  • Data/SAIF.Data/Configuration/ContainerBuilderExtensions.cs