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
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.