Package org.activiti.engine.repository

Examples of org.activiti.engine.repository.DeploymentBuilder.deploy()


                } else {
                    deploymentBuilder.addInputStream(resourceName,
                            resource.getInputStream());
                }

                Deployment deployment = deploymentBuilder.deploy();
                logger.info("auto deploy : {}", resourceName);

                for (ProcessDefinition processDefinition : repositoryService
                        .createProcessDefinitionQuery()
                        .deploymentId(deployment.getId()).list()) {
View Full Code Here


    logger.fine("Start deploying single process.");
    // deploy processes as one deployment
    DeploymentBuilder deploymentBuilder = processEngine.getRepositoryService().createDeployment();
    deploymentBuilder.addClasspathResource(resourceName);
    // deploy the processes
    Deployment deployment = deploymentBuilder.deploy();
    logger.fine("Process deployed");
    // retreive the processDefinitionId for this process
    return processEngine.getRepositoryService().createProcessDefinitionQuery().deploymentId(deployment.getId()).singleResult().getId();
  }
View Full Code Here

    for (String string : resourceNames) {
      logger.info("Adding '" + string + "' to deployment.");
      deploymentBuilder.addClasspathResource(string);
    }
    // deploy the processes
    deploymentBuilder.deploy();
    logger.fine("Done deploying processes.");
  }

  public Set<String> getResourceNames() {
    Set<String> result = new HashSet<String>();
View Full Code Here

        String wfn = wff+"20.xml"; // TODO 9: workaround for http://forums.activiti.org/en/viewtopic.php?f=8&t=3745&start=10
        DeploymentBuilder db = repoSvc.createDeployment().addInputStream(wfn,new FileInputStream(wff));

        // TODO 4: We should avoid redeploying here, if workflow file of a given version(?) is already deployed?
        Deployment d = db.deploy();
        ProcessDefinition pDef = repoSvc.createProcessDefinitionQuery().deploymentId(d.getId()).singleResult();
        LOGGER.fine("deployedToEngine("+wff+") --> "+pDef);
    }
   
    static ProcessDefinition getDeployedWf(String wfName){
View Full Code Here

    for (String resource : resources) {
      log.debug("adding resource [{}] to repository", resource, SimulationRunContext.getRepositoryService());
      deploymentBuilder.addClasspathResource(resource);
    }

    deploymentBuilder.deploy();
  }

}
View Full Code Here

        InputStream is = new ByteArrayInputStream(resource.getBytes());
        deploymentBuilder.addInputStream(resource.getName(), is);
        inputStreams.add(is);
      }

      deploymentBuilder.deploy();
    } finally {
      for (InputStream is : inputStreams) {
        try {
          is.close();
        } catch (IOException e) {
View Full Code Here

    logger.debug("Start deploying single process.");
    // deploy processes as one deployment
    DeploymentBuilder deploymentBuilder = processEngine.getRepositoryService().createDeployment();
    deploymentBuilder.addClasspathResource(resourceName);
    // deploy the processes
    Deployment deployment = deploymentBuilder.deploy();
    logger.debug("Process deployed");
    // retreive the processDefinitionId for this process
    return processEngine.getRepositoryService().createProcessDefinitionQuery().deploymentId(deployment.getId()).singleResult().getId();
  }
View Full Code Here

    for (String string : resourceNames) {
      logger.info("Adding '" + string + "' to deployment.");
      deploymentBuilder.addClasspathResource(string);
    }
    // deploy the processes
    deploymentBuilder.deploy();
    logger.debug("Done deploying processes.");
  }

  public Set<String> getResourceNames() {
    Set<String> result = new HashSet<String>();
View Full Code Here

          } finally {
              is.close();
          }
        }
        builder.enableDuplicateFiltering();
        builder.deploy();
      } else {
        LOGGER.debug("No activiti process found in bundle {}", bundle.getSymbolicName());
      }
    } catch (Throwable t) {
      LOGGER.error("Unable to deploy activiti bundle", t);
View Full Code Here

                    }
                } catch (IOException e) {
                    throw new ActivitiException("couldn't auto deploy resource '" + resource + "': " + e.getMessage(), e);
                }
            }
            deploymentBuilder.deploy();
        }

    }

    private Map<String, Set<Resource>> createMap(final Resource[] resources) {
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.