SAIF.NetCore.Clients.UC4 operations and processes¶
This page is the operation catalog and cross-operation hub for this library. Each operation's detailed, step-by-step logic lives in its own page under operations/.
Operation catalog¶
| Operation | Intent | Trigger | Inputs | Outputs | Rules |
|---|---|---|---|---|---|
| Construct UC4 client | Validate that the environment can run UC4 scheduling and cache the base URL and route | DI container resolves IUC4Client, or a caller runs new UC4Client(env, http) |
IEnvironmentClient, IHttpJsonClient |
A constructed UC4Client with ServiceUrl, ScheduleJobEndpoint, ClientName populated and IsConfigured = false |
BR-UC4-01, BR-UC4-02, BR-UC4-04 |
| Schedule a UC4 job | Start a named UC4/Automic job | Consumer calls await client.ScheduleJob(appname, jobname) |
appname, jobname |
Task<IHttpRequestResult> |
BR-UC4-03, BR-UC4-06, BR-UC4-08, BR-UC4-09, BR-UC4-10 |
Process flow diagram¶
The following diagram visualizes the primary operational flow across both operations.
flowchart TD
Start([Caller resolves or constructs IUC4Client]) --> Construct[Construct UC4 client]
Construct --> CheckKeys{uc4coreapi:url and<br>uc4coreapi:schedulejobroute exist?}
CheckKeys -->|No| Abort([NotSupportedException])
CheckKeys -->|Yes| Ready(["Client ready, IsConfigured=false"])
Ready --> Schedule[Schedule a UC4 job]
Schedule --> FirstCall{IsConfigured == false?}
FirstCall -->|Yes| Init["Init: SetClientInfo"]
FirstCall -->|No| Post["POST empty JSON object {} to route+jobname"]
Init --> Post
Post --> Result([Return IHttpRequestResult to caller])
Failure and edge-case behavior¶
- A missing
uc4coreapi:urloruc4coreapi:schedulejobroutekey aborts construction withNotSupportedException; the client cannot be resolved from DI in that environment (BR-UC4-01). - An empty (but present)
uc4coreapi:urlpasses construction and fails only at the firstScheduleJobcall, withUriFormatException(BR-UC4-02). - An externally-set
IsConfigured = truebefore the first call skipsInit, which can surface later asClientNotInitializedExceptionfrom the underlyingHttpJsonClient(BR-UC4-07). - A non-success HTTP response (including after automatic retries on 401/502/503) is returned to the caller as
IHttpRequestResult.IsSuccessful = false, never thrown (BR-UC4-09).
Related documentation¶
Sources¶
src/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4.csprojsrc/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/Constants.cssrc/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/IUC4Client.cssrc/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/SAIF.NetCore.Clients.UC4/Services/UC4Client.cs