Examples of execute()


Examples of org.dmlite.model.action.Transaction.execute()

      action1.setEntities(comments);
      action1.setEntity(firstComment);
      EntitiesAction action2 = new RemoveAction(transaction);
      action2.setEntities(comments);
      action2.setEntity(secondComment);
      allActionsDone = transaction.execute();
      log.info("Successful Transaction: " + allActionsDone);
    } catch (ActionException ae) {
      log.info("Transaction problem: " + ae.getMessage());
    }
  }
View Full Code Here

Examples of org.drools.StatelessSession.execute()

        StatelessSession session = ruleBase.newStatelessSession();
        List list = new ArrayList();
        session.setGlobal( "list",
                           list );
        session.execute( "not integer" );
        assertEquals( "not integer",
                      list.get( 0 ) );
    }

    public void testDynamicallyAddInitialFactRule() throws Exception {
View Full Code Here

Examples of org.drools.command.CommandService.execute()

    }

    public Void call() throws Exception {
        JDKCallableJobCommand command = new JDKCallableJobCommand( this );
        CommandService commandService = ((AcceptsTimerJobFactoryManager)scheduler).getTimerJobFactoryManager().getCommandService();
        commandService.execute( command );
        return null;
    }

    Void internalCall() throws Exception {
        return super.call();
View Full Code Here

Examples of org.drools.command.SingleSessionCommandService.execute()

        int sessionId = service.getSessionId();
        log.info("---> created SingleSessionCommandService id: " + sessionId);

        StartProcessCommand startProcessCommand = new StartProcessCommand();
        startProcessCommand.setProcessId( "org.drools.test.TestProcess" );
        ProcessInstance processInstance = service.execute( startProcessCommand );
        log.info( "Started process instance {}", processInstance.getId() );

        TestWorkItemHandler handler = TestWorkItemHandler.getInstance();
        WorkItem workItem = handler.getWorkItem();
        assertNotNull( workItem );
View Full Code Here

Examples of org.drools.command.impl.CommandBasedStatefulKnowledgeSession.execute()

   
    List<String> list = new ArrayList<String>();
    list.add("Test");
   
    ksession.insert(list);
    ksession.execute(new ActivateRuleFlowCommand("ruleflow-group"));
    assertEquals(1, ksession.fireAllRules());
   
    try {
      ksession.execute(new ExceptionCommand());
      fail("Process must throw an exception");
View Full Code Here

Examples of org.drools.command.impl.GenericCommand.execute()

                                                           this.data.getTemp() );
        ExecutionResultImpl localKresults = new ExecutionResultImpl();
        localSessionContext.set( "kresults_" + msg.getConversationId(),
                                 localKresults );

        Object result = command.execute( localSessionContext );

        //        session.write( new MessageImpl( msg.getConversationId(),
        //                                    msg.getRequestId(),
        //                                    null,
        //                                    1,
View Full Code Here

Examples of org.drools.common.WorkingMemoryAction.execute()

            startOperation();
            if (!this.actionQueue.isEmpty()) {
                WorkingMemoryAction action = null;
                while ((action = actionQueue.poll()) != null) {
                    try {
                        action.execute(this);
                    } catch (Exception e) {
                        throw new RuntimeDroolsException( "Unexpected exception executing action " + action.toString(), e );
                    }
                }
            }
View Full Code Here

Examples of org.drools.core.StatelessSession.execute()

        final Cheese stilton = new Cheese( "stilton",
                                           5 );

        List collection = new ArrayList();
        collection.add( stilton );
        session.execute( collection );

        Thread.sleep( 100 );

        assertEquals( "stilton",
                      list.get( 0 ) );
View Full Code Here

Examples of org.drools.core.command.CommandService.execute()

    public Void call() throws Exception {
        try {
            JDKCallableJobCommand command = new JDKCallableJobCommand( this );
            CommandService commandService = ((AcceptsTimerJobFactoryManager)scheduler).getTimerJobFactoryManager().getCommandService();
            commandService.execute( command );
            return null;
        } catch( Exception e ) {
            logger.error("Unable to execute timer job!", e);
            throw e;
        }
View Full Code Here

Examples of org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.execute()

    int id = ksession.getId();
    List<String> list = new ArrayList<String>();
    list.add("Test");
   
    ksession.insert(list);
    ksession.execute(new ActivateRuleFlowCommand("ruleflow-group"));
   
    ksession.dispose();       
        ksession = createSession(id, "ruleflow-groups.drl");
       
        groups = ((InternalAgenda)stripSession(ksession).getAgenda()).getAgendaGroups();
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.