Package org.activiti.engine

Examples of org.activiti.engine.RepositoryService.createDeployment()


        ProcessEngine eng = JenkowEngine.getEngine();
        RuntimeService rtSvc = eng.getRuntimeService();
        RepositoryService repoSvc = eng.getRepositoryService();

        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);
View Full Code Here


        if (engine == null) {
          throw new IllegalStateException("Unable to find a ProcessEngine service");
        }

        RepositoryService service = engine.getRepositoryService();
        DeploymentBuilder builder = service.createDeployment();
        builder.name(bundle.getSymbolicName());
        for (URL url : pathList) {
          InputStream is = url.openStream();
          if (is == null) {
              throw new IOException("Error opening url: " + url);
View Full Code Here

    // Generate DI
    BpmnAutoLayout bpmnAutoLayout = new BpmnAutoLayout(conversion.getBpmnModel());
    bpmnAutoLayout.execute();
   
    // Deploy
    repositoryService.createDeployment()
      .name(processDefinition.getName() + " - task duration report")
      .addString(conversion.getProcess().getId() + ".bpmn20.xml", conversion.getBpmn20Xml())
      .deploy();
  }
View Full Code Here

  public void send() throws Exception {
    Assert.assertTrue(muleContext.isStarted());
   
    ProcessEngine processEngine = ProcessEngines.getDefaultProcessEngine();
    RepositoryService repositoryService = processEngine.getRepositoryService();
    Deployment deployment = repositoryService.createDeployment()
        .addClasspathResource("org/activiti/mule/testVM.bpmn20.xml")
        .deploy();
   
    RuntimeService runtimeService = processEngine.getRuntimeService();
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("muleProcess");
View Full Code Here

    RepositoryService repoSvc = eng.getRepositoryService();
    RuntimeService rtSvc = eng.getRuntimeService();
   
    String wfn = "/diagrams/Wf.bpmn";
    String wffn = wfn+"20.xml"; // workaround for http://forums.activiti.org/en/viewtopic.php?f=8&t=3745&start=10
        DeploymentBuilder db = repoSvc
                 .createDeployment()
                 .addInputStream(wffn,this.getClass().getResourceAsStream(wfn));
   
        Deployment d = db.deploy();
        ProcessDefinition pDef = repoSvc
View Full Code Here

        RepositoryService repoSvc = eng.getRepositoryService();
        RuntimeService rtSvc = eng.getRuntimeService();
       
        String wfn = "/diagrams/GenDiag.bpmn";
        String wffn = wfn+"20.xml"; // workaround for http://forums.activiti.org/en/viewtopic.php?f=8&t=3745&start=10
        DeploymentBuilder db = repoSvc
                               .createDeployment()
                               .addInputStream(wffn,this.getClass().getResourceAsStream(wfn));
       
        Deployment d = db.deploy();
        ProcessDefinition pDef = repoSvc
View Full Code Here

  public ActivitiRule activitiRule = new ActivitiRule();

  @Test
  public void startProcess() throws Exception {
    RepositoryService repositoryService = activitiRule.getRepositoryService();
    repositoryService.createDeployment().addInputStream("MultiInstanceBug.bpmn20.xml", new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
    variableMap.put("users", Arrays.asList(new Object[] {"user1", "user2", "user3"}));
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("MultiInstanceBug", variableMap);
    assertNotNull(processInstance.getId());
View Full Code Here

  public ActivitiRule activitiRule = new ActivitiRule();

  @Test
  public void startProcess() throws Exception {
    RepositoryService repositoryService = activitiRule.getRepositoryService();
    repositoryService.createDeployment().addInputStream("leave-qjsq.bpmn20.xml", new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
    variableMap.put("user", null);
    variableMap.put("users", Arrays.asList("user2", "user3"));
    variableMap.put("userGroup", new ArrayList<String>());
View Full Code Here

  public ActivitiRule activitiRule = new ActivitiRule();

  @Test
  public void startProcess() throws Exception {
    RepositoryService repositoryService = activitiRule.getRepositoryService();
    repositoryService.createDeployment().addInputStream("helloworld.jpdl.xml", new FileInputStream(filename)).deploy();
    List<Deployment> list = repositoryService.createDeploymentQuery().list();
    assertFalse(list.isEmpty());
    for (Deployment deployment : list) {
      System.out.println(deployment.getName());
    }
View Full Code Here

  public ActivitiRule activitiRule = new ActivitiRule();

  @Test
  public void startProcess() throws Exception {
    RepositoryService repositoryService = activitiRule.getRepositoryService();
    repositoryService.createDeployment().addInputStream("EventSubprocess.bpmn20.xml", new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
    variableMap.put("name", "Activiti");
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("EventSubprocess", variableMap);
    assertNotNull(processInstance.getId());
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.