Examples of createProcessInstance()


Examples of org.camunda.bpm.engine.impl.pvm.PvmProcessDefinition.createProcessInstance()

          .behavior(new Automatic())
        .endActivity()      
      .endActivity()     
    .buildProcessDefinition();
   
    PvmProcessInstance processInstance = processDefinition.createProcessInstance();
    processInstance.start();
   
    assertTrue(processInstance.isEnded());
  }
 
View Full Code Here

Examples of org.drools.process.instance.ProcessInstanceFactory.createProcessInstance()

        ProcessInstanceFactoryRegistry processRegistry = ((InternalRuleBase) getRuleBase()).getConfiguration().getProcessInstanceFactoryRegistry();
        ProcessInstanceFactory conf = processRegistry.getProcessInstanceFactory( process );
        if ( conf == null ) {
            throw new IllegalArgumentException( "Illegal process type: " + process.getClass() );
        }
        return conf.createProcessInstance( process,
                                           this,
                                           parameters );
    }

    public ProcessInstanceManager getProcessInstanceManager() {
View Full Code Here

Examples of org.drools.process.instance.ProcessInstanceFactory.createProcessInstance()

        ProcessInstanceFactoryRegistry processRegistry = ((InternalRuleBase) getRuleBase()).getConfiguration().getProcessInstanceFactoryRegistry();
        ProcessInstanceFactory conf = processRegistry.getProcessInstanceFactory( process );
        if ( conf == null ) {
            throw new IllegalArgumentException( "Illegal process type: " + process.getClass() );
        }
        ProcessInstance processInstance = conf.createProcessInstance();
        if ( processInstance == null ) {
            throw new IllegalArgumentException( "Illegal process type: " + process.getClass() );
        }
        return processInstance;
    }
View Full Code Here

Examples of org.drools.runtime.StatefulKnowledgeSession.createProcessInstance()

        if (data != null) {
            for (Object o: data) {
                ksession.insert(o);
            }
        }
        ProcessInstance processInstance = (ProcessInstance) ksession.createProcessInstance(processId, parameters);
        if ( this.outIdentifier != null ) {
            ((ExecutionResultImpl) ((KnowledgeCommandContext) context).getExecutionResults()).getResults().put(this.outIdentifier,
                                                                                                               processInstance.getId());
        }
        return processInstance;
View Full Code Here

Examples of org.fireflow.engine.IWorkflowSession.createProcessInstance()

                try {
                  //IWorkflowSession是流程操作的入口,需要从runtimeContext获得。
                    IWorkflowSession workflowSession = runtimeContext.getWorkflowSession();
                   
                    //创建流程实例
                    IProcessInstance processInstance = workflowSession.createProcessInstance(
                            "LeaveApplicationProcess",CurrentUserAssignmentHandler.APPLICANT);
                   
                    //运行流程实例
                    processInstance.run();
View Full Code Here

Examples of org.jbpm.graph.def.ProcessDefinition.createProcessInstance()

            if (!(processValue instanceof ProcessDefinition)) {
                context.setError("Error starting process", "Attempted to start something other than a process");
                return;
            }
            final ProcessDefinition definition = (ProcessDefinition) processValue;
            final ProcessInstance instance = definition.createProcessInstance();
            // Signal the root token based on the following criteria:
            // 1. If there is no start task, and
            // 2. If the root token is still at the start state, and
            // 3. If the start state has a default leaving transition, then
            // signal the token along the default transition.
View Full Code Here

Examples of org.jbpm.pvm.internal.client.ClientProcessDefinition.createProcessInstance()

    processDefinition = (ClientProcessDefinition) repositorySession.findProcessDefinitionByKey(processDefinitionKey);
    if (processDefinition==null) {
      throw new JbpmException("no process definition with key "+processDefinitionKey);
    }
   
    ClientProcessInstance processInstance = processDefinition.createProcessInstance(executionKey);
    processInstance.setVariables(variables);
    processInstance.start();
   
    if (!processInstance.isEnded()) {
      Session session = Environment.getFromCurrent(Session.class);
View Full Code Here

Examples of org.jbpm.pvm.internal.model.ProcessDefinitionImpl.createProcessInstance()

  public static String initialise(TaskImpl task) {
    ProcessDefinitionImpl lifeCycle = getLifeCycle(task);
    Map<String, Object> lifeCycleVariables = new HashMap<String, Object>();
    lifeCycleVariables.put("task", task);
    ExecutionImpl lifeCycleExecution = (ExecutionImpl) lifeCycle.createProcessInstance();
    lifeCycleExecution.setVariables(lifeCycleVariables);
    lifeCycleExecution.start();
    return lifeCycleExecution.getActivity().getName();
  }
View Full Code Here

Examples of org.kie.api.runtime.KieSession.createProcessInstance()

        if (data != null) {
            for (Object o: data) {
                ksession.insert(o);
            }
        }
        ProcessInstance processInstance = (ProcessInstance) ksession.createProcessInstance(processId, parameters);
        if ( this.outIdentifier != null ) {
            ((ExecutionResultImpl) ((KnowledgeCommandContext) context).getExecutionResults()).getResults().put(this.outIdentifier,
                                                                                                               processInstance.getId());
        }
        return processInstance;
View Full Code Here

Examples of org.kie.internal.runtime.StatefulKnowledgeSession.createProcessInstance()

    @Test
    public void create2ProcessInstances() throws Exception {
        long[] processId = new long[2];

        StatefulKnowledgeSession ksession = reloadKnowledgeSession();
        processId[0] = ksession.createProcessInstance("org.jbpm.processinstance.helloworld", null).getId();
        processId[1] = ksession.createProcessInstance("org.jbpm.processinstance.helloworld", null).getId();
        ksession.dispose();

        assertProcessInstancesExist(processId);
    }
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.