[ 
http://issues.apache.org/jira/browse/SCXML-15?page=comments#action_12426488 ] 
            
Sitthichai Rernglertpricha commented on SCXML-15:
-------------------------------------------------

Thanks.
I am trying to host the SCXMLExecutor on a web container. While I am processing 
the HTTPRequest, I wanted only to populate the current Context with the HTTP 
request attributes, so that the EL expression or JEXL expression can process 
them as if they are local variables within the state. Hence, I raised a request 
for the SCXMLExecutor to expose the current Context object for updating purpose.

However, I just realized that I can create a Map object containing the HTTP 
request attributes and passed the Map as the payload object of the event that 
is triggered to the SCXMLExecutor. In this manner, the EL or JEXL expression 
can access these request attributes via "_eventdata.<name>". This approach 
resolved my problem, without "polluting" the current Context with unnecessary 
attributes.


> User of SCXMLExecutor does not have access to the current context data
> ----------------------------------------------------------------------
>
>                 Key: SCXML-15
>                 URL: http://issues.apache.org/jira/browse/SCXML-15
>             Project: Commons SCXML
>          Issue Type: Improvement
>         Environment: Windows, JDK 1.4.2
>            Reporter: Sitthichai Rernglertpricha
>         Assigned To: Rahul Akolkar
>            Priority: Minor
>             Fix For: 0.6
>
>
> Currently, SCXMLExecutor does not provide method for client to get local 
> variables associated with the Context of the current state. 
> All created Context are maintained in the SCInstance object within the 
> SCXMLExecutor class, and currently the getSCInstance() of SCXMLExecutor does 
> not have any protected or public qualifier. Hence getSCInstance() cannot only 
> be accessed by SCXMLExecutor or classes within the org.apache.commons.scxml 
> package. Can we change getSCInstance() method to be protected or public ? 
> This allows the client to call getSCInstance().getContext() to return the 
> Context associated with the current state or create a child class of 
> SCXMLExecutor that return variables associated with the current context.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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

Reply via email to