All process monitoring in one cockpit - with multiple processes deployed as sprint boot micro-services with different DB schemas and embedded camunda engine

Hello, we are using spring boot camunda engine for developing different micro-services, each having its own bpmn process. Each process (micro-service) has its own db schema. Because of this, we don’t have a view of all running process instances on a single cockpit, as each micro-service(process) will have its own cockpit. What will be the best view to get all process views on the same cockpit ? What kind of customisation is required for this ?

Hi,

One way you could do this is to deploy a standalone cockpit for monitoring purposes. Then you would need to configure multiple engines and multiple datasources such that your cockpit can connect to all the DBs. You effectively end up with the equivalent of a multi-tenant deployment. You wont see everything on a unified dashboard, but you could add a script to cycle through the engines…

This section of the user guide shows the multi-tenant concept for engines. You can use a similar approach for a standalone cockpit deployment for monitoring…

regards

Rob

Hi Rob,
Thanks for the reply. As per above article, various process engine configuration is done inside camunda wildfly distribution. Is there any example, which shows multiple process-engine configuration in a standalone web application, which can be deployed on any server ? Also, by writing a scritp to cycle through the engines, can we have a unified dashboard showing all processes from all the process-engines ?

Hi,
Ive done this on Tomcat. In the Tomcat config, I had to configure multiple Datasources. Then in the Camunda config, I had to configure multiple engines, each one associated with its particular Datasource instance…

Note this will not give you a common overlay across all the engines, it just gives you a single point of access. To produce a unified view, you could;

  • Have a look at Optimize to see if that could meet your requirement.
  • Write your own dashboard and use REST API to populate.
  • Use activity/execution listeners to publish events to an external tool.

regards

Rob

Hi Rob,

Thanks for the response.
If we use camunda-bpm-tomcat and specify all data sources there to view all running process engines, will it be possible to modify process instances from that cockpit, which will come for a particular tenant from drop-down ? Also, will it be possible to modify running process instance from Optimize?

One more question different than this is, if I have 5 micro-services running with camunda embeded engine using same data source, I can see all process-instances from one of the cockpit out of 5 micro-services, but as soon as I try to do instance modification, it gives unknownPropertyError with the name of delegate class. So, instance modification must be done from application’s own cockpit only ?

Hi,

will it be possible to modify process instances from that cockpit, which will come for a particular tenant from drop-down ?

Yes, because for all intents and purposes its a dedicated cockpit…

Also, will it be possible to modify running process instance from Optimize?

No - Optimize works off history data and is really an analytic application.

but as soon as I try to do instance modification, it gives unknownPropertyError with the name of delegate class. So, instance modification must be done from application’s own cockpit only ?

Not sure about this one - it could be a classloader issue. If you are running cockpit on a node other than where you have deployed your process, and process instance modification triggers some processing in your user thread, then I could anticipate a class not found exception. Can you describe your scenario a little more?

regards

Rob

Hi Rob,

Thanks for the reply.
Regarding this,

will it be possible to modify process instances from that cockpit, which will come for a particular tenant from drop-down ?

Yes, because for all intents and purposes its a dedicated cockpit…

I have tried following approach

  1. I have two spring boot micro-services A and B

  2. H2 database is configured inside micro-service A like this
    spring.datasource.url=jdbc:h2:mem:camunda-db-utility;
    micro-service B is referring to h2db of micro-service A only like this - spring.datasource.url=jdbc:h2:tcp://localhost:9093/mem:camunda-db-utility;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE This is to replicate the scenario where there will be one schema shared by multiple micro-services.

  3. In camunda-bpm-tomcat, following is the configuration inside bpm-platform.xml file

    default
    org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration
    java:jdbc/ProcessEngine2

    full true true true 00:01 org.camunda.bpm.application.impl.event.ProcessApplicationEventListenerPlugin org.camunda.spin.plugin.impl.SpinProcessEnginePlugin org.camunda.connect.plugin.impl.ConnectProcessEnginePlugin

and in server.xml resource is defined like this

When I run camunda bpm tomcat and switch to Utility process engine, it shows be two processes out of micro-service A and B. If I start process B, and if it fails at some point and I try to modify process instance form cockpit of camunda tomcat, it gives UnknownPropertyError on delegate class. But that delegate class is part of that micro-service only. does that prove that process instance modification only works from individual cockpits ? (due to XML structure some text is not coming properly)