Package org.activiti.engine

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


                    resourceName = resource.getFilename();
                }
            }

            try {
                DeploymentBuilder deploymentBuilder = repositoryService
                        .createDeployment().enableDuplicateFiltering()
                        .name(resourceName);

                if (resourceName.endsWith(".bar")
                        || resourceName.endsWith(".zip")
View Full Code Here


    public String deploy(@RequestParam("xml") String xml) throws Exception {
        RepositoryService repositoryService = processEngine
                .getRepositoryService();
        ByteArrayInputStream bais = new ByteArrayInputStream(
                xml.getBytes("UTF-8"));
        Deployment deployment = repositoryService.createDeployment()
                .addInputStream("process.bpmn20.xml", bais).deploy();
        List<ProcessDefinition> processDefinitions = repositoryService
                .createProcessDefinitionQuery()
                .deploymentId(deployment.getId()).list();
View Full Code Here

        BpmnModel model = new BpmnJsonConverter().convertToBpmnModel(modelNode);
        bpmnBytes = new BpmnXMLConverter().convertToXML(model);

        String processName = modelData.getName() + ".bpmn20.xml";
        Deployment deployment = repositoryService.createDeployment()
                .name(modelData.getName())
                .addString(processName, new String(bpmnBytes, "UTF-8"))
                .deploy();
        modelData.setDeploymentId(deployment.getId());
        repositoryService.saveModel(modelData);
View Full Code Here

  public ActivitiRule activitiRule = new ActivitiRule();

  @Test
  public void startProcess() throws Exception {
    RepositoryService repositoryService = activitiRule.getRepositoryService();
    repositoryService.createDeployment().addInputStream("DymaticForm.bpmn20.xml", new FileInputStream(filename)).deploy();
   
    ProcessDefinition processDefinition = repositoryService.createProcessDefinitionQuery().processDefinitionKey("DymaticForm").latestVersion().singleResult();
    FormService formService = activitiRule.getFormService();
    StartFormData startFormData = formService.getStartFormData(processDefinition.getId());
    assertNull(startFormData.getFormKey());
View Full Code Here

  public ActivitiRule activitiRule = new ActivitiRule();

  @Test
  public void startProcess() throws Exception {
    RepositoryService repositoryService = activitiRule.getRepositoryService();
    repositoryService.createDeployment().addInputStream("TimeBoundaryIntermediateEvent.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("TimeBoundaryIntermediateEvent", variableMap);
View Full Code Here

  public void startProcessWithJob() throws Exception {
    ProcessEngineConfiguration createStandaloneInMemProcessEngineConfiguration = StandaloneInMemProcessEngineConfiguration.createStandaloneInMemProcessEngineConfiguration();
    createStandaloneInMemProcessEngineConfiguration.setJobExecutorActivate(true);
    ProcessEngine processEngine = createStandaloneInMemProcessEngineConfiguration.buildProcessEngine();
    RepositoryService repositoryService = processEngine.getRepositoryService();
    repositoryService.createDeployment().addInputStream("TimeBoundaryIntermediateEvent.bpmn20.xml",
        new FileInputStream(filename)).deploy();
    RuntimeService runtimeService = processEngine.getRuntimeService();
    Map<String, Object> variableMap = new HashMap<String, Object>();
    variableMap.put("name", "Activiti");
    ProcessInstance processInstance = runtimeService.startProcessInstanceByKey("TimeBoundaryIntermediateEvent", variableMap);
View Full Code Here

    TaskService taskService = activitiRule.getTaskService();
    RuntimeService runtimeService = activitiRule.getRuntimeService();
    RepositoryService repositoryService = activitiRule.getRepositoryService();

    // 部署两个流程
    repositoryService.createDeployment().addInputStream("master.bpmn20.xml", new FileInputStream(filename)).deploy();
    repositoryService.createDeployment().addInputStream("business.bpmn20.xml", new FileInputStream(filename1)).deploy();

    // 准备变量
    Map<String, Object> variableMap = new HashMap<String, Object>();
    List<String> users = new ArrayList<String>();
View Full Code Here

    RuntimeService runtimeService = activitiRule.getRuntimeService();
    RepositoryService repositoryService = activitiRule.getRepositoryService();

    // 部署两个流程
    repositoryService.createDeployment().addInputStream("master.bpmn20.xml", new FileInputStream(filename)).deploy();
    repositoryService.createDeployment().addInputStream("business.bpmn20.xml", new FileInputStream(filename1)).deploy();

    // 准备变量
    Map<String, Object> variableMap = new HashMap<String, Object>();
    List<String> users = new ArrayList<String>();
    users.add("user1");
View Full Code Here

  public ActivitiRule activitiRule = new ActivitiRule();

  @Test
  public void startProcess() throws Exception {
    RepositoryService repositoryService = activitiRule.getRepositoryService();
    repositoryService.createDeployment().addInputStream("multiSubProcess1.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("multiSubProcess1", variableMap);
View Full Code Here

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