Package org.jbpm

Examples of org.jbpm.JbpmContext.save()


    TestSchedulerService testSchedulerService = (TestSchedulerService) jbpmContext.getServices().getSchedulerService();
    ProcessInstance processInstance = new ProcessInstance(processDefinition);
    try {
      processInstance.signal();
      processInstance.suspend();
      jbpmContext.save(processInstance);
    } finally {
      jbpmContext.close();
    }

    assertEquals(1, testSchedulerService.suspendedTimerTokens.size());
View Full Code Here


    jbpmContext = jbpmConfiguration.createJbpmContext();
    testSchedulerService = (TestSchedulerService) jbpmContext.getServices().getSchedulerService();
    try {
      processInstance.resume();
      jbpmContext.save(processInstance);
    } finally {
      jbpmContext.close();
    }

    Token resumedToken = (Token) testSchedulerService.resumedTimerTokens.get(0);
View Full Code Here

      assertEquals("s", token.getNode().getName());
     
      // Now the processInstance is saved in the database.  So the
      // current state of the execution of the process is stored in the
      // database. 
      jbpmContext.save(processInstance);
      // The method below will get the process instance back out
      // of the database and resume execution by providing another
      // external signal.

    } finally {
View Full Code Here

      // After this signal, we know the process execution should have
      // arrived in the end-state.
      assertTrue(processInstance.hasEnded());
     
      // Now we can update the state of the execution in the database
      jbpmContext.save(processInstance);

    } finally {
      // Tear down the pojo persistence context.
      jbpmContext.close();
    }
View Full Code Here

        token.signal(transitionName);
      }
      processInstance = token.getProcessInstance();
    }

    jbpmContext.save(processInstance);

    this.initializeTasksList(processInstance);
    this.initializeTokensList(processInstance);

    return "inspectInstance";
View Full Code Here

    }

    taskInstance.end();

    ProcessInstance processInstance = taskInstance.getToken().getProcessInstance();
    jbpmContext.save(processInstance);

    this.initializeTasksList(processInstance);
    this.initializeTokensList(processInstance);

    return "";
View Full Code Here

    jbpmContext.save(processInstance);
   
    JbpmContext concurrentContext = jbpmConfiguration.createJbpmContext();
    ProcessInstance sameProcessInstanceInDifferentSession = concurrentContext.loadProcessInstance(processInstance.getId());
    sameProcessInstanceInDifferentSession.end();
    concurrentContext.save(sameProcessInstanceInDifferentSession);
    log.debug("closing concurrent context");
    concurrentContext.close();
   
    try {
      log.debug("closing default test method context");
View Full Code Here

           
          // execute
          timer.execute();
         
          // save the process instance
          jbpmContext.save(timer.getProcessInstance());
           
          // notify the listeners (e.g. the scheduler servlet)
          notifyListeners(timer);
           
          // if there was an exception, just save the timer
View Full Code Here

    ExecutionContext executionContext = new ExecutionContext(token);
    node.execute(executionContext);
   
    JbpmContext jbpmContext = JbpmContext.getCurrentJbpmContext();
    if (jbpmContext!=null) {
      jbpmContext.save(token);
    }
  }
}
View Full Code Here

        } else {
          //  Submit buttin named RejectActivity is pressed
          SpagoBITracer.info("Workflow", "CompleteOrRejectActivityModule", "service", "Completing Activity ["+ activityKeyId + "]");
          taskInstance.cancel();
        }
        jbpmContext.save(processInstance);
    } catch (Exception e) {
      SpagoBITracer.major(SpagoBIConstants.NAME_MODULE, this.getClass().getName(),
                      "service", "Error during the complete or reject workflow activity", e);
      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
    } finally {
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.