commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Linda Erlenhov <linda.erlen...@gmail.com>
Subject Re: [SCXML] getting set datats in the datamodel
Date Mon, 20 Apr 2009 12:05:10 GMT
Hello
I think I´ve done some mixing between two things that doesn´t work together
as I hoped it would.

I have this Datamodel, the scxml document starts like this:
------------------------
<scxml version="1.0" initialstate="INIT" xmlns:cs="
http://commons.apache.org/scxml" xmlns="http://www.w3.org/2005/07/scxml">

<datamodel>
<data name="DynamicData">
<NumDat xmlns="" id="1" type="Integer">0</NumDat>
</data>
<data name="Indication1" expr="false"/>
</datamodel>

<snip/>-------------------------

I assign the "Indication1" later on:

---------------
<state id="StateC">
<onentry>
<log label="Renegade" expr="'Entering state: StateC'"/>
<assign name="Indication1" expr="true"/>
</onentry>

<snip/>-------------------------------

And the "DynamicData" also later:
---------------
<state id="StateB">
<onentry>
<log label="Renegade" expr="'Entering state: StateB'"/>
<log label="Renegade" expr="Data(DynamicData,'NumDat')"/>
<assign location="Data(DynamicData,'NumDat')"
expr="Data(DynamicData,'NumDat')+1"/>
<log label="Renegade" expr="Data(DynamicData,'NumDat')"/>
</onentry>

<snip/>-------------------------------

I implemented a custom context with a notification functionality in the
"set" function (observer observed pattern) but the problem now is that the
only time the "set" function in the context is used is when indications are
set. Not when the DynamicData is set. I know that the SCXML works and that
the expressions evaluate properly because of the log:labels, my guess is
that it´s something with the Data() function that makes these expressions do
something different. What? Where is the "set" for the DynamicData located?
How do I notify when my DynamicData has changed?


Best regards
Linda

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message