Hello,

I have an SCXML workflow as given below. The conditions in the transitions
of "state2" are invalid because they have an invalid variable name
"trans-0". The application was made in the way that on each step forward, it
triggers an "action.next" event, followed by any external events inserted by
a custom ErrorReporter. This way, the workflow would move to the "_error"
state on every error. The problem is that on parsing of "state2" transition
conditions, it did not move to "_error" state. The following sequence
ocurred:

1) Workflow follows to "state2"
2) Current state is "state2", application triggers an "action.next" event
3) ErrorReported inserted two "action.error" events in the queue
4) However, the workflow is already in "_end" state (why?)
5) Application reads the external events queue, triggers two "action.error"
events, but nothing happens because workflow is in "_end" state

Why workflow ends up in "_end" state after parsing error?

*<scxml 
xmlns="**http://www.w3.org/2005/07/scxml*<http://www.w3.org/2005/07/scxml>
*"
       version="1.0"
       initialstate="_start">*
*    <state id="_start">
        <transition target="_processing" />
    </state>*
*    <state id="_processing">*
*        <initial>
            <transition target="_actions"/>
        </initial>*
*        <history id="_history" type="deep">*
*        </history>

        <state id="_actions" initial="state1">
            <state id="state1">
                <transition event="action.next" target="state2" />
            </state>*
*            <state id="state2">
                <transition event="action.next"
cond="trans-0.parameter.P_InitialBalance == 7" target="state3" />
                <transition event="action.next"
cond="trans-0.parameter.P_InitialBalance == 0" target="state4" />
            </state>*
*            <state id="state3">
                <transition event="action.next" target="state5" />
            </state>*
*            <state id="state4">
                <transition event="action.next" target="state5" />
            </state>*
*            <state id="state5">
            </state>
        </state>*
*        <transition event="action.next" target="_end" />*
*        <transition event="action.end" target="_end"/>*
*        <transition event="error.*" target="_error" />*
*    </state>*
*    <state id="_error">*
*        <onentry>
            <log expr="'In error'"/>
        </onentry>*
*        <transition event="action.next" target="_history"/>*
*        <transition event="action.end" target="_end"/>*
*    </state>*
*    <state id="_end" final="true">*
*    </state>*
*</scxml>*

Reply via email to