Camunda external databse

Hello eveyone,
How I can interact with Camunda’s external Database?
I want to select and update attribute value in Camunda’s Database, it is possible to that by using camunda-external-task-client
or by using any other mechanism?

Hey @Yazan!
Are you referring to Camunda 8 or 7?
When you use Camunda 7 you do have the possibility to run any queries against the database. The db schema is described here: Database Schema | docs.camunda.org

The task client implementation you have reference is also only valid for Camunda 7.
You could use this mechanism to manipulate Camunda’s database - Is there any specific reason you want to do so?

Let me know if I understood you right. I am happy to pivot the conversation to C8 as well. :slight_smile:
Best,
Thomas

Hello @Hafflgav
I’am using Camunda 7 and I would to run queries aganist the database, where can I do that? where can I write the query?
I would be happy if you can help me?

Hey @Yazan!
When you typically run Camunda 7 it requires a database. If you haven’t specified anything by default it is going to use a H2 in memory database.

Per default you would specify a jdbc connection in your spring-boot project like this: jdbc:h2:mem:testdb

Which Camunda 7 distribution are you currently using? (e.g. an embedded engine, Camunda 7 Run, prepackaged Tomcat or the docker image)
This information will help me to guide you through the process of connecting to the database. :slight_smile:

-Thomas

Hello @Hafflgav
Actully I’am using Camunda 7 Run
Can you help me please how can connect exteranl database?
I don’t know any thing about that!
Another question please, in database H2 user can generate a custom tables. It is possible to instert Camunda tasklist’s valuse to these table? meaning can I connect these tables to Camunda Cockpit and Tasklist?
Thank you very much

Hello @Hafflgav
Actully it is camunda-bpm-ee-wildfly-7.17.0-alpha2-ee
Thank you

Hey @Yazan!
Sorry for the delay - I had some time off.

You can open the H2 Console via http://localhost:8080/h2/h2.
Once you have done this make sure you set the JDBC URL to jdbc:h2:./camunda-h2-dbs/process-engine.
Having done so you only need to use the user and password sa and you should be able to connect successfully.

Let me know if this works for you!
Best,
Thomas

Hello @Hafflgav

Yes it is works, I succussed to open H2 console,

in this console I can create a new table addition to tables that are built in, is there any way that I can connect the table that I created with Camunda Tasklist and Camunda Cockpit? meaning can I insert and get back values from these table?

Thank you very much,

Exactly @Yazan,
You can create some more tables in there. :slight_smile:
But if you are using this in an operational setup my recommendation is to keep the domain and runtime database separate.

I can recommend checking out this best practice about handling data in processes:

1 Like