Add dual call modes for external systems: synchronous Call() and cached CachedCall()

Scripts now choose per invocation whether an external system call is synchronous
(all failures return to script) or cached (transient failures go to store-and-forward).
Mirrors the existing Database.Connection/CachedWrite pattern. Updated ESG, Site
Runtime script API, high-level requirements, and design doc.
This commit is contained in:
Joseph Doherty
2026-03-16 08:00:20 -04:00
parent 5fff1712a8
commit 1ef316f32c
4 changed files with 35 additions and 12 deletions

View File

@@ -205,7 +205,8 @@ Available to all Script Execution Actors and Alarm Execution Actors:
- `Scripts.CallShared("scriptName", parameters)` — Execute shared script code inline (direct method invocation). The call includes the current recursion depth.
### External Systems
- Access to predefined external system API methods (see External System Gateway component).
- `ExternalSystem.Call("systemName", "methodName", params)` — Synchronous HTTP call. Blocks until response or timeout. All failures return to script. Use when the script needs the result.
- `ExternalSystem.CachedCall("systemName", "methodName", params)` — Fire-and-forget with store-and-forward on transient failure. Use for outbound data pushes where deferred delivery is acceptable.
### Notifications
- `Notify.To("listName").Send("subject", "message")` — Send an email notification via a named notification list.