Tabnine Logo
RuleNameEqualsAgendaFilter
Code IndexAdd Tabnine to your IDE (free)

How to use
RuleNameEqualsAgendaFilter
in
org.drools.core.base

Best Java code snippets using org.drools.core.base.RuleNameEqualsAgendaFilter (Showing top 4 results out of 315)

origin: org.drools/drools-compiler

@Test
public void testAgendaFilterRuleNameEquals() {
  testAgendaFilter(new RuleNameEqualsAgendaFilter("Aaa"), "Aaa");
}
origin: org.drools/drools-core

filters[1] = new RuleNameEqualsAgendaFilter("name", true);
filters[2] = new RuleNameMatchesAgendaFilter("regexp", false);
filters[3] = new RuleNameStartsWithAgendaFilter("prefix", false);
filters[1] = new RuleNameEqualsAgendaFilter("name", true);
filters[2] = new RuleNameMatchesAgendaFilter("regexp", false);
filters[3] = new RuleNameStartsWithAgendaFilter("prefix", false);
origin: maciejwalkowiak/junit-drools

@Override
public void fire(String ruleName) {
  LOG.debug("Firing rule: {}", ruleName);
  this.statefulSession.fireAllRules(new RuleNameEqualsAgendaFilter(ruleName));
}
origin: org.drools/drools-reteoo

@Test
public void testAgendaFilter4() {
  String str = "package org.drools.compiler\n" +
         "rule Aaa when then end\n" +
         "rule Bbb when then end\n";
  KnowledgeBase kbase = loadKnowledgeBaseFromString( str );
  StatefulKnowledgeSession ksession = createKnowledgeSession( kbase );
  org.kie.api.event.rule.AgendaEventListener ael = mock( org.kie.api.event.rule.AgendaEventListener.class );
  ksession.addEventListener( ael );
  RuleNameEqualsAgendaFilter af = new RuleNameEqualsAgendaFilter( "Aaa" );
  int rules = ksession.fireAllRules( af );
  assertEquals( 1,
         rules );
  ArgumentCaptor<org.kie.api.event.rule.AfterMatchFiredEvent> arg = ArgumentCaptor.forClass( org.kie.api.event.rule.AfterMatchFiredEvent.class );
  verify( ael ).afterMatchFired(arg.capture());
  assertThat( arg.getValue().getMatch().getRule().getName(),
        is( "Aaa" ) );
}
org.drools.core.baseRuleNameEqualsAgendaFilter

Most used methods

  • <init>

Popular in Java

  • Parsing JSON documents to java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getSharedPreferences (Context)
  • getApplicationContext (Context)
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Properties (java.util)
    A Properties object is a Hashtable where the keys and values must be Strings. Each property can have
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Semaphore (java.util.concurrent)
    A counting semaphore. Conceptually, a semaphore maintains a set of permits. Each #acquire blocks if
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top PhpStorm plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now