Add state diagram form and representation contract parity
This commit is contained in:
+32
-2
@@ -987,8 +987,9 @@ reinterpret old mixed lifelines as a strict new viewpoint.</p>
|
||||
<p>or:</p>
|
||||
<pre class="literal-block">{"format":"source-project", "source_project":{"entry":"rescue.arcadia", "files":{"rescue.arcadia":"arcadia 3; project rescue \"Rescue\" {}"}}}</pre>
|
||||
<p>A well-formed validation request returns 200 with <span class="docutils literal">valid</span> and <span class="docutils literal">issues</span> even
|
||||
if its candidate is invalid. A malformed request envelope or JSON model record
|
||||
is a 400. Source diagnostics include one-based line and column according to the
|
||||
if its candidate is invalid, including a model record that fails typed decoding.
|
||||
Malformed request JSON or an invalid format/payload envelope is a 400.
|
||||
Source diagnostics include one-based line and column according to the
|
||||
shared language parser. Candidate validation does not replace current state.
|
||||
Source-project validation locations refer to the submitted bytes before UUID
|
||||
insertion. Successful source-project PUT diagnostics refer to the returned
|
||||
@@ -1018,6 +1019,35 @@ introduce a completion transition. Invalid typed references reject the whole
|
||||
candidate and preserve revision/ETag. All writes retain the same conditional
|
||||
commit and disk persistence contract as other semantic records.</p>
|
||||
</section>
|
||||
<section id="state-diagram-representation">
|
||||
<h2>State diagram representation</h2>
|
||||
<p><span class="docutils literal">Diagram.projection</span> keeps the existing string values <span class="docutils literal">Overview</span>,
|
||||
<span class="docutils literal">Decomposition</span>, <span class="docutils literal">Allocation</span>, <span class="docutils literal">Traceability</span>, <span class="docutils literal">FunctionalDataflow</span> and
|
||||
<span class="docutils literal">Capabilities</span>. A dedicated state view instead uses the required payload:</p>
|
||||
<pre class="literal-block">{"StateMachine":{"machine":"11111111-1111-4111-8111-111111111111"}}</pre>
|
||||
<p>The UUID MUST identify an existing StateMachine in the diagram's layer.
|
||||
Only that machine, its Regions and its state vertices may be placed, including
|
||||
nested members. Empty and partial views are valid. No machine, Region, vertex
|
||||
or placement is synthesized by accepting or reading a diagram. Source uses
|
||||
<span class="docutils literal">projection { StateMachine { machine @modes; }; };</span> with the same reference.</p>
|
||||
<p>Use the ordinary <span class="docutils literal">CreateDiagram</span> or <span class="docutils literal">EditDiagram</span> transaction commands,
|
||||
JSON model import/replacement, or source/source-project writes. A bare
|
||||
<span class="docutils literal">"StateMachine"</span>, missing or null <span class="docutils literal">machine</span>, malformed UUID, or additional
|
||||
payload field is malformed JSON model data (400). A missing, wrong-kind or
|
||||
cross-layer machine produces the semantic issue <span class="docutils literal">state_diagram_context</span>;
|
||||
an incompatible placement produces <span class="docutils literal">state_diagram_member</span>. These reject
|
||||
writes with 422. Transaction rejections use the <span class="docutils literal">command_rejected</span> problem
|
||||
code and include the first core failure in <span class="docutils literal">detail</span>; candidate validation
|
||||
provides the structured <span class="docutils literal">issues</span> collection.
|
||||
Source syntax errors use the source rejection response (422) with locations.
|
||||
The validation endpoint returns 200 with <span class="docutils literal">valid:false</span> for a well-formed
|
||||
invalid candidate, as described above.</p>
|
||||
<p>When changing a diagram's machine or selecting StateMachine for an existing
|
||||
diagram, remove or relocate incompatible placements in the same transaction.
|
||||
Other projections continue to preserve hidden placements. Rejected writes
|
||||
retain the accepted model, source bundle, revision and ETag. Reading a state
|
||||
view has no semantic or persistence side effects.</p>
|
||||
</section>
|
||||
<section id="cross-layer-transitions">
|
||||
<h2>Cross-layer transitions</h2>
|
||||
<p>Preview accepts the shared <span class="docutils literal">TransitionRequest</span> record, including direction
|
||||
|
||||
Reference in New Issue
Block a user