Package org.drools

Examples of org.drools.RuleBase.newWorkingMemory()


    public void testFilters() throws Exception
    {
        RuleBase ruleBase = new RuleBaseImpl( new Rete() );

        WorkingMemoryImpl workingMemory = (WorkingMemoryImpl) ruleBase.newWorkingMemory();
        final Agenda agenda = workingMemory.getAgenda();

        final Rule rule = new Rule( "test-rule" );

        final Map results = new HashMap();
View Full Code Here


    public void testFocusStack() throws ConsequenceException
    {
        RuleBase ruleBase = new RuleBaseImpl( new Rete() );

        WorkingMemoryImpl workingMemory = (WorkingMemoryImpl) ruleBase.newWorkingMemory();

        final Agenda agenda = workingMemory.getAgenda();

        /* create the moduels */
        ModuleImpl module1 = new ModuleImpl( "module1",
View Full Code Here

   
    public void testAutoFocus() throws ConsequenceException
    {
        RuleBase ruleBase = new RuleBaseImpl( new Rete() );

        WorkingMemoryImpl workingMemory = (WorkingMemoryImpl) ruleBase.newWorkingMemory();

        final Agenda agenda = workingMemory.getAgenda();

        /* create the module */
        ModuleImpl module = new ModuleImpl( "module",
View Full Code Here

  protected void executeActivity(ProcessInstance instance) throws Exception {
    // load up the rulebase
    RuleBase ruleBase = readRule(instance);
    final WorkingMemory workingMemory = ruleBase.newWorkingMemory();

    // asserts objects
    HashMap objects = new HashMap();

    ParameterContext[] params = getVariableBindings();
View Full Code Here

               
         if (ruleBase==null)
         {
            throw new IllegalStateException("RuleBase not found: " + ruleBaseName);
         }
         workingMemory = ruleBase.newWorkingMemory();
      }
      return workingMemory;
   }
  
   @Destroy
View Full Code Here


  public void assign(Assignable assignable, ExecutionContext executionContext) throws Exception {
      // load up the rulebase
      RuleBase ruleBase = readRule(ruleFile);
      WorkingMemory workingMemory = ruleBase.newWorkingMemory();   

      // load the data
      Session s = executionContext.getJbpmContext().getSession();
      System.out.println("************** Session is :" + s.toString());

View Full Code Here

   */
  public void execute(ExecutionContext executionContext) throws Exception {

    // load up the rulebase
    RuleBase ruleBase = readRule(ruleFile);
    WorkingMemory workingMemory = ruleBase.newWorkingMemory();
   
//      final WorkingMemoryFileLogger logger = new WorkingMemoryFileLogger( workingMemory );
//      logger.setFileName( "jpdl/examples/rulesActionHandler/log/rulesAction" );


View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.