commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar (JIRA)" <j...@apache.org>
Subject [jira] Updated: (SCXML-74) <data> uses "name" attribute instead of "ID"
Date Sat, 05 Jul 2008 00:03:35 GMT

     [ https://issues.apache.org/jira/browse/SCXML-74?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Rahul Akolkar updated SCXML-74:
-------------------------------

         Fix Version/s: 0.9
    Remaining Estimate:     (was: 2h)
     Original Estimate:     (was: 2h)

Thanks for pointing this out, I've set the fix version to be v0.9 (the next anticipated release).
We have not updated to the latest WD, but we will need to go through the changes with a fine-toothed
comb at some point (volunteers welcome :-).

I won't be able to get to this for another week, but the fix should be fairly straightforward
if anyone wants to take a stab at it (given that you're correctly identified the source code
that needs updating).


> <data> uses "name" attribute instead of "ID"
> --------------------------------------------
>
>                 Key: SCXML-74
>                 URL: https://issues.apache.org/jira/browse/SCXML-74
>             Project: Commons SCXML
>          Issue Type: Bug
>    Affects Versions: 0.8
>            Reporter: Edzard Hoefig
>            Priority: Minor
>             Fix For: 0.9
>
>
> In the recent SCXML WD (WD-scxml-20080516), the <data> element is defined to use
an "ID" attribute. Previously it had been "name" (WD-scxml-20070221). This change is not reflected
in the source (see class org.apache.commons.scxml.model.Data) and leads to a NullPointerException
when trying to use it.
> Example: 
> This SCXML document...
> <?xml version="1.0" encoding="UTF-8"?>
> <scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initialstate="InitialState"
>
> 	<datamodel>
> 		<data id="RequestForBerlin">
> 			<GetWeather xmlns="http://www.webserviceX.NET">
> 			  <CityName>Berlin</CityName>
> 			  <CountryName>Germany</CountryName>
> 			</GetWeather>				
> 		</data>
> 	</datamodel>
> 	<state id="InitialState">
> 		<transition target="GetWeatherState"/>
> 	</state>
> 	<state id="GetWeatherState">
> 		<invoke src="WeatherService#GetWeather" targettype="x-soap">
> 			<param name="RequestForBerlin"/>
> 		</invoke>
> 	</state>
> </scxml>
> ... leads to ...
> ...  java.lang.NullPointerException
> 	at org.apache.commons.scxml.env.SimpleContext.setLocal(SimpleContext.java:164)
> 	at org.apache.commons.scxml.SCXMLHelper.cloneDatamodel(SCXMLHelper.java:466)
> 	at org.apache.commons.scxml.SCXMLExecutor.reset(SCXMLExecutor.java:223)
> 	at org.apache.commons.scxml.SCXMLExecutor.go(SCXMLExecutor.java:351)
> [...]
> ... because the name field of a Data class instance is null.
> when changing the <data id="RequestForBerlin"> line to <data name="RequestForBerlin">
the problem dissapears.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message