Package org.drools.definition.process

Examples of org.drools.definition.process.Process


        }
        this.eventSupport.fireAfterProcessAdded( process );
    }

    public void removeProcess( final String id ) {
        Process process = this.processes.get( id );
        if (process == null) {
            throw new IllegalArgumentException( "Process '" + id + "' does not exist for this Rule Base." );
        }
        this.eventSupport.fireBeforeProcessRemoved( process );
        lock();
        try {
            this.processes.remove( id );
            this.pkgs.get(process.getPackageName()).removeRuleFlow(id);
        } finally {
            unlock();
        }
        this.eventSupport.fireAfterProcessRemoved( process );
    }
View Full Code Here


        //Merge The Rule Flows
        if ( newPkg.getRuleFlows() != null ) {
            final Map flows = newPkg.getRuleFlows();
            for ( final Iterator iter = flows.values().iterator(); iter.hasNext(); ) {
                final Process flow = (Process) iter.next();
                pkg.addProcess( flow );
            }
        }

    }
View Full Code Here

    public ProcessInstance startProcess(String processId,
                                        Map<String, Object> parameters) {
        if ( !this.actionQueue.isEmpty() ) {
            executeQueuedActions();
        }
        final Process process = ((InternalRuleBase) getRuleBase()).getProcess( processId );
        if ( process == null ) {
            throw new IllegalArgumentException( "Unknown process ID: " + processId );
        }
        ProcessInstance processInstance = ( ProcessInstance ) getProcessInstance( process );
        processInstance.setWorkingMemory( this );
View Full Code Here

        //Merge The Rule Flows
        if (newPkg.getRuleFlows() != null) {
            final Map flows = newPkg.getRuleFlows();
            for (final Iterator iter = flows.values().iterator(); iter.hasNext();) {
                final Process flow = (Process) iter.next();
                pkg.addProcess( flow );
            }
        }
    }
View Full Code Here

        }
        this.eventSupport.fireAfterProcessAdded( process );
    }

    public void removeProcess( final String id ) {
        Process process = this.processes.get( id );
        if (process == null) {
            throw new IllegalArgumentException( "Process '" + id + "' does not exist for this Rule Base." );
        }
        this.eventSupport.fireBeforeProcessRemoved( process );
        lock();
        try {
            this.processes.remove( id );
            this.pkgs.get(process.getPackageName()).removeRuleFlow(id);
        } finally {
            unlock();
        }
        this.eventSupport.fireAfterProcessRemoved( process );
    }
View Full Code Here

            if (parameterValue != null) {
              parameters.put(mapping.getKey(),parameterValue);
            }
        }
        String processId = getSubProcessNode().getProcessId();
        Process process = ((InternalRuleBase) ((ProcessInstance) getProcessInstance())
        .getWorkingMemory().getRuleBase()).getProcess(processId);
        if (process == null) {
          System.err.println("Could not find process " + processId);
          System.err.println("Aborting process");
          ((ProcessInstance) getProcessInstance()).setState(ProcessInstance.STATE_ABORTED);
View Full Code Here

            if ( portRuleFlow.equalsIgnoreCase( "true" ) ) {
                portedReader = portToCurrentVersion( reader );
            } else {
                portedReader = reader;
            }
            Process process = xmlReader.read(portedReader);
            buildProcess( process, url );
        } finally {
            Thread.currentThread().setContextClassLoader( oldLoader );
        }
        reader.close();
View Full Code Here

        try {
            startOperation();
            if ( !this.actionQueue.isEmpty() ) {
                executeQueuedActions();
            }
            final Process process = ((InternalRuleBase) getRuleBase()).getProcess( processId );
            if ( process == null ) {
                throw new IllegalArgumentException( "Unknown process ID: " + processId );
            }
            ProcessInstance processInstance = startProcess( process,
                                                            parameters );
View Full Code Here

            return null;
        }
    }

    public Process getProcess(String processId) {
        Process p = null;
        for( Package pkg : this.ruleBase.getPackages() ) {
            p = pkg.getRuleFlows().get( processId );
            if( p != null ) break;
        }
        return p;
View Full Code Here

        if ( processClass == null ) {
            // nothing to compile.
            return;
        }

        final Process process = context.getProcess();
        final ProcessDescr processDescr = context.getProcessDescr();

        // The compilation result is for the entire rule, so difficult to associate with any descr
        addClassCompileTask( this.pkg.getName() + "." + processDescr.getClassName(),
                             processDescr,
View Full Code Here

TOP

Related Classes of org.drools.definition.process.Process

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.