Hello
Is there anybody that can help me with my problem described below?

best regards
//Linda

On Mon, Apr 20, 2009 at 2:05 PM, Linda Erlenhov <linda.erlen...@gmail.com>wrote:

> 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
>
>
>

Reply via email to