We are facing an issue where we would like to somehow make Docentric email engine to continue processing remaining invoice instead of erroring out due to an incorrect email, and not sending remaining invoices in the batch queue?
When sales order invoices are posted in batch and one of the customer’s contact email addresses with purpose “Invoice” contains a typing error (e. g. “someone@domain**;**.com” - semicolon in the email address), the Docentric ISV solution throws an error message:
Selected print destination settings (Email) are not valid.
An error occurred when running report [ReportName] in batch. Contact your system administrator for more information.
Batch task failed: An error occurred when running report [ReportName] in batch. Contact your system administrator for more information.
Upon this error message, the printing of all following sales order invoices in the same batch posting job is stopped, while all invoices are still posted, leading to some of the posted invoices not being sent to the customer account’s invoice email address and queries by customers and the internal accounts receivable and sales teams on the missing invoices.
Attached the infolog of a batch job that processed 157 invoices - while the batch job was running, the 147th of the invoices posted ran into an error with an email address with an invalid syntax, which leads to the 10 following invoices not being sent via email.
Currently, around 15 to 30 invoices per week are not being sent to customers and internal AR team email recipients.
We have already encountered this issue. This behaviour is the standard behaviour and is not in any way related to Docentric.
If you post invoices from an interactive session (GUI) the execution will continue on the next document if the error occurs. But, while posting invoices in batch, the execution will stop on the first error and the batch task End multithread posting will go into the Error status. Please note that this is standard behaviour and has nothing to do with Docentric.
However, there is a feature on Docentric roadmap to help our customers troubleshoot this. We are designing a setup that will let users choose what to do in such cases: whether to continue with the batch process on the error or not, or to send an email to the administrator, log the error, etc. All this functionality will be tightly related to the Docentric Report Log feature, so the error will actually be logged into a database.
Additionally, we have improved error messaging in batch and enabled an easier way to continue with batch process after an error occurs. This solution is already available in the latest version of Docentric.
Or, you can add the following extension to change current behaviour and to continue execution in batch after an error:
[ExtensionOf(classStr(SrsReportRunController))]
final class SrsReportRunController_DC_Extension
{
protected void displayReportRunException(System.Exception ex, boolean displayGenericMsg)
{
boolean origIsInBatch = isInBatch;
isInBatch = false;
next displayReportRunException(ex, false);
isInBatch = origIsInBatch;
}
}
This ensures that the execution is continued after an error and that the batch task End multithread posting is completed with the status Ended.
In my opinion, your case is more related to data management, so you might want to consider some validation when entering email addresses for customer contacts.
Hi Peter, thank you for your question and welcome to Docentric forum!
You can access the Exceptions form by manually entering the URL of your environment with the extension f=SysExceptionTable (the highlighted part of the URL address in the screenshot below).