c# - Programmatically Cancel a SharePoint Workflow -


I have not been able to see a user name like a workflow in a workflow. If the user does not exsist, I am going to inform the administrator of an email on this, log in the workflow history and then finish the workflow.

The question is, how do I end the workflow, from inside the workflow, like I was clicking on the 'End workflow' button on the SharePoint webpage. [Update] I have tried SPWorkflowManager.CancelWorkflow () which actually rejects the workflow but what happens to the code to cancel not running immediately, but then the next task My workflow continues to make and then gets flown when the next task is done on the task-linked activity. Only once he is asleep, the workflow is over, cancel the workflow, not when it's called.

This causes a clear problem that I do not want to be made the next task, I'm calling CancelWorkflow because I want it and then cancel it.

There are some suggestions on this MSDN thread:

Here's a blog post that holds accurate information exactly:

Finally, and most especially, you need to use the static method: < / P>

Edit

The Cancel workflow is a static class, so I am modifying the call.


Comments

Popular posts from this blog

c++ - Linux and clipboard -

What is expire header and how to achive them in ASP.NET and PHP? -

sql server - How can I determine which of my SQL 2005 statistics are unused? -