Does anyone know if there is a way of specifying that the
Guvnor 5.0M4 should migrate ruleflows from version 4.0 to 5.0 when
importing a version 4.0 repository into the Guvnor, or is this
bug/oversight in the Guvnor?
I'm trying to import a drools 4.0.7 repository into Guvnor
5.0M4 – the repository was originally exported out of a drools 4.0.7
BRMS (i.e. in XML format). However, when I try and build a package
containing a ruleflow in the imported repository it fails, but the same
repository builds under the drools 4.0.7 BRMS. Packages without
ruleflows build okay, so it looks as if the failure has to do with the
ruleflows in packages.
I know that drools 4 ruleflows are not compatible with drools
5 ruleflows, and that there's a drools property that allows the
compiler to automatically migrate ruleflows from 4.0 to 5.0. I had
assumed the Guvnor applies this migration as I see the following in the
log when I import the repository, but a quick look at code in the
drools trunk suggests that this migration simply changes version
numbers in the repository, but does not migrate the ruleflows:
17:27:59,931 INFO [STDOUT] AUTO MIGRATION: Performing
drools.package migration.
17:28:00,369 INFO [STDOUT] AUTO MIGRATION: drools.package
migration completed.
The reason I suspect it's something to do with ruleflows is
that when I try and do anything with the ruleflow assets in the Guvnor,
I see the following error:
17:30:40,634 INFO [STDOUT] (null: 1, 59): cvc-elt.1: Cannot
find the declaratio
n of element
'org.drools.ruleflow.core.impl.RuleFlowProcessImpl'.
When I try and build a package with a ruleflow I see the
following error in the log:
Caused by: java.lang.NullPointerException
at
org.drools.compiler.ProcessBuilder.buildProcess(ProcessBuilder.java:9
9)
at
org.drools.compiler.ProcessBuilder.addProcessFromFile(ProcessBuilder.
java:228)
at
org.drools.compiler.PackageBuilder.addProcessFromXml(PackageBuilder.j
ava:435)
at
org.drools.compiler.PackageBuilder.addRuleFlow(PackageBuilder.java:40
7)
at
org.drools.guvnor.server.contenthandler.RuleFlowHandler.compile(RuleF
lowHandler.java:108)
at
org.drools.guvnor.server.builder.ContentPackageAssembler.buildAsset(C
ontentPackageAssembler.java:167)
at
org.drools.guvnor.server.builder.ContentPackageAssembler.buildPackage
(ContentPackageAssembler.java:154)
at
org.drools.guvnor.server.builder.ContentPackageAssembler.<init>(Conte
ntPackageAssembler.java:103)
at
org.drools.guvnor.server.builder.ContentPackageAssembler.<init>(Conte
ntPackageAssembler.java:116)
at
org.drools.guvnor.server.ServiceImplementation.buildPackage(ServiceIm
plementation.java:1370)
at
org.drools.guvnor.server.ServiceImplementation.buildPackage(ServiceIm
plementation.java:1354)
Regards
Shahad