Hi,
Yes, the NPE you are getting is because the package as defined in the
process is not the same as the package in Guvnor. You can set the
package of your process either by changing the XML file as you
described, but there is also a package name property on the process
(just click the background of your process and check the properties
view). You should be able to build your process on Guvnor if package
names match.
Kris
melc wrote:
Finally I think I've got something after debugging the source.
Well at least
the compilation issues as well as viewing and running the process from
gwt-console have been resolved for now.
I'm not sure if it is something that needs to be corrected or whether i've
missed it somewhere. But the story is that the NullPointerException occuring
at org.drools.compiler.ProcessBuilder.buildProcess(ProcessBuilder.java:121)
and giving in guvnor the following error,
unable to parse xml : Exception class java.lang.NullPointerException : null
was because the Process object that was built by the
org.drools.bpmn2.xml.ProcessHandler had a packageName equal to
"org.drools.bpmn2", which is the default value given to the packageName
attribute if it is null (i.e. not found in the xml bpmn process definition)
.
However, if the added process is opened in guvnor the information on the
right says that the packageName is equal to defaultPackage (i.e. if it has
been added to defaultPackage) as someone would expect, but this is not
actually the case on compile time....if the xml has not been edited
appropriately.
So the resolution to this is to add an attribute packageName to the process
tag within the bpmn xml file, before adding it to guvnor. Actually, the
exact attribute name has to be tns:packageName="the name of the guvnor
package that this bpmn will be added to".
The question is whether this is actually true.... or whether i'm missing
something and don't really need to edit the xml of each process created in
eclipse before adding it in guvnor.
I appreciate any help, thank you for your time.