As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
new BpmnAutoLayout(model).execute();
this create a flowchart of horizontal layout,How to dynamically generate a flowchart of vertical layout?
Not sure if I understood the question, could you please explain the use case/question a little bit more so that we can help?
process.addFlowElement(createStartEvent()); process.addFlowElement(createUserTask("task1", "node01", "candidateGroup1")); process.addFlowElement(createUserTask("task2", "node02", "candidateGroup2")); process.addFlowElement(createEndEvent()); process.addFlowElement(createSequenceFlow("startEvent", "task1", "", "")); process.addFlowElement(createSequenceFlow("task1", "task2", "", "")); process.addFlowElement(createSequenceFlow("task2", "endEvent", "", "")); // 2. Generate graphical information new BpmnAutoLayout(model).execute(); // 3. Deploy the process to the engine Deployment deployment = repositoryService.createDeployment() .addBpmnModel(PROCESS_ID+".bpmn", model).name(PROCESS_ID+"_deployment").deploy(); // 4. Start a process instance ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(PROCESS_ID); // 5. Check if task is available List<Task> tasks = taskService.createTaskQuery().processInstanceId(processInstance.getId()).list(); Assert.assertEquals(1, tasks.size()); // 6. Save process diagram to a file InputStream processDiagram = repositoryService .getProcessDiagram(processInstance.getProcessDefinitionId()); FileUtils.copyInputStreamToFile(processDiagram, new File("/deployments/"+PROCESS_ID+".png"));
the code, png show horizontal
i like this
I don't know how to do it
So you probably need to hack your own version of
new BpmnAutoLayout(model)
And probably check this: Activiti/BpmnAutoLayout.java at develop · Activiti/Activiti · GitHub