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

Question

Question

Form Stuck in Progress on Email Task

asked on March 29, 2017 Show version history

We had an issue yesterday where we'd noticed the emails for Form processes had stopped processing.  After restarting the services on the server, the emails started working again.  We were not able to determine what had actually caused it to stop working.

However, now, 24 hours later, I notice I have one process that is stuck on an email task step.  Based on the start date of the step, it's showing its been on that email task for about 27 hours now - it was started right around the time we had restarted the service yesterday.

It is showing the task as "In Progress" and doesn't give any options to retry or anything like that.

I don't really want to stop the process if I can avoid it, because this particular form is processed with a LOT of different workflows and database records - it's hard to restart one process without having to restart dozens of others too.

Anyone have any suggestions?

0 0

Answer

SELECTED ANSWER
replied on March 19, 2020 Show version history

Because this issue still comes up from time to time, and it isn't always a situation where you want to terminate the process, I did some investigating into the database and was able to figure out a work-around...

This query will show email tasks that are stuck in this state.

SELECT *
FROM [LFForms].[dbo].[cf_bp_worker_instances] AS wi
JOIN [LFForms].[dbo].[cf_bp_worker_instance_history] AS history ON wi.[instance_id] = history.[instance_id]
JOIN [LFForms].[dbo].[cf_bp_steps] AS step ON wi.[current_step_id] = step.[step_id] AND wi.[current_process_id] = step.[process_id]
WHERE wi.[status] = 3 AND history.[finish_date] IS NULL AND step.[step_sub_type] = 'email'

If these are the same email tasks you are struggling with, then these two update queries will force them into a suspended state.  Once in a suspended state, you can just re-try them from Monitor page in LFForms.

UPDATE [LFForms].[dbo].[cf_bp_worker_instance_history]
SET [status] = 'suspended'
FROM [LFForms].[dbo].[cf_bp_worker_instances] AS wi
JOIN [LFForms].[dbo].[cf_bp_worker_instance_history] AS history ON wi.[instance_id] = history.[instance_id]
JOIN [LFForms].[dbo].[cf_bp_steps] AS step ON wi.[current_step_id] = step.[step_id] AND wi.[current_process_id] = step.[process_id]
WHERE wi.[status] = 3 AND history.[finish_date] IS NULL AND step.[step_sub_type] = 'email';

UPDATE [LFForms].[dbo].[cf_bp_worker_instances]
SET [status] = 11
FROM [LFForms].[dbo].[cf_bp_worker_instances] AS wi
JOIN [LFForms].[dbo].[cf_bp_worker_instance_history] AS history ON wi.[instance_id] = history.[instance_id]
JOIN [LFForms].[dbo].[cf_bp_steps] AS step ON wi.[current_step_id] = step.[step_id] AND wi.[current_process_id] = step.[process_id]
WHERE wi.[status] = 3 AND history.[finish_date] IS NULL AND step.[step_sub_type] = 'email';

 

1 0

Replies

replied on March 29, 2017

On closer examination, I realized that the email step is literally the very last thing to happen before the end event in the form, it's already been archived to the repository, my workflows have all been run, and my database values have all been updated.  So I went ahead and killed the process after all...

It still doesn't explain why it got stuck like that, but I don't need any assistance dealing with it anymore.

0 0
replied on March 29, 2017

Hey Matthew, glad to hear you were able to get it resolved but sorry it had to end like that. My naïve guess would be that due to some timing conflict with the service restarting there was an error queuing the message to send. You might check the LFForms log on the Forms machine at the time when the mail began to stop sending for more clues. If the mailserver in use is administered by your organization and you have access, you might also check if there are any errors in the SMTP logs.

0 0
replied on March 29, 2017

Thanks @████████ - a member of our IT team helped me check those Forms logs and we couldn't find anything that explained it there.  We suspect the initial problem was with our mail server (Office 365), which we do have a lot of access to, but apparently not deep enough access to that we were able to find an explanation. sad

 

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

Sign in to reply to this post.