commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ouyang, Landon - ES/RDR -Gil" <>
Subject RE: [SCXML] getting set datats in the datamodel
Date Thu, 02 Apr 2009 21:07:33 GMT
I am trying to implement a history state.  It does work, returns to the calling state, however
it enters all the super states before getting to the calling state.  Which also calls entry
actions (when there are entry actions).  This is not the behavior I was expecting.  Can you
explain to me how to prevent this?

Below is the command line output from a small program that accepts trigger events and has
a listener attached to the states that outputs the current state.
[spalmisano@linuxserver src]$
Default scxml file is: HistoryTest.scxml
Enter path to over-ride (or enter to continue):
In State12
In State3
In State32
In TopState  (This is what I don't want!!)
In State1    (This is what I don't want!!)
In State12   (This is what I do want)

SCXML file used:

<?xml version="1.0"?>
<scxml xmlns="" xmlns:my="" xmlns:uml=""
xmlns:xmi="" version="1.0" initial="StateMachineInitial">
  <state id="TopState">
    <state id="State3">
      <state id="State31">
        <transition event="STATE31_TO_HISTORY" target="S1History"/>
      <state id="State32">
        <transition event="STATE32_TO_HISTORY" target="S1History"/>
      <initial id="State3Initial">
        <transition target="State31"/>
    <initial id="TopStateInitial">
      <transition target="State1"/>
    <state id="State1">
      <state id="State12">
        <transition event="TO_STATE32" target="State32"/>
        <transition event="TO_STATE11" target="State11"/>
      <state id="State11">
        <transition event="TO_STATE31" target="State31"/>
        <transition event="TO_STATE12" target="State12"/>
      <history id="S1History" type="deep">
        <transition target="State11"/>
      <initial id="S1Initial">
        <transition target="State11"/>
    <transition event="END" target="StateMachineFinal"/>
  <state id="StateMachineInitial">
    <transition target="TopState"/>
  <final id="StateMachineFinal"/>

Landon Ouyang
Senior Design Engineer
ITT Electronics Systems, Radar Systems - Gilfillan
7821 Orion Ave,
Van Nuys, CA 91406
(818) 901-2982

This e-mail and any files transmitted with it may be proprietary and are intended solely for
the use of the individual or entity to whom they are addressed. If you have received this
e-mail in error please notify the sender.
Please note that any views or opinions presented in this e-mail are solely those of the author
and do not necessarily represent those of ITT Corporation. The recipient should check this
e-mail and any attachments for the presence of viruses. ITT accepts no liability for any damage
caused by any virus transmitted by this e-mail.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message