Package org.kie.runtime.rule

Examples of org.kie.runtime.rule.SessionEntryPoint


                                       org.drools.marshalling.impl.ProtobufMessages.EntryPoint _ep,
                                       ObjectStore objectStore) throws IOException,
                                                               ClassNotFoundException {
        InternalWorkingMemory wm = context.wm;

        SessionEntryPoint entryPoint = context.wm.getEntryPoints().get( _ep.getEntryPointId() );
        // load the handles
        for ( ProtobufMessages.FactHandle _handle : _ep.getHandleList() ) {
            InternalFactHandle handle = readFactHandle( context,
                                                        entryPoint,
                                                        _handle );
View Full Code Here


    public Collection<FactHandle> execute(Context context) {
        KieSession ksession = ((KnowledgeCommandContext) context).getKieSession();
        List<FactHandle> handles = new ArrayList<FactHandle>();
       
        SessionEntryPoint wmep;
        if ( StringUtils.isEmpty( this.entryPoint ) ) {
            wmep = ksession;
        } else {
            wmep = ksession.getEntryPoint( this.entryPoint );
        }

        for ( Object object : objects ) {
            handles.add( wmep.insert( object ) );
        }

        if ( outIdentifier != null ) {
            if ( this.returnObject ) {
                ((StatefulKnowledgeSessionImpl)ksession).session.getExecutionResult().getResults().put( this.outIdentifier,
View Full Code Here

        this.setters = setters;
    }

    public Object execute(Context context) {
        KieSession ksession = ((KnowledgeCommandContext) context).getKieSession();
        SessionEntryPoint wmep = ksession.getEntryPoint( handle.getEntryPointId() );
       
        Object object = wmep.getObject( this.handle );
        MVEL.eval( getMvelExpr(),
                   object );

        wmep.update( handle,
                        object );
        return object;
    }
View Full Code Here

        this.outIdentifier = outIdentifier;
    }

    public FactHandle execute(Context context) {

        SessionEntryPoint ep = ((KnowledgeCommandContext) context).getWorkingMemoryEntryPoint();
        FactHandle factHandle = ep.insert(object);

        DefaultFactHandle disconnectedHandle = ((DefaultFactHandle) factHandle).clone();
        disconnectedHandle.disconnect();

        if (outIdentifier != null) {
View Full Code Here

TOP

Related Classes of org.kie.runtime.rule.SessionEntryPoint

Copyright © 2018 www.massapicom. 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.