Package org.jbpm.api

Examples of org.jbpm.api.ProcessEngine


                return getDeploymentResource(resourceName, oldDeploymentId);
            }
            return null;
        }
        private byte[] fetchProcessResource(ProcessInstance pi, String resourceName) {
            ProcessEngine processEngine = getProcessEngine(ProcessToolContext.Util.getThreadProcessToolContext());
            RepositoryService service = processEngine.getRepositoryService();

            ExecutionService executionService = processEngine.getExecutionService();
            org.jbpm.api.ProcessInstance processInstanceById = executionService.findProcessInstanceById(pi.getInternalId());
            String processDefinitionId;
            if (processInstanceById == null) { //look in history service
                HistoryProcessInstanceQuery historyProcessInstanceQuery = processEngine.getHistoryService()
                        .createHistoryProcessInstanceQuery().processInstanceId(pi.getInternalId());
                HistoryProcessInstance historyProcessInstance = historyProcessInstanceQuery.uniqueResult();
                processDefinitionId = historyProcessInstance.getProcessDefinitionId();
            } else {
                processDefinitionId = processInstanceById.getProcessDefinitionId();
View Full Code Here


  final static Map<String, ProcessEngine> processEngines = new HashMap<String, ProcessEngine>();

  private static final Log log = LogFactory.getLog(AntHelper.class);

  public static ProcessEngine getProcessEngine(String jbpmCfgXml) {
    ProcessEngine processEngine = (ProcessEngineImpl) processEngines.get(jbpmCfgXml);
    if (processEngine == null) {
      Configuration configuration = new Configuration();
      if (jbpmCfgXml!=null) {
        log.debug("using jbpm configuration "+jbpmCfgXml);
        configuration.setResource(jbpmCfgXml);
View Full Code Here

    Thread currentThread = Thread.currentThread();
    ClassLoader originalClassLoader = currentThread.getContextClassLoader();
    currentThread.setContextClassLoader(JbpmDeployTask.class.getClassLoader());
    try {
      // get the ProcessEngineImpl
      ProcessEngine processEngine = AntHelper.getProcessEngine(jbpmCfg);
     
      // if attribute process is set, deploy that process file
      if (file!=null) {
        deployFile(processEngine, file);
      }
View Full Code Here

TOP

Related Classes of org.jbpm.api.ProcessEngine

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.