Loop event with exit condition help

Hi, We just started exploring camunda for simple PoC. In our process, we want to have a loop event that keeps checking the database for some data. If the data is available then move to the next step in the process. Can anybody help me with, how to model it and how to handle in the java code. Please.

Assuming you’ve already written the code to get the data from the database you want to access then you could use this pattern
https://cawemo.com/share/49dd66da-cf64-4165-b198-4576d621c86c

But there are a lot of other options as well.

Hi Niall, THank you so much for the help. By anychance, can I get the XML of the model with the property details for the timer and conditional events. greatly appreciate your help.

The process uploaded is a hard-coded version of what you’re looking for. it waits for 2 minutes, then the variable is set and it continues.
simpleLoop.bpmn (6.4 KB)

Hope it helpls