Sorry,
I removed a few lines from the code.
Let me re-paste the snippet, as is in my code:
exec = new SCXMLExecutor(evaluator, ed, trc);
exec.addListener(doc, trc);
exec.setSuperStep(true);
exec.setRootContext(rootCtx);
exec.setStateMachine(doc);
Data scenarioData = new Data();
scenarioData.setName(SCENARIO_ID_PARAM);
scenarioData.setExpr("'"+id+"'");
doc.getDatamodel().addData(scenarioData);
If I understand you correctly, the line exec.setStateMachine(doc); does the
trick you are looking for!
By the way, you can look at the code from SVN. I couldn't find much
documentation, the code itself is the best guide.
+Fasih
----- Original Message -----
From: "Nestor Urquiza" <[EMAIL PROTECTED]>
To: "Jakarta Commons Users List" <[email protected]>
Sent: Wednesday, April 19, 2006 5:41 PM
Subject: Re: [scxml] SCXMLExecutor#getSCInstance ... any chance to make it
public?
Hey thanks for replying,
I see your code is adding data to data model which is
related to the SCXML object. However I think I do not
understand how this map to the specific Executor. In
other words I am trying to set within my specific code
variables that are in the root context which in turns
is defined in a per Executor basis and not in a per
SCXML instance.
Could you please be more explicit or point me to a
place in the documentation where this is explained?
From [1] I see that variables to be used within the
scxml file are supposed to be handled thru a Context
instance.
Thanks a lot,
Nestor
[1]http://jakarta.apache.org/commons/sandbox/scxml/api-notes/side-effect-el.html
--- Fasih <[EMAIL PROTECTED]> wrote:
Yup,
I have done exactly the same thing
exec = new SCXMLExecutor(evaluator, ed, trc);
Data scenarioData = new Data();
scenarioData.setName(SCENARIO_ID_PARAM);
scenarioData.setExpr("'"+id+"'");
doc.getDatamodel().addData(scenarioData);
I guess that should answer your question.
+Fasih
----- Original Message -----
From: "Nestor Urquiza" <[EMAIL PROTECTED]>
To: "Jakarta Commons Users List"
<[email protected]>
Sent: Wednesday, April 19, 2006 5:03 PM
Subject: [scxml] SCXMLExecutor#getSCInstance ... any
chance to make it
public?
> Hello,
> I am planning to store just the SCXMLExecutor in a
per
> session basis. Then of course I need to have
access
> from my "bridge" to SCInstance#getRootContext to
> obtain the context needed to set variables from my
> specific-code.
> The problem is right now the
> SCXMLExecutor#getSCInstance has package access
> Can we make it public? Or there is a better way to
> accomplish what I am trying to do???
> Thanks a lot!
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam
protection around
> http://mail.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]
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.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]