I am trying to upgrade to Spring Boot 3.1.3 and Java 17 and Flowable 7.0.0. When I build the application and look in the target folder I don’t see the BPMN under /classes. The BPMN is located under src/main/resources/processes
In the logs I see this:
o.f.s.b.ProcessEngineAutoConfiguration : No deployment resources were found for autodeployment
I have also tried to deploy it manually:
@Autowired
private ProcessEngine processEngine;
var repositoryService = processEngine.getRepositoryService();
String nameWithExt = "processes/" + xmlName + ".bpmn20.xml";
Deployment deployment = repositoryService.createDeployment().addClasspathResource(nameWithExt).deploy();
LOGs:
2023-11-10T12:55:49.089-07:00 INFO 46563 — [nio-8082-exec-4] c.c.web.rest.controller.AdminResource : Going to deploy new process definition RecertificationProcess with extension processes/RecertificationProcess.bpmn20.xml
2023-11-10T12:55:49.104-07:00 ERROR 46563 — [nio-8082-exec-4] c.c.web.rest.controller.AdminResource : Error deploying process definition resource ‘processes/RecertificationProcess.bpmn20.xml’ not found
2023-11-10T12:55:49.105-07:00 ERROR 46563 — [nio-8082-exec-4] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path threw exception [Request processing failed: com.comcast.exceptions.FlowableApiError: resource ‘processes/RecertificationProcess.bpmn20.xml’ not found] with root cause
com.comcast.exceptions.FlowableApiError: resource ‘processes/RecertificationProcess.bpmn20.xml’ not found
As mentioned here in the flowable docs, https://www.flowable.com/open-source/docs/bpmn/ch05a-Spring-Boot
Your problem seems to be classpath related. You could also instruct flowable to use a folder for autodeployment by using these properties in your application.properties file.
You can learn more about these properties here. https://www.flowable.com/open-source/docs/bpmn/ch05a-Spring-Boot#flowable-application-properties