ActivityDataApiClient¶
Concrete client for the Guidewire ClaimCenter ActivityDataApi. It extends HttpClientBase, resolving its base URL from the cc.activitydata.api.url.v1 configuration key and Basic-auth credentials from cc.gwcreds, and implements IActivityDataApiClient by posting a serialized Activity payload to create a claim activity synchronously.
Purpose¶
- Creates activities against a claim in Guidewire ClaimCenter via a synchronous, blocking POST call.
- Serializes the
Activitypayload while omitting null properties, and translates any failure (transport exception or non-success status) into a thrownExceptiondescribing the failure.
Context¶
- Namespace:
SAIF.Data.Guidewire.Clients - Assembly/package:
SAIF.Data.Guidewire(packaged inSAIF.SAIFCode.Core)
Public members¶
| Member | Signature | Purpose |
|---|---|---|
| UrlKey | protected override string UrlKey => "cc.activitydata.api.url.v1" |
Environment configuration key used to resolve this client's base URL, per SDG-BR-001 |
| AuthKey | protected override string AuthKey => "cc.gwcreds" |
Environment secure-configuration key used to resolve Basic auth credentials, per SDG-BR-002 |
| ActivityDataApiClient(IEnvironmentService, HttpClient, SystemType, string) | [Obsolete] public ActivityDataApiClient(IEnvironmentService environmentService, HttpClient client, SystemType systemType, string baseUrlOverride = "") |
Obsolete constructor; forwards to HttpClientBase's obsolete overload, which builds a DataClientConfiguration with UseCache = false and ignores baseUrlOverride |
| ActivityDataApiClient(IEnvironmentService, HttpClient, IDataClientConfiguration, IReadOnlyPolicyRegistry\<string>) | public ActivityDataApiClient(IEnvironmentService environmentService, HttpClient client, IDataClientConfiguration configuration, IReadOnlyPolicyRegistry<string> policyRegistry) |
Primary constructor; delegates directly to HttpClientBase's primary constructor |
| CreateActivityRequest(long, Activity) | public void CreateActivityRequest(long claimId, Activity activity) |
Serializes activity with null values omitted per SDG-BR-010, then synchronously POSTs to activity/claim/{claimId}; throws per SDG-BR-011 on transport errors or non-success responses |
Inherited public members¶
| Member | Signature | Purpose | Origin |
|---|---|---|---|
| Client | protected HttpClient Client { get; } |
Returns the underlying HttpClient, initializing Basic auth on first access† |
SAIF.Data.Guidewire — HttpClientBase |
| GetAsync(string, bool, CancellationToken) | protected Task<string> GetAsync(string url, bool ensureSuccess = false, CancellationToken cancellationToken = default) |
Issues an uncached GET and returns the raw response body† | SAIF.Data.Guidewire — HttpClientBase |
| GetAsyncCached\<T>(string, bool, CancellationToken) | protected Task<T> GetAsyncCached<T>(string url, bool ensureSuccess = false, CancellationToken cancellationToken = default) |
Executes a cached GET through the configured Polly policy and deserializes the body as T† |
SAIF.Data.Guidewire — HttpClientBase |
| GetAsyncCached\<T>(string, string, bool, CancellationToken) | protected Task<T> GetAsyncCached<T>(string url, string body, bool ensureSuccess = false, CancellationToken cancellationToken = default) |
Executes a cached POST with a JSON body through the configured Polly policy and deserializes the response as T† |
SAIF.Data.Guidewire — HttpClientBase |
Behavioral notes¶
CreateActivityRequestblocks the calling thread viaGetAwaiter().GetResult()rather than awaiting asynchronously.- The obsolete constructor always disables caching for this client (
UseCache = false, perHttpClientBase's obsolete overload) and ignores anybaseUrlOverridevalue. - On a caught transport exception, the method wraps it in a new
Exceptionwith message"Unknown exception when calling ActivityDataApi. Message: {e.Message}", preserving the original asInnerException. - On a non-success HTTP response, the method reads the response content synchronously and throws an
Exceptionincluding the numeric status code and content (or a "No content returned" message if content is null).
Constraints and usage notes¶
CreateActivityRequestis synchronous and has no cancellation support; callers on async code paths should be aware it blocks.- Depends on
HttpClientBase(documented in this same doc set) for base-address resolution and authentication.
Note: Statements marked with † are derived from dependency library documentation via the Legends CLI. They describe inherited behavior from the indicated origin library and should be verified if the dependency version changes.
Sources¶
Data/SAIF.Data.Guidewire/Clients/ActivityDataApiClient.csData/SAIF.Data.Guidewire/Clients/HttpClientBase.cs