I created a sample app (from here https://paulhh.wordpress.com/category/flowable/) using flowable-modeler UI app. Then I exported it as a BAR file. The bar file contains 1 bpmn and 4 forms.
I’m trying to deploy and control programmatically this app from my Spring Boot app.
- I did deployment this way:
String barFilePath = “C:\Users\Software3\Downloads\Gig App.bar”;
ZipInputStream inputStream = new ZipInputStream(new FileInputStream(barFilePath));
AppDeployment appDeployment = appRepositoryService.createDeployment()
It seems it is deployed just fine, I can see in the log:
o.f.a.engine.impl.deployer.AppDeployer : Processing app resource gigapp.app
o.f.e.c.impl.deployer.BpmnDeployer : BpmnDeployer: processing resource gigplan.bpmn
o.f.engine.impl.bpmn.parser.BpmnParse : Following warnings encountered during process validation: [Validation set: ‘flowable-executable-process’ | Problem: ‘flowable-exclusive-gateway-seq-flow-without-conditions’] : Exclusive gateway has at least one outgoing sequence flow without a condition (which isn’t the default one) - [Extra info : processDefinitionId = gigplan | processDefinitionName = Plan a gig | | id = sid-1CFFE4C0-E0CE-4C4D-8F4A-D4ABD14CD3EF | | activityName = Over 2k | ] ( line: 16, column: 84)
o.f.form.engine.deployer.FormDeployer : FormDeployer: processing resource form-transportBooking.form
o.f.form.engine.deployer.FormDeployer : FormDeployer: processing resource form-getgigdetails.form
o.f.form.engine.deployer.FormDeployer : FormDeployer: processing resource form-gigregion.form
o.f.form.engine.deployer.FormDeployer : FormDeployer: processing resource form-stadiumbooking.form
- Then I start process instance like this:
String processDefinitionId = “gigplan”;
ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processDefinitionId);
no errors in the log
- Then I am trying to render start form:
Object renderedForm = formService.getRenderedStartForm(processInstance.getProcessDefinitionId());
I’m getting exception;
Caused by: org.flowable.common.engine.api.FlowableObjectNotFoundException: Form with formKey ‘gigregion’ does not exist
However the form seems to be deployed previously on step 1.
What am I missing?
Could it be that I’m doing something that is not supported? I can see that the same app works just fine within flowable-task UI app. However I need to incorporate forms and flow inside existing webapp codebase and I need to have precise control on how forms are rendered and incorporated in existing app. Please point me out that it might be impossible or problematic using the flowable.
Thanks in advance.