You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p><code>send</code>, <code>tell</code>, <code>yield</code> and <code>put</code> can fail, and so can each embedded
5593
5593
<code>call</code> or <code>get</code> — <code>let x = call F(get from input I)</code> counts as two.</p>
5594
5594
</div>
5595
+
<divclass="admonition warning">
5596
+
<pclass="admonition-title">A saga step may not <code>ask</code></p>
5597
+
<p>An <ahref="../../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>
5595
5609
<h2id="a-saga-is-not-a-processor">A Saga Is Not a Processor<aclass="headerlink" href="#a-saga-is-not-a-processor" title="Permanent link">¶</a></h2>
5596
5610
<p>A Saga extends the <ahref="../vital/">vital definition</a> base rather than
5597
5611
<ahref="../processor/">Processor</a>, so it takes no <ahref="../version/">version</a> and no
<p>An input using <code>selects</code>, <code>chooses</code> or <code>picks</code> whose type is not an
6109
6127
Enumeration or Alternation draws a <strong>StyleWarning</strong>. A selection widget
6110
6128
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" -->
0 commit comments