Search in sources :

Example 66 with Deployment

use of org.activiti.engine.repository.Deployment in project bamboobsc by billchen198318.

the class TestBPMN001 method deployment.

@Test
public void deployment() throws Exception {
    InputStream inputStreamBpmn = new FileInputStream("/home/git/bamboobsc/core-doc/DFProjectPublishProcess.bpmn");
    InputStream inputStreamPng = new FileInputStream("/home/git/bamboobsc/core-doc/DFProjectPublishProcess.png");
    RepositoryService repositoryService = (RepositoryService) AppContext.getBean("repositoryService");
    Deployment deployment = repositoryService.createDeployment().name("DFProjectPublishProcess-flow").addInputStream("DFProjectPublishProcess.bpmn", inputStreamBpmn).addInputStream("DFProjectPublishProcess.png", inputStreamPng).deploy();
    System.out.println("ID: " + deployment.getId() + " , Name: " + deployment.getName());
}
Also used : FileInputStream(java.io.FileInputStream) InputStream(java.io.InputStream) Deployment(org.activiti.engine.repository.Deployment) FileInputStream(java.io.FileInputStream) RepositoryService(org.activiti.engine.RepositoryService) Test(org.junit.Test)

Aggregations

Deployment (org.activiti.engine.repository.Deployment)66 ProcessInstance (org.activiti.engine.runtime.ProcessInstance)12 BpmnModel (org.activiti.bpmn.model.BpmnModel)10 CloseableHttpResponse (org.apache.http.client.methods.CloseableHttpResponse)10 JsonNode (com.fasterxml.jackson.databind.JsonNode)8 ByteArrayInputStream (java.io.ByteArrayInputStream)8 ActivitiException (org.activiti.engine.ActivitiException)7 ProcessDefinition (org.activiti.engine.repository.ProcessDefinition)6 HttpGet (org.apache.http.client.methods.HttpGet)6 Test (org.junit.Test)6 ArrayList (java.util.ArrayList)5 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)4 InputStream (java.io.InputStream)3 HashSet (java.util.HashSet)3 BpmnXMLConverter (org.activiti.bpmn.converter.BpmnXMLConverter)3 ActivitiObjectNotFoundException (org.activiti.engine.ActivitiObjectNotFoundException)3 ProcessEngine (org.activiti.engine.ProcessEngine)3 RuntimeService (org.activiti.engine.RuntimeService)3 DeploymentBuilder (org.activiti.engine.repository.DeploymentBuilder)3 Task (org.activiti.engine.task.Task)3