Reputation: 1752
Below is the screen of jboss guvnor 5.5 building and deploying a package.
what is the equivalent process of creating snapshot for deployment in guvnor 6.0 cr3?
In other words I am looking on deploying rules written using guvnor 6.0 and execute it from a java application.
public static KnowledgeBase readKnowledgeBase() throws Exception {
KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent( "SomeAgent" );
kagent.applyChangeSet( ResourceFactory.newClassPathResource( "changeset.xml" ) );
KnowledgeBase kbase = kagent.getKnowledgeBase();
kagent.dispose();
return kbase;
}
where the changeset.xml holded the snapshot url of the package.
I understand the top level architectural changes in the guvnor 6.0 or rather drools workbench.
But I could'nt find a way to deploy rules and execute from an java application.
Upvotes: 0
Views: 505
Reputation: 6322
As far as I know, Guvnor will create a maven artifact containing the package assets. You then use that artifact to instantiate a kbase/ksession. BTW, forget about KnowledgeAgent. It is no longer part of drools distribution (since drools 6).
Hope it helps,
Upvotes: 1