Package org.drools.definition.process

Examples of org.drools.definition.process.Process


            return null;
        }
        processInstanceInfo.updateLastReadDate();
        processInstance =
          processInstanceInfo.getProcessInstance(kruntime, this.kruntime.getEnvironment());
        Process process = kruntime.getKnowledgeBase().getProcess( processInstance.getProcessId() );
        if ( process == null ) {
            throw new IllegalArgumentException( "Could not find process " + processInstance.getProcessId() );
        }
        processInstance.setProcess( process );
        if ( processInstance.getKnowledgeRuntime() == null ) {
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.listener.debug( "KnowledgeAgent removing Rule=" + rule
                                     + " from package=" + rule.getPackageName() );
                this.kbase.removeRule( rule.getPackageName(),
                                       rule.getName() );
            } else if ( kd instanceof Process ) {
                Process process = (Process) kd;
                this.listener.debug( "KnowledgeAgent removing Process=" + process );
                this.kbase.removeProcess( process.getId() );
            } else if ( kd instanceof TypeDeclaration ) {
                // @TODO Handle Type Declarations... is there a way to remove this?
            } else if ( kd instanceof Function ) {
                Function function = (Function) kd;
                this.kbase.removeFunction( function.getNamespace(),
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

    WorkflowProcessInstance processInstance = dynamicContext.getProcessInstance();
    SubProcessNodeInstance subProcessNodeInstance = new SubProcessNodeInstance();
      subProcessNodeInstance.setNodeInstanceContainer(dynamicContext);
    subProcessNodeInstance.setProcessInstance(processInstance);
    InternalWorkingMemory workingMemory = ((StatefulKnowledgeSessionImpl) ksession).session;
    Process process = ((InternalRuleBase) workingMemory.getRuleBase()).getProcess(processId);
        if (process == null) {
          System.err.println("Could not find process " + processId);
          System.err.println("Aborting process");
          processInstance.setState(ProcessInstance.STATE_ABORTED);
        } else {
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

        }
        for (Map.Entry<String, String> replacement: replacements.entrySet()) {
          processId = processId.replace("#{" + replacement.getKey() + "}", replacement.getValue());
        }
        // start process instance
        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

        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

                this.listener.debug( "KnowledgeAgent removing Rule=" + rule
                                     + " from package=" + rule.getPackageName() );
                this.kbase.removeRule( rule.getPackageName(),
                                       rule.getName() );
            } else if ( kd instanceof Process ) {
                Process process = (Process) kd;
                this.listener.debug( "KnowledgeAgent removing Process=" + process );
                this.kbase.removeProcess( process.getId() );
            } else if ( kd instanceof TypeDeclaration ) {
                // @TODO Handle Type Declarations... is there a way to remove this?
            } else if ( kd instanceof Function ) {
                Function function = (Function) kd;
                this.kbase.removeFunction( function.getNamespace(),
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

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.