When an exception handler manual task is cancelled or completed in MDWHub, this automatically resumes the main flow activity that caused the fallout. Sometimes the main flow has already been proceeded manually from within MDWHub. In this case, the manual task causes unwanted duplicate flow, which should be avoided.
Specifically, if the main flow activity latest instance status is Completed or Cancelled, flow should not be re-resumed, and a message to that effect should be logged.
To make sure that the Proceed action is covered, we'll also change Proceed to set the activity instance status to cancelled and set end date.
When an exception handler manual task is cancelled or completed in MDWHub, this automatically resumes the main flow activity that caused the fallout. Sometimes the main flow has already been proceeded manually from within MDWHub. In this case, the manual task causes unwanted duplicate flow, which should be avoided.
Specifically, if the main flow activity latest instance status is Completed or Cancelled, flow should not be re-resumed, and a message to that effect should be logged.
To make sure that the Proceed action is covered, we'll also change Proceed to set the activity instance status to cancelled and set end date.