You are viewing limited content. For full access, please sign in.

Question

Question

Is there a way to throw an error when an email service task suspends?

asked on July 22, 2021 Show version history

Basically what the title asks: Is there a way to throw an error when an email service task suspends?

I know when an email task suspends we can retry, skip or terminate but that does not make it so I have a way to capture within the process and set variables on the forms to indicate that the email was able to be sent or not.

0 0

Replies

replied on July 22, 2021

It depends on what you're trying to accomplish. In most cases, when an email fails to send it is because of a temporary issue communicating with the email server that will be resolved by a retry.

Other things like trying to use an empty variable can cause the task to suspend, but that is something you can check before the email task using gateways.

However, if you really want to catch the email errors and just move on rather than retrying, then workflow would be your best bet because you could put an email activity in a try-catch and send the results back to the forms process as long as you set the form to wait for the workflow to complete.

1 0
replied on July 22, 2021

Yeah I have worked up a workflow with a try catch but was hopeful there would be a way to simply catch the 'suspend' error within forms. For us the largest issues with emails suspending is when an employee that was to be notified is no longer an employee and therefor no longer has an active AD account.

Here is what I got for the workflow. The "Set Business Process Variables.." sets a date variable for when the email was sent and a single line variable saying "Email Sent by Laserfiche". Of course sending an email does not guarantee they got and read it. Such as, we don't get notices if their mailbox is too full to Email Sent by Laserfiche new emails.

0 0
replied on July 22, 2021 Show version history

Are you trying to send the email to the user account, or the initiator email? Based on what you described, it sounds like you were targeting the account, so once the employee is gone that account would be invalid and the task would suspend because Forms can't retrieve the email address from an account that no longer exists.

However, if you're syncing your users to LFDS/Forms then their email address should be an accessible variable on the starting form.

With that in mind, you could store the email address at the beginning, use that variable in the email task instead of the user account, then there is no need for the account to exist because it would already have an address to use.

Of course they wouldn't actually receive an email, but sending to an address that no longer exists shouldn't suspend the task in the same way as trying to retrieve the email for a user that no longer exists.

1 0
replied on July 22, 2021

We are using their AD user names, and it will not be limited to only the initiator getting the email. We use it for approvals. Basically a user (that is one of our employees) will initiate a process filling out a form. Then it goes to approvers that are selected based on how the initiator fills out on the form. Depending on how long it takes for the approval process to happen, sometimes the initiator or even others that need notifications along the process are no longer employees. What happens then is the process suspends.

 

What I wish we could do is have forms be able to capture the fact that there is something wrong with the email(AD user name) and instead of suspending throw an error that then we can capture in the process and reroute either to have someone choose a new person to receive that email or to simply move on because it does not need to email a now non-employee. It would be nice to not have to manually go in and skip those email tasks that suspend because the person is no longer an employee. 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.