Quantcast
Channel: SharePoint 2010 - Development and Programming forum
Viewing all articles
Browse latest Browse all 11508

Exit Workflow when Custom Activity throws an exception

$
0
0

I have created some custom activities and added to SPD Workflow.  They are working as expected.  However, when the code in the custom activity throws an exception the remaining steps in the Workflow always continue to execute.  How to I stop the workflow from continuing.  If exception happens - just need the Workflow to stop/exit.  

I have the code wrapped in a try/catch block.  I am logging the exception.  

Code snippet:

try {
	...doing stuff
}
catch (Exception ex) {
	Exception error = new Exception("failed ...", ex);
	this.LogError(...);
}
return ActivityExecutionStatus.Closed;



Viewing all articles
Browse latest Browse all 11508

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>