Trigger process by file

How to start a new process with the event signal for this scenario:
every time a xml-file is saved in a folder “inbound” the engine sould launch the process “quality-inspector”.
The listeners do not help, because at that time the process itself does not exist, so no listener exist.
Thanks for any hints on that!
PS: yes of course it’s possible with one process “scheduler” having a single service task and launching that “quality-inspector” process. But I hope there may be a more convinient way :slight_smile:
Thank you!

Hi Peter,

I think that is a use case the camunda-camel community extension may be able to solve.

Also, see this example using the extension that starts a process whenever a file is created:


Hi Thorben!
Thank you! Cheers,

You could watch the directory via java and signal based on filechange detection.

Thank you Jan !

Hi Peter,

Ive also done this with Mule in a few lines. There is a watch folder component build into mule. From that I parse the file using build in parser. For each line item, I call the REST API to start a process instance…

Mule can also move the file into a processed folder etc…



1 Like

So I end up with a simple “WebApp” having ExecutorService with two threads - on for file events one for launching for each file creation a camunda process via REST/JSON. Thanks to Jan and Rob for the initial idea :slight_smile: