Package org.drools.ruleflow.common.core

Examples of org.drools.ruleflow.common.core.Process


        }
    }

    public ProcessInstance startProcess(final String processId) {
        final Process process = ((InternalRuleBase) getRuleBase()).getProcess( processId );
        if ( process == null ) {
            throw new IllegalArgumentException( "Unknown process ID: " + processId );
        }
        if ( process instanceof RuleFlowProcess ) {
            final RuleFlowProcessInstance processInstance = new RuleFlowProcessInstanceImpl();
            processInstance.setWorkingMemory( this );
            processInstance.setProcess( process );
            processInstance.setId( ++processCounter );
            processInstance.start();

            getRuleFlowEventSupport().fireRuleFlowProcessStarted( processInstance,
                                                                  this );

            return processInstance;
        } else {
            throw new IllegalArgumentException( "Unknown process type: " + process.getClass() );
        }
    }
View Full Code Here


        }
    }

    public ProcessInstance startProcess(final String processId) {
        final Process process = ((InternalRuleBase) getRuleBase()).getProcess( processId );
        if ( process == null ) {
            throw new IllegalArgumentException( "Unknown process ID: " + processId );
        }
        if ( process instanceof RuleFlowProcess ) {
            final RuleFlowProcessInstance processInstance = new RuleFlowProcessInstanceImpl();
            processInstance.setWorkingMemory( this );
            processInstance.setProcess( process );
            processInstance.setId( ++processCounter );
            processInstance.start();

            getRuleFlowEventSupport().fireRuleFlowProcessStarted( processInstance,
                                                                  this );

            return processInstance;
        } else {
            throw new IllegalArgumentException( "Unknown process type: " + process.getClass() );
        }
    }
View Full Code Here

        }
    }

    public ProcessInstance startProcess(final String processId) {
        final Process process = ((InternalRuleBase) getRuleBase()).getProcess( processId );
        if ( process == null ) {
            throw new IllegalArgumentException( "Unknown process ID: " + processId );
        }
        if ( process instanceof RuleFlowProcess ) {
            final RuleFlowProcessInstance processInstance = new RuleFlowProcessInstanceImpl();
            processInstance.setWorkingMemory( this );
            processInstance.setProcess( process );
            processInstance.setId( ++processCounter );
            processInstance.start();

            getRuleFlowEventSupport().fireRuleFlowProcessStarted( processInstance,
                                                                  this );

            return processInstance;
        } else {
            throw new IllegalArgumentException( "Unknown process type: " + process.getClass() );
        }
    }
View Full Code Here

        //and now the rule flows
        if ( newPkg.getRuleFlows() != Collections.EMPTY_MAP ) {
            final Map flows = newPkg.getRuleFlows();
            for ( final Iterator iter = flows.values().iterator(); iter.hasNext(); ) {
                final Process flow = (Process) iter.next();
                pkg.addRuleFlow( flow );
            }
        }
    }
View Full Code Here

            this.processes.remove( id );
        }
    }

    public Process getProcess(final String id) {
        Process process = null;
        synchronized ( this.pkgs ) {
            process = (Process) this.processes.get( id );
        }
        return process;
    }
View Full Code Here

TOP

Related Classes of org.drools.ruleflow.common.core.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.