You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Sinisa Zec <si...@adcon.hr> on 2015/08/25 10:42:39 UTC

FSM sessions and sending messages

Dear all,

 

I have created two instances of FSM and I am keeping them in the HashMap. I
can distinguish sessions based on their SessionId:

this.currentSessionId =
(String)getEngine().getGlobalContext().get(SCXMLSystemContext.SESSIONID_KEY)
;

 

I am trying to *send* the message from one FSM session to another. 

                           <send id="sessionIsOutOfService"

                                 targetexpr="TargetSessionID"

 
type="http://www.w3.org/TR/scxml/#SCXMLEventProcessor" event="do.something"

                                 namelist="xmlcontent"/>

TargetSessionID is a Context variable which is successfuly evaluated by the
GroovyEvaluator to the #_scxml_sessionid, where sessionid is the id of
target session as got from the context (SCXMLSystemContext.SESSIONID_KEY).

 

The problem is that ioProcessor of the current session is not aware of the
next (target?!) session (checked with debugger). As I can see from the
sources, it is not possible to set the TargetSessionId as another session id
to the ioProcessor and ioProcessor is only aware of the current session.
Error message  is:

WARNING: <send>: Unavailable target -
#_scxml_ed432903-acbd-47a1-99f8-99f21458da7c

 

Is my understanding completely wrong? Thank you!

 

mit freundlichen Grüßen / with best regards / Lijepi pozdrav
Sinisa Zec 


___________________________________________________________

Adcon d.o.o.

Josipa Jurja Strossmayera 341 

31000 Osijek

Hrvatska – Croatia

fix: +385 31 638 136

mobile: +385 91 509 0903

 <http://www.adcon.hr/> www.adcon.hr

 

Sinisa Zec       <mailto:%3csinisa.zec@adcon.hr%3e> <si...@adcon.hr>

development

___________________________________________________________