tsgrp / OpenContent

TSG's Web Services for ECM Repositories
8 stars 4 forks source link

Workflows Get Stuck in Pending Approval or In Review when Email Fails to Send #41

Open benallenallen opened 10 years ago

benallenallen commented 10 years ago

Workflows are "stuck" in "Pending Approval" or "In Review" state but user does not have the ability to complete/cancel the route.

Cause: An email server occasionally does not respond in a timely manner, so there is a thread that hangs that prevents the Activiti database transaction from being commit.

Solution Options:

  1. Update the OC Email Impl code with a proper "timeout" for the email server so that if this edge case does occur we properly handle by completing the thread. This would require us to "swallow" any exceptions being thrown from the email server. We then deem the failure to send an email as a "non-fatal" error that would not require us to to stop the whole process of the workflow and rely on the fact that users have a "dashboard" to see their tasks.
  2. Update the Activiti code to handle proper transactions to roll back any audits/lifecycle promotes when the email fails to send.

Any plan of attack requires that issue #40 be addressed first

gsteimer commented 10 years ago

It may also be good to have a "Reset to Draft" action. Basically - if a form does get stuck in a workflow state, but no workflow exists, then a new action appears to reset the forms and controlled docs back to Draft so the user can continue on...