Skip to content

Commit d1b1416

Browse files
Deployed 2befaf3 to 2.0 in riddl with MkDocs 1.6.1 and mike 2.2.0
1 parent 51cb88a commit d1b1416

20 files changed

Lines changed: 1280 additions & 954 deletions

File tree

riddl/2.0/concepts/saga/index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5592,6 +5592,20 @@ <h2 id="scope">Scope<a class="headerlink" href="#scope" title="Permanent link">&
55925592
<p><code>send</code>, <code>tell</code>, <code>yield</code> and <code>put</code> can fail, and so can each embedded
55935593
<code>call</code> or <code>get</code><code>let x = call F(get from input I)</code> counts as two.</p>
55945594
</div>
5595+
<div class="admonition warning">
5596+
<p class="admonition-title">A saga step may not <code>ask</code></p>
5597+
<p>An <a href="../../references/language-reference/#ask"><code>ask</code></a> anywhere in a step is
5598+
an <strong>Error</strong>, including one nested inside a larger value expression. A saga
5599+
must not depend on dynamic state, or the same inputs could yield different
5600+
transaction results at different times — and compensation would then be
5601+
reversing something other than what actually happened.</p>
5602+
<p>Acquire the value in a handler and pass it into the saga through its
5603+
<code>requires</code>, so the saga is closed over its inputs and the undo sees the
5604+
same data the do saw.</p>
5605+
<p>A step containing an <code>ask</code> is not also reported for the failure-point rule
5606+
above: an <code>ask</code> is itself a failure point, so every such step would trip
5607+
that rule too, and the advice to split the step would not help.</p>
5608+
</div>
55955609
<h2 id="a-saga-is-not-a-processor">A Saga Is Not a Processor<a class="headerlink" href="#a-saga-is-not-a-processor" title="Permanent link">&para;</a></h2>
55965610
<p>A Saga extends the <a href="../vital/">vital definition</a> base rather than
55975611
<a href="../processor/">Processor</a>, so it takes no <a href="../version/">version</a> and no

riddl/2.0/guides/authors/design/command-event-patterns/index.html

Lines changed: 52 additions & 22 deletions
Large diffs are not rendered by default.

riddl/2.0/guides/authors/design/ui-modeling/index.html

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5847,6 +5847,24 @@
58475847
<h1 id="user-interface-modeling">User Interface Modeling<a class="headerlink" href="#user-interface-modeling" title="Permanent link">&para;</a></h1>
58485848
<!-- riddl-prelude
58495849
result OrderDetails is { total: Currency(USD) }
5850+
// For the checkout handler fence: what it reads, tells and shows.
5851+
type PaymentInfo is String
5852+
type ReceiptData is String
5853+
record ChargeData is { note is String }
5854+
command SubmitPayment is { note is String }
5855+
command Charge is { note is String }
5856+
-->
5857+
5858+
<!-- riddl-domain-prelude
5859+
// The checkout fence declares its own application context, so what it
5860+
// reaches for must sit at domain level, not in the page prelude.
5861+
type PaymentInfo is String
5862+
type ReceiptData is String
5863+
command SubmitPayment is { note is String }
5864+
command Charge is { note is String }
5865+
context Billing is {
5866+
command BillingCharge is { note is String }
5867+
}
58505868
-->
58515869

