[rules-users] How to execute a Process API result?

Scott Stevenson scott.stevenson at datacert.com
Mon Nov 2 14:47:06 EST 2009


I'm working with Drools 5.

 

From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Mauricio
Salatino
Sent: Monday, November 02, 2009 1:45 PM
To: Rules Users List
Subject: Re: [rules-users] How to execute a Process API result?

 

Are you working just with the Drools 4 version?
Or you can jump to the Drools 5 version?

On Mon, Nov 2, 2009 at 5:41 PM, Scott Stevenson
<scott.stevenson at datacert.com> wrote:

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 at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




-- 
- http://salaboy.wordpress.com
- http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20091102/e55960fe/attachment.html 


More information about the rules-users mailing list