Email Receiver Task

Hi All,

In camunda how to create email receiver(Reader) task? Need to pull every new email received to inbox.

Code a service task.
It can poll for new emails
On a schedule.

Thanks Niall. But when I restart server how can start mail poller in already started execution?

It depends on how you’ve modeled your process, but I expect a timer event is a good place to start.

Thanks for quick reply.

When I restart server what all are the Historic or Execution Events will be fired for persisted process instance before viewing it in Cockpit?

Can you try explaining the question a little differently, i’m not sure i understand what you’re asking.

Hi Niall,

For exampled I deployed Test1.bpmn diagram with 5 activities from modeler and started an process instance(Ins_A). That process instance completed 2 activities and waiting on 3 activity. Now I want to update some code changes in my application, so I restarted server. While restarting embedded camunda server with my changes, I think ‘Ins_A’ process instance not restored. Whenever I open Cockpit and selecting that instance, that time only process instance is initialised and respective events are fired. In real time no one goes to UI and lookup for all process. How can I overcome this.

Also, is camunda will support adding listeners at runtime?

When you start a process instance it’s persisted in the database, if the database is independent from the container where your engine is then you should be able to shut down and start up the engine without losing any information on the state of your process.

Yes I agree no loss in information. Is camunda really loads process definitions and its instances while starting?

The engine will start picking up and jobs that need to be executed from the database once it starts back up.

Hi @Parthasarathi_Muthai,

here is an old example how to handle mails arriving in an inbox and transfer information to a process instance: https://github.com/camunda-consulting/code/tree/master/one-time-examples/counterparty-onboarding#complete-task-by-email.

In this case, the email refers to a user task, but it could also correlate a message to a receive task.

Hope this helps, Ingo

1 Like