Embed workflow modeler in custom spring boot app


#1

Is it possible to embed the workflow modeler into a custom spring boot app? For example if we have an existing app where we want to programmatically work with workflow instances (start them, give users a way of interacting with tasks, etc), but we also want to let certain users edit workflow definitions, so we’d like the lovely workflow modeler UI embedded in our application’s UI. Assuming that’s possible…

… I can see that on Maven Central the UI modules seem to be available, so I’m following the instructions in the documentation, and have created a new spring boot app, with a dependency on flowable-spring-boot-starter. I can hit the .../process-api/repository/process-definitions/ endpoint. I then add a dependency on flowable-ui-idm-rest, because I’ve read in the documentation that all the UI apps depend on the IDM app. Once I do this, any endpoint I try to hit, including the REST one that previously worked, redirects me to a login screen. In here whatever credentials I enter (including admin/test) don’t work: I get “Bad Credentials” in the UI, and nothing logged in the console. I’ve tried with both an H2 DB and a Postgres one. In the Postgres one I can see the tables being created, but the ACT_ID_USER table doesn’t ever get any rows created in it.

I’ve also tried adding a dependency on flowable-ui-idm-app but when I do that my spring boot app fails to start, with a slf4j error (I can provide the full stack trace if required, but I’m not even sure if what I’m doing is possible, or if I’m going the right way about it, so will omit it just now).

I can see that a similar question was asked here but had no answer, and also asked here. In that second link, there’s an answer from 11 months ago stating that you are “thinking of changing the Flowable Task application into a Spring Boot application, but that work still needs to be done.” Am I right in saying that this work has now been done? If so, is there any more information about this somewhere?

Thanks!


Some minor issues with documentation
#2

As far as I understand flowable, the modeler is a different web application that the one that run the engines, provided in the form of war file, or docker image (I don’t know if there are other forms of this webapp), that you could deploy, and use however you want from your main app ui (a link that opens a new tab to edit models, or some fancier way)

Your main app would have your own UI on the frontend, and the background can be based on spring boot starter, and it would be running your process instances, handling tasks, etc, connecting to the same database that the modeler webapp.

IDM web application is given as identification manager, but you can use that webapp or use your own identity implementation.


#3

Thanks @inakihn, that explains it perfectly. So we couldn’t just embed some workflow modeler UI component in our existing app: instead, we’d run the Modeler app alongside it, and provide a link to it from our app in some way. Presumably we could also update the Modeler app’s styling to make it look like it’s still part of our app.

In terms of IDM: is there any documentation about how to plug in our own custom implementation of this component for the Modeler app to use? I can see a post here that discusses this, and says that to completely replace the IDM app is “more involved and it is not very pluggable”. So I presume this means “It’s doable, but not really documented much, and you’ll need to dive into the code and figure it out yourself”?


#4

In terms of identity management, you can see this sample of integration with ldap to get somehow a bit of the idea along with ldap integration from the docs.

But how to modify the modeler war to use same credentials as your own app, so that changing from main ui to modeler ui, I’m afraid I don’t know about that neither.

Your use case looks interesting, looking forward to hearing more about it when progress is made.


#5

Thanks for all the help, @inakihn. I’ll post here if we do progress this and have any info that might be of use to others.