Embedding webapp into project with embedded process engine

Hello,

I have been working on a project with embedded Camunda engine. I would like to add the possiblity to use camunda webapp for its cockpit and admin functionality. I was hoping to include camunda-webapp-webjar for that. But I could not find out how to use it and I am starting to think is not the right way to go. I would like to have the webapp as a module in ear which contains other modules out of which the application composes. I am running this application on Glassfish which is fine for the embedded engine. Is it going to be fine even for the web app?

Please could you give me an advice of how to properly solve this problem?

Thank you
Adam

Hi @Adam_Klima,

as I understand your question, you would like to package your application with an embedded engine and a cockpit/tasklist.

You can use the standalone-webapp as a starting point and use maven overlay to add your processes/java classes to the project. See https://github.com/berndruecker/camunda-standalone-webapp-reconfigured for more details.

Hope this helps, Ingo

1 Like

Hello @Ingo_Richtsmeier,

thank you for your answer, which helped me to get into it. At the end I was able to achieve my goal with the webjar after all. I had to change camunda-webapp-webjar structure a bit (which I already found as a issue in JIRA) so I created my first camunda pull request :grinning: (hope it goes well). For the webapp to be aware of my embedded process engine I had to add \WEB-INF\classes\META-INF\services\org.camunda.bpm.engine.rest.spi.ProcessEngineProvider with a value org.camunda.bpm.engine.rest.impl.application.ContainerManagedProcessEngineProvider and proper web.xml which I mostly copied from original webapps web.xml and only made a small change.

With this setup I am able to use my embedded process engine both in my custom JSF based app and using Camunda webapp at the same time.

Hope it will be helpful for others.

Adam

Hi Adam,
i would like to know, how do you link to the letsay tasklist page in your JSF app?

I am not sure if my problem which I solved above is the same as you are facing. What I needed to achieve was to include webapps into EAR package of Java EE/JSF application with embedded process engine. Mainly for the purpose of being able to use cockpit to monitor running process instances. But I managed to be able to use JSF task forms both in tasklist and custom jsf pages without much hassle.

The camunda webapps package which I included into my EAR is realy simple and all you need to do is described in my previous post. This way you will be able to access webapps in your desired contextpath. My pull request with the fix was merged since then so all what is needed now is use the camunda-webapp-webjar.