Examples of execute()


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

                    if ( actionQueue!= null && !actionQueue.isEmpty() ) {
                        WorkingMemoryAction action = null;

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

Examples of org.drools.core.reteoo.test.dsl.Step.execute()

            String name = step.getName();
            Object object = this.steps.get( name );
            if ( object != null && object instanceof Step ) {
                Step stepImpl = (Step) object;
                try {
                    stepImpl.execute( context,
                                      step.getCommands() );
                } catch ( Exception e ) {
                    e.printStackTrace();
                    throw new IllegalArgumentException( "line " + step.getLine() + ": unable to execute step " + step,
                                                        e );
View Full Code Here

Examples of org.drools.eventmessaging.EventResponseHandler.execute()

                  }
                    if (!cmd.getArguments().isEmpty() && cmd.getArguments().get(0) instanceof RuntimeException) {
                        responseHandler.setError((RuntimeException) cmd.getArguments().get(0));
                    } else {
                        Payload payload = (Payload) cmd.getArguments().get(0);
                        responseHandler.execute(payload);
                    }
                }
                break;
            }
        }
View Full Code Here

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

                                                   config,
                                                   env );
        ut.begin();
        completeWorkItemCommand = new CompleteWorkItemCommand();
        completeWorkItemCommand.setWorkItemId( workItem.getId() );
        service.execute( completeWorkItemCommand );
        ut.commit();

        workItem = handler.getWorkItem();
        assertNull( workItem );
        service.dispose();
View Full Code Here

Examples of org.drools.reteoo.test.dsl.Step.execute()

            String name = step.getName();
            Object object = this.steps.get( name );
            if ( object != null && object instanceof Step ) {
                Step stepImpl = (Step) object;
                try {
                    stepImpl.execute( context,
                                      step.getCommands() );
                } catch ( Exception e ) {
                    throw new IllegalArgumentException( "line " + step.getLine() + ": unable to execute step " + step,
                                                        e );
                }
View Full Code Here

Examples of org.drools.runtime.CommandExecutor.execute()

        if ( exec == null ) {
            throw new RuntimeException( "No defined ksession for uri" + de.getEndpointUri() );
        }

        ExecutionResults results = exec.execute( (BatchExecutionCommandImpl) cmd );;
        exchange.getOut().setBody( results );
    }
}
View Full Code Here

Examples of org.drools.runtime.StatefulKnowledgeSession.execute()

        InsertObjectCommand cmd = new InsertObjectCommand( me );
        cmd.setOutIdentifier( "camel-rider" );
        cmd.setReturnObject( false );
        BatchExecutionCommandImpl script = new BatchExecutionCommandImpl( Arrays.asList( new GenericCommand< ? >[]{cmd} ) );

        ExecutionResults results = ksession.execute( script );
        handle = ((FactHandle) results.getFactHandle( "camel-rider" )).toExternalForm();
    }

    @Override
    protected StatefulKnowledgeSession registerKnowledgeRuntime(String identifier,
View Full Code Here

Examples of org.drools.runtime.StatelessKnowledgeSession.execute()

    log
    .info("==================== Calling Rule Engine ====================");

    // Fire using the facts
    workingMemory.execute(facts);

    log.info("==================== Rules Complete ====================");

  }
View Full Code Here

Examples of org.drools.scm.ScmActionFactory.execute()

        actions = new CompositeScmAction();
        ScmAction addDirectory = new AddDirectory( "",
                                                   "folder1" );
        actions.addScmAction( addDirectory );

        svn.execute( actions,
                     "test message" );

        // Now check various flat and deep Directory creations
        actions = new CompositeScmAction();
View Full Code Here

Examples of org.drools.spi.Action.execute()

    Action action = (Action) getActionNode().getAction().getMetaData("Action");
    try {
        KnowledgeHelper knowledgeHelper = createKnowledgeHelper();
        ProcessContext context = new ProcessContext();
        context.setNodeInstance(this);
          action.execute(knowledgeHelper, ((ProcessInstance) getProcessInstance()).getWorkingMemory(), context);       
    } catch (Exception e) {
        throw new RuntimeException("unable to execute Action", e);
    }
      triggerCompleted();
    }
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.