Examples of fireAllRules()


Examples of com.dotcms.repackage.org.drools.WorkingMemory.fireAllRules()

          checkReloadJBossRulesFiles();
          if (XMLRuleBase != null) {
            final WorkingMemory workingMemory = XMLRuleBase.newWorkingMemory();
             
              workingMemory.assertObject(obj);
              workingMemory.fireAllRules();
          }
        } catch (final Throwable t) {
          Logger.info(JBossRulesUtils.class, t.getMessage());
        }
    }
View Full Code Here

Examples of org.drools.StatefulSession.fireAllRules()

        assertEquals(1, session.getProcessInstances().size());
       
        session = getSerialisedStatefulSession( session );
        assertEquals(1, session.getProcessInstances().size());
       
        session.fireAllRules();

        assertEquals( 1, ((List<Object>) session.getGlobal("list")).size());
        assertEquals( p, ((List<Object>) session.getGlobal("list")).get(0));
        assertEquals(0, session.getProcessInstances().size());
    }
View Full Code Here

Examples of org.drools.StatefulSession.fireAllRules()

        assertEquals("x-value", handler2.getWorkItem().getParameter("Priority"));
       
        session.getWorkItemManager().completeWorkItem(handler1.getWorkItem().getId(), null);
        session.getWorkItemManager().completeWorkItem(handler2.getWorkItem().getId(), null);
        session.insert(new Person());
        session.fireAllRules();
       
        assertEquals(0, session.getProcessInstances().size());
    }
   
    public void test4() throws Exception {
View Full Code Here

Examples of org.drools.StatefulSession.fireAllRules()

    assertEquals(0, myList.size());
       
    Person jack = new Person();
        jack.setName("Jack");
        session.insert(jack);
        session.fireAllRules();
        assertEquals(2, myList.size());
        assertEquals("Jack", myList.get(0));
        assertEquals("SomeString", myList.get(1));
  }
 
View Full Code Here

Examples of org.drools.StatefulSession.fireAllRules()

    session.setGlobal("myList", myList);

    assertEquals(0, myList.size());
       
    ((InternalWorkingMemory) session).getProcessRuntime().signalEvent("myEvent", "Jack");
        session.fireAllRules();
        assertEquals(2, myList.size());
        assertEquals("Jack", myList.get(0));
        assertEquals("SomeString", myList.get(1));
  }
 
View Full Code Here

Examples of org.drools.StatefulSession.fireAllRules()

            }
            TaskServiceRequest request = new TaskServiceRequest("addTask", null, null);
            session.setGlobal("request", request);
            session.insert(task);
            session.insert(contentData);
            session.fireAllRules();

            if (!request.isAllowed()) {
                StringBuilder error = new StringBuilder("Cannot add Task:\n");
                if (request.getReasons() != null) {
                    for (String reason : request.getReasons()) {
View Full Code Here

Examples of org.drools.WorkingMemory.fireAllRules()

        final WorkingMemory workingMemory = ruleBase.newStatefulSession();
        final List<String> list = new ArrayList<String>();
        workingMemory.setGlobal( "list",
                                 list );

        workingMemory.fireAllRules();
        assertEquals( 0,
                      list.size() );

        final ProcessInstance processInstance = workingMemory.startProcess( "0" );
        assertEquals( ProcessInstance.STATE_ACTIVE,
View Full Code Here

Examples of org.drools.WorkingMemory.fireAllRules()

                      list.size() );

        final ProcessInstance processInstance = workingMemory.startProcess( "0" );
        assertEquals( ProcessInstance.STATE_ACTIVE,
                      processInstance.getState() );
        workingMemory.fireAllRules();
        assertEquals( 4,
                      list.size() );
        assertEquals( "Rule1",
                      list.get( 0 ) );
        assertEquals( "Rule3",
View Full Code Here

Examples of org.drools.WorkingMemory.fireAllRules()

        final WorkingMemory workingMemory = ruleBase.newStatefulSession();
        final List<String> list = new ArrayList<String>();
        workingMemory.setGlobal( "list",
                                 list );

        workingMemory.fireAllRules();
        assertEquals( 0,
                      list.size() );

        final ProcessInstance processInstance = workingMemory.startProcess( "0" );
        assertEquals( ProcessInstance.STATE_ACTIVE,
View Full Code Here

Examples of org.drools.WorkingMemory.fireAllRules()

                      list.size() );

        final ProcessInstance processInstance = workingMemory.startProcess( "0" );
        assertEquals( ProcessInstance.STATE_ACTIVE,
                      processInstance.getState() );
        workingMemory.fireAllRules();
        assertEquals( 4,
                      list.size() );
        assertEquals( "Rule1",
                      list.get( 0 ) );
        assertEquals( "Rule3",
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.