May times we want to terminate the workflow from list Item.
Here is a way you can accomplish this :
Let's say you are working with the workflow and workflow is attached with the list. So change in the list item triggers the workflow, then the following code will remove the workflow instance on that Item.
workflowProperties.Site.WorkflowManager.RemoveWorkflowFromListItem(workflowProperties.Workflow);
That's it. Your job is done.
Thank you
No comments:
Post a Comment