kie - How to remove default focus to the MAIN agenda, in Drools? -


i'm using drools 6.2.0

i want group rules in 3 groups (first, main, last), , execute them in order:

  • first
  • main
  • last

to this, i'm using agenda-group "first" , agenda-group "last" in necessary rules. other rules, default belongs main agenda.

i'm using code specify order:

private void configureagendas() {     agenda agenda = session.getagenda();      agenda.getagendagroup("last").setfocus();     agenda.getagendagroup("main").setfocus();     agenda.getagendagroup("first").setfocus(); } 

my problem main agenda executed @ end. so, i'm having main agenda executed twice:

  • first
  • main
  • last
  • main (executed again. want skip last execution)

how can achive this?

if cannot disable auto-execution of main agenda, how can create rule last rule executed?

note: tried salience integer.min_value, still have rules of main agenda being executed after one.

if need control rule execution in way should avoid default group altogether , place of rule in 1 of "one", "two", "three".

note rule attribute outside rule ... end valid following rule until cancelled or changed, there's no need set rule group per rule.

(it strange there still main rules firing after after main , last exhausted. wouldn't scenario.)

edit: 1 other option add 1 rule in last lowermost priority change focus first. may need 1 "rewind" last rule in last fires again @ end of next round.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -