What does WorkflowApplicationInstance.Abandon() do?

138 views Asked by At

With reference to http://msdn.microsoft.com/en-us/library/dd489452(v=vs.110).aspx, I am confused over the use of WorkflowApplicationInstance.Abandon(). According to MSDN, this Abandon() method "Causes the state machine to transition to the abandoned state." My question is what are the valid states of this WorkflowApplicationInstance class and/or the "state machine" as mentioned in the MSDN? What does the "state machine" refer to? Why is there a need to Abandon() an instance which, in fact, is in the process of being brought into memory and run? Thanks.

1

There are 1 answers

0
Simon Taylor On

That documentation is a bit weird. Abandon() throws the instance away (WorkflowApplication.DiscardInstance()) so that someone else can load it. The section of code you're looking at only loads the workflow to get its properties for display, not to run it.