web services - Call Nintex Workflow StartWorkflowOnListItem from client application -


i'll trying start nintex workflow 2010 outside of sharepoint. can't seem find samples on how can call maybe console application. have code samples or knows blogs shows this.

thanks, jimbo

csom workflows api not supported in sharepoint 2010, consume sharepoint workflow web services (soap) purpose.

use workflow.startworkflow method start workflow on item client.

how consume sharepoint workflow web services in visual studio

  • create new console application project in visual studio
  • right click on references , add service reference
  • put in url workflow.asmx service on server example: <web url>/_vti_bin/workflow.asmx , specify namespace name, example workflowsvc

in order sharepoint web services work ntlm authentication please make following changes app.config file.

replace security section from:

<security mode="none">     <transport clientcredentialtype="none" proxycredentialtype="none"         realm="" />     <message clientcredentialtype="username" algorithmsuite="default" /> </security> 

to:

<security mode="transportcredentialonly">   <transport clientcredentialtype="ntlm"/> </security> 

the following code sample demonstrates how start workflow on item:

var workflowclient = new workflowsvc.workflowsoapclient(); workflowclient.clientcredentials.windows.clientcredential = system.net.credentialcache.defaultnetworkcredentials; workflowclient.clientcredentials.windows.allowedimpersonationlevel = system.security.principal.tokenimpersonationlevel.impersonation;  var workflowparameters = "<my:myfields " +                                  "xml:lang=\"en-us\" " +                                  "xmlns:xsi=\"http://www.w3.org/2001/xmlschema-instance\" " +                                  "xmlns:my=\"http://schemas.microsoft.com/office/infopath/2003/myxsd\">" +                                  "</my:myfields>"; var listitemurl = "http://contoso.intranet.com/documents/order.docx"; var wftemplateid = new guid("{0fd3e822-a3b1-45c1-990c-20cb9731e74f}"); var result = workflowclient.startworkflow(listitemurl, wftemplateid, xelement.parse(workflowparameters)); 

Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -