Initialize Users and Groups in H2 Database when the camunda app is deployed

Hi all, I’d like to know how can I initialize users and groups with some values when we deploy the camunda application and run it for the first time. Is there any way we seed the H2 database with some value. Would appreciate if you could share some guideline/tutorial to look into.

Thanks in advance.

Whats the purpose of the requirement?

1 Like

Thanks Niall for your quick reply. We have an upcoming demo on Sunday. we have created a docker image and would like to show the working bpmn process in a demo.

In order to run the demo, we need 4 different users who belongs to 4 different usergroups so, each user will receive an email notification to complete their user task. We want this user adding process to be automatic otherwise we’ll have to add them manually before the demo. Thanks

Ok sure, so the invoice example actually does this.
It has a DemoDataGenerator.java class which creates the users and it’s called by the InvoiceProcessApplication.java when the application starts up. You could probably reuse a lot of that.

1 Like

Thanks appreciated Niall. Is there any way we could create filters automatically whenever we deploy the bpmn process?

This code also creates filters in the same way.

1 Like

Thanks, awesome. appreciate it.