You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jon Brule <tr...@gmail.com> on 2006/07/02 03:22:01 UTC
Re: [SCXML] Datamodel / Assign expression error
>> Good evening,
>>
>> I am using an SCXML state machine to model the life of a user profile
>> bean. To this end, I am attempting to use a root-level data model to
>> indicate which properties are mutable and when during the life cycle
>> of the user profile. The preliminary SCXML is as follows:
>>
><snip/>
>>
>> <onentry>
>> <assign location="Data(userprof,'UserProfile/UserID')" expr="N"/>
>> </onentry>
>>
><snap/>
>
>The location attribute is an expression, and hence, when using JSP 2.0
>EL should be wrapped in ${...}
>
>See this test case for various <assign> usages when the SCXML document
>uses EL (long URL, may get fragmented):
>
>http://svn.apache.org/repos/asf/jakarta/commons/proper/scxml/trunk/src/test/java/org/apache/commons/scxml/env/jsp/datamodel-01.xml
>
>-Rahul
Rahul,
Thanks for the quick answer. I tried to wrap the expression as shown below:
<onentry>
<assign location="${Data(userprof,'UserProfile/UserID')}" expr="N"/>
</onentry>
But I got the following error messages:
2006-07-01 21:02:44,625 [main] WARN org.apache.commons.scxml.Builtin
- Data(): No nodes matching the XPath expression "UserProfile/UserID",
returning null
2006-07-01 21:02:44,625 [main] ERROR scxml.app.log - <assign>:
location does not point to a <data> node
The datamodel I am trying to access is as follows:
<datamodel>
<data name="userprof">
<UserProfile>
<UserID/>
<Person>
<FirstName/>
<MiddleName/>
<LastName/>
</Person>
</UserProfile>
</data>
</datamodel>
Is there a problem with the <UserID/> tag being an empty tag? Is there
a problem with my accessing the datamodel from within an <onentry/>
tag?
Thoughts?
--
Jon Brule
tricolorcat-at-gmail.com
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org