I'm guessing here because I haven't played with rulegroups yet but...

Maybe what you are looking for is CommandFactory.newStartProcess(String processId,  Map<String,Object> parameters)

Chris

On 27/10/2010 21:27, John Peterson wrote:
Starting a process in Guvnor with ruleflow-group

Hi all,

Im doing some experimentation for a business problem and Ive hit a snag when it comes to Guvnor and Ruleflow-Groups.

Im using Guvnor 5.0.1 and Drools 5.0.1.

Ive uploaded a simple 4 step (plus start and end) ruleflow-group to Guvnor.  Ive added ruleflow-group attributes to all my rules, associating them to one of the four steps in my ruleflow.  My code for the execution is as follows:

cmds.add(CommandFactory.newInsertElements(recordsToRun));

try {

        KnowledgeBase kbase = readKnowledgeBase();

        StatelessKnowledgeSession ksession = kbase.newStatelessKnowledgeSession();

               

        ExecutionResults results = ksession.execute(CommandFactory.newBatchExecution(cmds));

} catch(Exception e) {

        System.out.println("Exception in readKnowledgeBase: " + e.getMessage());

}

Ive seen in other documentation that a startProcess is in order (e.g. ksession.startProcess(ruleflowname)), however, startProcess is not available for StatelessKnowledgeSession and the process is in Guvnor already, not locally.  Im guessing it is something simple Ive overlooked, but it isnt clicking for me at this point and my search online for answers hasnt found one yet.  Any suggestions would be appreciated.

Thanks!

_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users


No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1152 / Virus Database: 424/3220 - Release Date: 10/26/10