Thanks Lawrence, 

Actually the last of your statements was the logic path to follow and I am just 
inserting the previous state id within the root context to test it later in my 
transitions. To be honest for my specific domain (SCXML as WEB Controller in an 
MVC architecture) seems to be fair enough.

Regards,

-Nestor

----- Original Message ----
From: Yau Lawrence <[EMAIL PROTECTED]>
To: Jakarta Commons Users List <[email protected]>
Sent: Tuesday, May 22, 2007 1:27:34 PM
Subject: RE: [SCXML] obtaining the previous state from the current onentry

Nestor,
A few thoughts:

* Can this be elegantly solved by using the history pseudo state? :)

* If there aren't *many* potential previous states, you could create substates 
within the current state which represent each of the previous states, then move 
your transitions to the respective substates.  You wouldn't need the conditions 
anymore.

Maybe the easiest for you:
* Each of your previous states could place their state id in the datamodel 
during onExit.  Then compare using that datamodel value as "previousState" in 
your example.

Hope this helps,
Lawrence


-----Original Message-----
From: Nestor Urquiza [mailto:[EMAIL PROTECTED]
Sent: 22 May 2007 18:54
To: Jakarta Commons Users List
Subject: [SCXML] obtaining the previous state from the current onentry

Hi guys,

I am facing a reuse problem that I could resolve if I can get the previous 
state. basically while executing logic within the current state onentry section 
I need to go based on the previous state to a next one.

<n:transition cond="previousState eq 'IDLE'" target="IDLE"/> <n:transition 
cond="previousState eq 'PS'" target="US"/>

Thanks,

-Nestor






____________________________________________________________________________________Pinpoint
 customers who are looking for what you sell.
http://searchmarketing.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






      
____________________________________________________________________________________
Park yourself in front of a world of choices in alternative vehicles. Visit the 
Yahoo! Auto Green Center.
http://autos.yahoo.com/green_center/ 

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to