Scott,
A process is also "compiled" before it is executable. To load a process
constructed using the API, either:
* load it as any other process by transforming it to XML first using
the XmlRuleFlowProcessDumper
* compile the process before adding it to your rulebase, using
ProcessBuilder.buildProcess(..)
Kris
Quoting Scott Stevenson <scott.stevenson(a)datacert.com>:
I'm trying to execute the result of the Process API and running
into
problems most likely stemming from my ignorance. I'm creating a new
process following the sample code from section 3.1.3.2 of the User
Guide. My sample process consists of:
1. StartNode
2. ActionNode that prints Hello World
3. EndNode
What I don't understand is how to get my new process into a
KnowledgeBase and KnowledgeSession for execution. I've tried the
following (Drools 4 method, I believe) as well:
AbstractRuleBase ruleBase = (AbstractRuleBase)
RuleBaseFactory.newRuleBase();
ruleBase.addProcess(createProcess());
InternalWorkingMemory workingMemory = new ReteooWorkingMemory(1,
ruleBase);
workingMemory.startProcess("org.drools.sample.workflow.dynamic");
The result of the previous code is a RuntimeException (unable to
execute
Action). Inner exception is null pointer from inside the
ActionNodeInstance class. Where am going wrong in implementing the
Process API?
Thank you,
Scott Stevenson
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
Disclaimer:
http://www.kuleuven.be/cwis/email_disclaimer.htm