58525870
<p>RIDDL provides two main constructs for modeling user interfaces:
@@ -6077,7 +6095,7 @@ <h3 id="users-interact-only-at-the-boundary">Users interact only at the boundary
60776095
<h2 id="reading-and-writing-ui-data">Reading and Writing UI Data<a class="headerlink" href="#reading-and-writing-ui-data" title="Permanent link">&para;</a></h2>
60786096
<p>An application handler reads an input's value and publishes to an output with
60796097
two statements added in RIDDL 2.0:</p>
6080-
<!-- riddl: skip reason="illustrative fragment; references vocabulary this page does not define" -->
6098+
<!-- riddl: in-domain -->
60816099
<div class="language-riddl highlight"><pre><span></span><code><span id="__span-10-1"><a id="__codelineno-10-1" name="__codelineno-10-1" href="#__codelineno-10-1"></a><span class="kd">application</span> <span class="kd">context</span> <span class="n">StoreFront</span> <span class="kp">is</span> <span class="p">{</span>
60826100
</span><span id="__span-10-2"><a id="__codelineno-10-2" name="__codelineno-10-2" href="#__codelineno-10-2"></a> <span class="kr">page</span> <span class="n">Checkout</span> <span class="kp">is</span> <span class="p">{</span>
60836101
</span><span id="__span-10-3"><a id="__codelineno-10-3" name="__codelineno-10-3" href="#__codelineno-10-3"></a> <span class="kr">form</span> <span class="n">PaymentDetails</span> <span class="kr">accepts</span> <span class="kd">type</span> <span class="n">PaymentInfo</span>
@@ -6108,7 +6126,7 @@ <h2 id="choosing-verbs">Choosing Verbs<a class="headerlink" href="#choosing-verb
61086126
<p>An input using <code>selects</code>, <code>chooses</code> or <code>picks</code> whose type is not an
61096127
Enumeration or Alternation draws a <strong>StyleWarning</strong>. A selection widget
61106128
should choose among options:</p>
6111-
<p><!-- riddl: skip reason="illustrative fragment; references vocabulary this page does not define" -->
6129+
<p><!-- riddl: skip reason="two depths in one fence -- a context-level type above group-level widgets -- and the second widget is a deliberate counter-example marked StyleWarning" -->
61126130
<div class="language-riddl highlight"><pre><span></span><code><span id="__span-11-1"><a id="__codelineno-11-1" name="__codelineno-11-1" href="#__codelineno-11-1"></a><span class="kd">type</span> <span class="n">Country</span> <span class="kp">is</span> <span class="kr">any</span> <span class="kp">of</span> <span class="p">{</span> <span class="n">US</span><span class="p">,</span> <span class="n">CA</span><span class="p">,</span> <span class="n">MX</span><span class="p">,</span> <span class="n">UK</span> <span class="p">}</span>
61136131
</span><span id="__span-11-2"><a id="__codelineno-11-2" name="__codelineno-11-2" href="#__codelineno-11-2"></a>
61146132
</span><span id="__span-11-3"><a id="__codelineno-11-3" name="__codelineno-11-3" href="#__codelineno-11-3"></a><span class="kr">picklist</span> <span class="n">CountryChooser</span> <span class="kr">selects</span> <span class="kd">type</span> <span class="n">Country</span> <span class="c1">// fine</span>
@@ -6125,7 +6143,7 @@ <h2 id="linking-to-designs">Linking to Designs<a class="headerlink" href="#linki
61256143
<p>Beyond <code>shown by</code>, a UI definition may carry a structured
61266144
<a href="../../../../concepts/metadata/#figma-references">figma reference</a> resolving to
61276145
one specific frame:</p>
6128-
<!-- riddl: skip reason="illustrative fragment; references vocabulary this page does not define" -->
6146+
<!-- riddl: in-app-context -->
61296147
<div class="language-riddl highlight"><pre><span></span><code><span id="__span-12-1"><a id="__codelineno-12-1" name="__codelineno-12-1" href="#__codelineno-12-1"></a><span class="kr">page</span> <span class="n">Checkout</span> <span class="kp">is</span> <span class="p">{</span> <span class="gr">???</span> <span class="p">}</span> <span class="kp">with</span> <span class="p">{</span>
61306148
</span><span id="__span-12-2"><a id="__codelineno-12-2" name="__codelineno-12-2" href="#__codelineno-12-2"></a> <span class="kr">figma</span> <span class="s2">&quot;aBcD1234&quot;</span> <span class="kr">node</span> <span class="s2">&quot;42:1337&quot;</span>
61316149
</span><span id="__span-12-3"><a id="__codelineno-12-3" name="__codelineno-12-3" href="#__codelineno-12-3"></a><span class="p">}</span>

0 commit comments

Comments
 (0)