Can't get forms to deploy as part of application exported from Modeler

I have used Workflow Modeler to create an application with a workflow and a form. I exported this app to a zip file, which I’m now trying to deploy programmatically (in my case in a Spring Boot app). The app deploys and the workflows seem to be imported, but not the forms. When I call this, I get an empty list back:

formRepositoryService.createFormDefinitionsQuery().list()

I’ve tried both explicitly deploying the app (repositoryService.createDeployment...) and having it automatically done by putting the “.bar” file in the /resources/apps folder. The result is the same in both cases.

I had a look at the exported zip and, as expected, it contains two folders: bpmn-models and form-models. In the latter folder there are two files for my form: test-form-1.json and test-form-1.png.

Stepping through the code, I found that in FormDeployer.deploy it looks for resources whose name ends with .form. However the zip file exported by the Modeler app doesn’t contain any .form files - there’s only the .json and .png file for each form.

Am I doing something wrong, or is there a small bug here?

UPDATE: I’ve now managed to get this working in a slightly different way, by specifying a custom value for the flowable.modeler.app.deployment-api-url setting in the Modeler app. I gave it this value: http://localhost:8079/app-api, where 8079 is the port I’m running my custom Spring Boot app on. That app-api endpoint is enabled in the Spring Boot app by adding a dependency on flowable-spring-boot-starter-rest. So it looks like when the Modeler app publishes an app it does something different from when it exports an app (looks like the file extensions are .form when doing a publish, but .json when doing an export, I think). Is this a bug, or is this behaviour by design?

Thanks.

The flowable-modeler application has 2 ways of exporting an app.

As deployable bar file

21

Clicking this creates a bar file which is the same resource that is used when doing a publish.

App definition as zip file

33

Clicking this creates a zip file which can be used to perform an import of an app within the flowable modeler

So it looks like when the Modeler app publishes an app it does something different from when it exports an app (looks like the file extensions are .form when doing a publish, but .json when doing an export, I think). Is this a bug, or is this behaviour by design?

Your analysis is correct and this is by design.

Hope this clears the confusion. We should probably add this to our documentation as well.

Cheers,
Filip

Seems like this is already in the documentation in the Flowable UI Modeler section to be more precise.

The first download button (with the arrow pointing downwards) can be used to download the app definition with the JSON model files for each included model. This makes it easy to share app definitions between different Flowable Modeler applications.

The second download button (with the arrow point to upper right) will provide a BAR file of the app definition models, which can be deployed on the Flowable engine. In the BAR file, only the deployable artifacts are included, such as the BPMN 2.0 XML file and the DMN XML file, and not the JSON model files.

Perfect! Thanks @filiphr. That all makes perfect sense. Apologies for missing that bit in the documentation.