Runtime public API¶
Use org.integratedmodelling.klab.api.services.RuntimeService for operations hosted on a particular Runtime. Begin in a user scope to discover a twin, then use its context scope for observation work.
| Operation | Scope and inputs | Result |
|---|---|---|
getContextInfo(user) |
The caller's user scope | Visible ContextInfo entries. Use each saved configuration to identify the host and twin. |
getConfiguration(id, user) |
A twin ID on this Runtime and the user | The saved DigitalTwin.Configuration when available. Confirm that the returned configuration identifies the expected twin. |
user.connect(configuration) |
An authorized user and the retrieved configuration | A ContextScope connected to the existing twin. For a new twin, create a context from a session on the chosen Runtime. |
submit(observation, scope) |
An observation and its context scope | A future for the resulting observation. The client observation builder offers a convenient entry point for setting geometry and submitting. |
getCommit(commitId, scope) |
A committed revision in this twin and an authorized context | The knowledge-graph commit for inspecting recorded work. |
In a client, select the particular subject using twin.within(subject). Resolve the full observable in that view, set the geometry and submit. Inspect the returned observation, including its notifications and whether it is empty, before consuming values. A timeout ends the caller's wait. Inspect the activity before resubmitting. Complete Java example ยท Runtime web API