I have run into a curious issue when loading a process definition using 
JpdlXmlReader.

The Eclipse plugin generates a process definition where the XML (generally) 
looks like this:

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <process-definition
  |   xmlns="http://jbpm.org/3/jpdl";  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  |   xsi:schemaLocation="http://jbpm.org/3/jpdl 
http://jbpm.org/xsd/jpdl-3.0.xsd";
  |   name="AdministrativeData">
  |    <start-state name="start">
  |       <transition name="tr1" to="SaveXMLDocument"></transition>
  |    </start-state>
  |    <end-state name="end"></end-state>
  |    <node name="SaveXMLDocument">
  |       <transition name="tr1" to="end"></transition>
  |       <action class="workflow.action.SaveXMLDocument" 
config-type="bean"></action>
  |    </node>
  | </process-definition>
  | 

I get an exception when loading the above definition using this code:


  |   FileReader rdr = new FileReader(...);
  |   JpdlXmlReader jrdr = new JpdlXmlReader( rdr );
  |   ProcessDefinition pd = jrdr.getProcessDefinition();
  |   jbpms.getGraphSession().saveProcessDefinition(pd);
  | 

However, if I either remove the XML schema information

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <process-definition
  |   name="AdministrativeData">
  |    <start-state name="start">
  |       <transition name="tr1" to="SaveXMLDocument"></transition>
  |    </start-state>
  |    <end-state name="end"></end-state>
  |    <node name="SaveXMLDocument">
  |       <transition name="tr1" to="end"></transition>
  |       <action class="workflow.action.SaveXMLDocument" 
config-type="bean"></action>
  |    </node>
  | </process-definition>
  | 

-or-
adjust the action tag ordering within the node

  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <process-definition
  |   xmlns="http://jbpm.org/3/jpdl";  
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
  |   xsi:schemaLocation="http://jbpm.org/3/jpdl 
http://jbpm.org/xsd/jpdl-3.0.xsd";
  |   name="AdministrativeData">
  |    <start-state name="start">
  |       <transition name="tr1" to="SaveXMLDocument"></transition>
  |    </start-state>
  |    <end-state name="end"></end-state>
  |    <node name="SaveXMLDocument">
  |       <action class="workflow.action.SaveXMLDocument" 
config-type="bean"></action>
  |       <transition name="tr1" to="end"></transition>
  |    </node>
  | </process-definition>
  | 

the process definition is accepted without complaint.



View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3920109#3920109

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3920109


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to