Transition after all <parallel> events are done

12 views
Skip to first unread message

Jeff Chimene

unread,
Nov 8, 2014, 6:01:44 PM11/8/14
to scio...@googlegroups.com
Hi,

I'm attempting to execute two AJAX requests in parallel. However, the state transition shouldn't occur until both are complete.
The current situation is that the AJAX calls are serial; they can run in parallel. One call will take slightly longer than the other.

What's the best way in SCION to create a gate that won't open until all parallel events are complete?

The specific example is "Add a product to an invoice" & "Create a credit card". These events can run in parallel. However, the "Charge card" call cannot run until these two events are complete.

TIA,
jec

Jeff Chimene

unread,
Nov 8, 2014, 6:12:38 PM11/8/14
to scio...@googlegroups.com

Also, there is a transition that handles the case "no product selected".

IOW, I have
<state id="s0">
 <transition target="s1">
</state>

<state id="s1">
  <parallel>
     <state>
        <if cond="no product">
          <send event="no product" target="s0">
        </if>
     </state>
     <state>
        <if cond="no product">
          <send event="no product" target="s0">
        </if>
     </state>
  </parallel>
  <transition target="s2">
  <transition event="no product" target="s0">
</state>

<state id="s2">


TIA,
jec
Reply all
Reply to author
Forward
0 new messages