Package org.jbpm.graph.def

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


    public ProcessInstance createNewProcessInstance(final String defS) {
        ProcessInstance inst = (ProcessInstance) getJbpmTemplate().execute(new JbpmCallback() {
            public Object doInJbpm(JbpmContext ctx) throws JbpmException {
                ProcessDefinition def = ctx.getGraphSession().findLatestProcessDefinition(defS);
                ProcessInstance inst = def.createProcessInstance();
                return inst;
            }
        });
        return inst;
    }
View Full Code Here

      "  </state>" +
      "  <end-state name='end' />" +
      "</process-definition>"
    );
   
    ProcessInstance processInstance = processDefinition.createProcessInstance();

    processInstance.signal();
    processInstance.signal();
   
    assert processInstance.hasEnded();
View Full Code Here

      "  </state>" +
      "  <end-state name='end' />" +
      "</process-definition>"
    );
   
    ProcessInstance processInstance = processDefinition.createProcessInstance();

    processInstance.signal();
    processInstance.signal();
   
    assert processInstance.hasEnded();
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.