AnsweredAssumed Answered

How to handle mail host unavailability exception

Question asked by lossril on Jul 27, 2016
Latest reply on Jul 27, 2016 by hari
We've got my e-mail server settings configured for the Activiti webapp we're using and mail tasks are doing fine, but there's a problem.

Sometimes it goes offline (our admins are doing some maitenance from time to time) and if Activiti tries to send an e-mail when the server is unavailable, webapp throws an exception and does a rollback to the last usertask, throwing an exception originating to Apache Commons Mail classes - you can see the stack trace in the attachment file. It does not happen frequently but we need a way to handle it properly.

Is there a way to handle this exception correctly and without those nasty rollbacks? Does boundary error event on the mail task catch it? I've found out that there is a field 'ignoreException' in mail task description which may be set to 'true' and the exception will be ignored but this makes failure handling complicated - in the case I should check the variable with failure message and litter BPMN definitions. Does Activiti have some system-wide setting on ignoring email failures?