Examples of Process


Examples of org.drools.definition.process.Process

    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
    javaDialect.addClassCompileTask(context.getPkg().getName() + "."
View Full Code Here

Examples of org.drools.definition.process.Process

    Association association = new Association();
    association.setId(attrs.getValue("id"));
    association.setSourceRef(attrs.getValue("sourceRef"));
    association.setTargetRef(attrs.getValue("targetRef"));
   
    Process parent = (Process) parser.getParent();
    Definitions definitions = (Definitions)
      parent.getMetaData().get("Definitions");
   
    // FIXME for now associations are stored under the definitions node
    // we will move them under process and subprocesses when it becomes possible ?
    List<Association> associations = definitions.getAssociations();
    if (associations == null) {
View Full Code Here

Examples of org.drools.definition.process.Process

            return null;
        }
        processInstanceInfo.updateLastReadDate();
        processInstance = (org.jbpm.process.instance.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

Examples of org.drools.definition.process.Process

          kbuilder.add(ResourceFactory.newFileResource(subfile), ResourceType.BPMN2);
        }
        kbase.addKnowledgePackages(kbuilder.getKnowledgePackages());
      }
    }
    Process process = kbase.getProcess(processId);
    if (process == null) {
      return null;
    }

    DiagramInfo result = new DiagramInfo();
View Full Code Here

Examples of org.drools.definition.process.Process

        try {
            kruntime.startOperation();
            if ( !kruntime.getActionQueue().isEmpty() ) {
              kruntime.executeQueuedActions();
            }
            final Process process = kruntime.getKnowledgeBase().getProcess( processId );
            if ( process == null ) {
                throw new IllegalArgumentException( "Unknown process ID: " + processId );
            }
            return startProcess( process, parameters );
        } finally {
View Full Code Here

Examples of org.drools.definition.process.Process

        WorkflowProcessInstanceImpl processInstance = createProcessInstance();
        processInstance.setId(stream.readLong());
        String processId = stream.readUTF();
        processInstance.setProcessId(processId);
        Process process = ruleBase.getProcess(processId);
        if (ruleBase != null) {
            processInstance.setProcess(process);
        }
        processInstance.setState(stream.readInt());
        long nodeInstanceCounter = stream.readLong();
View Full Code Here

Examples of org.drools.definition.process.Process

      String processId, Map<String, Object> parameters) {
    WorkflowProcessInstance processInstance = dynamicContext.getProcessInstance();
    SubProcessNodeInstance subProcessNodeInstance = new SubProcessNodeInstance();
      subProcessNodeInstance.setNodeInstanceContainer(dynamicContext);
    subProcessNodeInstance.setProcessInstance(processInstance);
    Process process = ksession.getKnowledgeBase().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

Examples of org.drools.definition.process.Process

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

Examples of org.drools.definition.process.Process

    }
    return result;
  }

  public ProcessDefinitionRef getProcessDefinition(String definitionId) {
    Process process = delegate.getProcess(definitionId);
    return Transform.processDefinition(process);
  }
View Full Code Here

Examples of org.drools.definition.process.Process

  public DiagramInfo getDiagramInfo(String processId) {
    KnowledgeAgent kagent = KnowledgeAgentFactory.newKnowledgeAgent("Guvnor default");
    kagent.applyChangeSet(ResourceFactory.newClassPathResource("ChangeSet.xml"));
    kagent.monitorResourceChangeEvents(false);
    KnowledgeBase kbase = kagent.getKnowledgeBase();
    Process process = kbase.getProcess(processId);
    if (process == null) {
      return null;
    }

    DiagramInfo result = new DiagramInfo();
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.