use of io.automatiko.engine.workflow.bpmn2.BpmnProcessCompiler in project automatiko-engine by automatiko-io.
the class SvgProcessImageGeneratorTest method testGeneration.
public void testGeneration(String processResource) throws IOException {
BpmnProcessCompiler compiler = new BpmnProcessCompiler();
BpmnProcess process = compiler.from(null, new ClassPathResource(processResource)).get(0);
assertThat(process).isNotNull();
SvgBpmnProcessImageGenerator generator = new SvgBpmnProcessImageGenerator((WorkflowProcess) process.process());
String svg = generator.generate();
assertThat(svg).isNotEmpty();
Files.write(Paths.get("target", "test.svg"), svg.getBytes(StandardCharsets.UTF_8));
}
Aggregations