TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
C# Corner
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Resume a SharePoint 2013 Workflow through CSOM
Lakshmanan Sethu Sankaranarayan
Oct 20
2014
Code
3.1
k
0
0
facebook
twitter
linkedIn
Reddit
WhatsApp
Email
Bookmark
expand
In this Code snippet, we are going to learn about resuming the SharePoint 2013 workflow through CSOM code.
ClientContext spClientContext =
new
ClientContext(
"http://EmployeeSiteCollection/Site"
);
NetworkCredential spCredential = newNetworkCredential (
"UserName"
,
"Pwd"
);
spClientContext.Credentials = spCredential;
Microsoft.SharePoint.Client.WorkflowServices.WorkflowServicesManager spWorkflowServicesManager =
new
Microsoft.SharePoint.Client.WorkflowServices.WorkflowServicesManager(spClientContext, spClientContext.Web);
Microsoft.SharePoint.Client.WorkflowServices.WorkflowInstance spWorkflownInstance = spWorkflowServicesManager.GetWorkflowInstanceService().GetInstance(newGuid (
"workflowInstanceID"
));
var
initiationData =
new
Dictionary<string, object>();
spWorkflowServicesManager.GetWorkflowInstanceService().ResumeWorkflow(spWorkflownInstance);
spClientContext.ExecuteQuery();
Happy SharePointing :-)
CSOM code
SharePoint 2013 Workflow