Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I have a workflow that converts a docx to pdf then does some more processing on the document.

I would like to kill/terminate/cancel the workflow if the conversion fails but I am not sure the best way to do this. Do I just throw an exception and let that kill the workflow? I would like to leave a useful message in the history other than "Error Occurred" that could help with debugging.

I have a couple other areas in the code where I would also like to be able to kill the workflow and leave a useful History message and outcome.

Is there a good way to do this?

share|improve this question

1 Answer 1

I actually try to handle the exception first and write some meaningful event log otherwise I let it bubble. Check out these links and decide a method most suitable for you -

MSDN Description of Workflow Fault Handling

Fault Handling in SharePoint Workflow

Example of error handling and writing event logs in SharePoint Workflow

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.