Hi
I have been looking at this problem for a large part of the day and i'm completely stumped!
I have created a state machine workflow exposed as a web service. On the initial state I have an event driven activity which contains a WebServiceInput activity and a WebServiceOutput activity. This all works fine.
As an initial test on how to handle a WorkflowAuthorizationException I have set up the roles on the WebServiceInput activity to ensure that an authorization exception will be thrown. My problem is that I don't want the workflow to be terminated when a workflow authorization exception occurs. Instead I want a soap exception to be sent back to the client indicating an authorization exception and the workflow should remain at the same state. To me, this sounds like a very common requirement. Adding a WebServiceFault to a FaultHandler in the FaultHandlers for the EventDriven activity does not work.
I thought this was going to be easy... but by the end of the day i'm still pulling my hair out! Am I missing something here
Any help would be greatly appreciated.
Duncan

WorkflowAuthorizationException thrown from a WebServiceInput activity terminates the workflow
Jehan Badshah
Hi Tom,
Thanks for the reply, but, how will the runtime ever reach this IfElseActivity if a WorkflowAuthorizationException is thrown during processing the WebServiceInput activity The normal EventDriven sequence will exit and if not caught this will terminate the workflow.
Duncan
Don Golden
Can anyone reply to this Seriously, if i'm being dumb here please let me know, but if the only option for an authorization exception is termination of the workflow then I can't use this mechanism at all...
Also, let me qualify my above posts with: If the workflow were a sequential workflow I could solve the problem (maybe not elegantly) by wraping the WebServiceInput in a Sequence and adding a FaultHandler that sets a flag, after the Sequence i'd add an IfElse checking this flag with a WebServiceOutput and WebServiceFault in each branch.
Ranier
Marking Tom's post as answer since the discussion is continued on the following thread.
http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=939508&SiteID=1
Woyler
rayms