cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How does Nintex Workflow get the SharePoint List?

I am trying to get the SharePointTaskId from GetRunningWorkflowTasksForCurrentUserForListItem,

 

But However I am getting Error, (500 Internal Server Error)

 

I tried using Fiddler, It gives me this error.

 

<faultstring>Server was unable to process request. ---> System.ArgumentOutOfRangeException: Cannot find list. Parameter name: listName at Nintex.Workflow.Common.WebServiceHelper.GetList(String listName, SPWeb web) at NintexWorkflowWS.GetRunningWorkflowTasksForCurrentUserForListItem(Int32 itemId, String listName)</faultstring>

 

Here's my code:

              

                int SharePointTaskId;

                WebClient wb = new WebClient();

                wb.Headers.Add("SOAPAction", "http://nintex.com/GetRunningWorkflowTasksForCurrentUserForListItem");

                wb.Headers.Add("Content-Type", "text/xml; charset=utf-8");

                wb.Headers.Add("Content-Length", "length");

                // wb.Headers.Add("User-Agent", "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; Trident/5.0)");              

                var xml = string.Empty;

                var input = string.Empty;

                var payload = string.Empty;

                payload = @"<?xml version=""1.0"" encoding=""utf-8""?><soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xmlns:xsd=""http://www.w3.org/2001/XMLSchema"" xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/"">" + "<soap:Body>" + "<GetRunningWorkflowTasksForCurrentUserForListItem xmlns=\"http://nintex.com/\">";

                input = "<itemId>" + 1 + "</itemId>" + "<listName>" + demoList + "</listName>" + "</GetRunningWorkflowTasksForCurrentUserForListItem></soap:Body></soap:Envelope>";

                xml = payload + input;

                var data = Encoding.UTF8.GetBytes(xml);

                var result = wb.UploadData("http://win8r2sp10/_vti_bin/nintexworkflow/workflow.asmx", data);

                test = Encoding.Default.GetString(result);

                XmlDocument XmlDoc = new XmlDocument();

                XmlDoc.LoadXml(test.ToLower());

                SharePointTaskId = Convert.ToInt32(XmlDoc.GetElementsByTagName("SharePointTaskId").Item(0).InnerText);

Labels: (1)
0 Kudos
Reply
4 Replies
Workflow Hero

Re: How does Nintex Workflow get the SharePoint List?

Hi,

What is the name of your list?

What is the value of demoList?

Regards,

Christophe Raucq

0 Kudos
Accept as Solution Reply
Not applicable

Re: How does Nintex Workflow get the SharePoint List?

Name of list is demoList (as string).

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: How does Nintex Workflow get the SharePoint List?

I just wonder if you do no need to change the following line

input = "<itemId>" + 1 + "</itemId>" + "<listName>" + demoList + "</listName>" + "</GetRunningWorkflowTasksForCurrentUserForListItem></soap:Body></soap:Envelope>";

to

input = "<itemId>" + 1 + "</itemId>" + "<listName>demoList</listName>" + "</GetRunningWorkflowTasksForCurrentUserForListItem></soap:Body></soap:Envelope>";

But maybe I am wrong.

Regards,

Christophe

0 Kudos
Accept as Solution Reply
Not applicable

Re: How does Nintex Workflow get the SharePoint List?

still I am getting the same error. (500 Internal Server Error)

server was not able to process your request.

Status : Unknown Error

Fiddler:

<faultstring>Server was unable to process request. ---> System.ArgumentOutOfRangeException: Cannot find list. Parameter name: listName at Nintex.Workflow.Common.WebServiceHelper.GetList(String listName, SPWeb web) at NintexWorkflowWS.GetRunningWorkflowTasksForCurrentUserForListItem(Int32 itemId, String listName)</faultstring>

0 Kudos
Accept as Solution Reply