Expand description
Chart versions, the chart registry, vt: extension lowering and migrations.
A chart version is the content address of the chart as written (vertep_rdf::chart_version
over the IR before lowering), so the same chart loaded from SCXML or YAML has one version.
The registry keeps every version by IRI, the versions of each chart type in registration
order (the last is the latest) and the declared migrations.
Before compiling, lower rewrites the runtime’s vt: extensions into plain SCXML:
<vt:request target=".." event=".." timeout="5s" reply="s1" ontimeout="s2"/>in a state: a<send>of typevocab::REQUEST_SEND_TYPEon entry, a generated waiting substate, a transition onvt:replyand one onerror.timeout. The runtime assigns the correlation id and journals the timeout as a durable timer.<vt:reminder name=".." period=".." event=".."/>(orcancel="true") in executable content: a<send>of typevocab::REMINDER_SEND_TYPE.<vt:migrate to=".." migration=".."/>in executable content: a<send>of typevocab::MIGRATE_SEND_TYPE, handled as a self-migration request.
vt:defer (on states), vt:unhandled (on <scxml>) and vt:restart* (on <invoke>) are
read from the IR without rewriting it.
Structs§
- Chart
Info - A registered chart version: the IR as written, the compiled lowered chart and what the
runtime reads from its
vt:extensions. - Chart
Registry - Every chart version an actor may run, keyed by version IRI, the versions of each chart type in registration order, and the declared migrations.
- Lower
Error - Why a chart’s
vt:extensions could not be lowered. - Migration
- A declared migration between two chart versions: a configuration mapping and a datamodel
transform. Configurations not listed explicitly map state by state through
Migration::states, and a state not listed there maps to the state with the same id in the new version, if it has one (the derived identity mapping). - Restart
Policy - A
vt:restartsupervision policy of an<invoke>.
Enums§
- Register
Error - Why a chart could not be registered.
- Restart
Mode - When an invoked actor is restarted after it fails.
- Unhandled
Policy - What to do with an external event that enables no transition and is not deferred.
Functions§
- element_
attributes - The attributes of the start tag of an extension element’s serialized XML.
- find_
state - The state with identifier
id. - lower
- Rewrites the runtime’s
vt:extensions into plain SCXML (see the module docs), returning the lowered chart and the send types it introduced. - migrated_
session - The session under
tofor active state idsids, carrying the counters ofold: compound states without an active child get their default entry, history and invocations start empty. - parse_
duration - Parses a duration: a number followed by
ms,s,min,hord, or a bare number of milliseconds. - reachable_
configurations - The configurations reachable in
chart, ignoring guards (an over-approximation): every legal configuration of its state structure, as sets of state ids. - request_
type - The send type of a
vt:requestwith an optional timeout. - split_
type - The parameters of a
vt:send type:base;k=v;k2=v2gives(base, {k: v, k2: v2}). - static_
invoke_ sources - Every
<invoke>with a staticsrc, as (state id, src). - unmapped_
configurations - The configurations of
fromthatmleaves unmapped intoto; empty when the migration passes the compatibility check.
Type Aliases§
- Transform
- A datamodel transform of a migration.