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

Query XML Action is returning blank

Hi there,

 

I'm using the call web service against usergroup.aspx, retrieving GetUserCollectionFromSite. This returns a large XML doc, about 3300 lines. I then query this using a user's ID, like //Users/User[@ID={WorkflowVariable:currentId}]/@LoginName. Prior to querying, I replace the xmlns declaration in the XML with blank to streamline it.

 

When I run it in the action, manually pasting in the XML, it works, I get the login name. When the workflow runs through on the item automatically, it doesn't, it returns blank.

 

I've logged out the XML (the fisrt 255 charactersSmiley Wink and I see that the XML node does in fact have the xmlns removed. I've copied the entire XML into notepad and confirmed the user ID I'm using is there. Any ideas why this isn't returning?

Labels: (1)
0 Kudos
Reply
13 Replies
Not applicable

Re: Query XML Action is returning blank

Attach your sample workflow here, then people can help you?

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Query XML Action is returning blank

How is the workflow variable 'currentId' being populated? If you are referencing a property of the list item the workflow is running on, ensure you have a pause as the first action of the workflow. This will help alleviate any race conditions that may be present when your web service call is made. Additionally, you could try manually specifying the value instead of using a variable. If it works, the issue is likely timing and/or a race condition.

Cheers!

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Query XML Action is returning blank

Hi,

I think I have the same problem.

I build an UDA to check if a term exists in a specific termset.

My UDA sequence is :

- Call "GetChilsTermsInTermSet" Taxonomy WebMethod (which returns result in "foundTermsAsString")

- Set the variable "decodedXMLfoundTerms" equals "fn-XMLDecode({WorkflowVariable:foundTermsAsString})"

- Set the variable "xPath" equals "//TermStore/T/LS/TL[@a32="{WorkflowVariable:termLabel}"]/@a32"

- Query XML "{WorkflowVariable:decodedXMLfoundTerms}" -> Output 1 using XPAth "xPath" stored in "foundTermLabel"

I use variables to log them into workflow history and they seems OK, except "foundTermLabel" which still is blank.

Samples are :

- for "decodedXMLfoundTerms" :

<?xml version="1.0" encoding="utf-16"?><TermStore><T a9="99ec5ffa-81e2-47f0-930c-9be46028940e" a21="false" a61="0"><LS><TL a32="P01 (France)" a31="true" /></LS><DS /><TMS><TM a24="7a1b3b17-b0ed-40dc-b7a6-931a52f9f2f3" a12="ProduitPays" a40="" a17="true" a67="" a45="99ec5ffa-81e2-47f0-930c-9be46028940e" /></TMS></T><T a9="b70c3a04-c0e1-448b-9ab5-42820092aca8" a21="false" a61="0"><LS><TL a32="P02 (France)" a31="true" /></LS><DS /><TMS><TM a24="7a1b3b17-b0ed-40dc-b7a6-931a52f9f2f3" a12="ProduitPays" a40="" a17="true" a67="" a45="b70c3a04-c0e1-448b-9ab5-42820092aca8" /></TMS></T></TermStore>

- for "xPath" :

//TermStore/T/LS/TL[@a32="P01 (France)"]/@a32

I did many tries, with or without variables. It always works in "Run now" mode but never at runtime.

Any idea?

0 Kudos
Accept as Solution Reply
Not applicable

Re: Query XML Action is returning blank

Possible to get a workflow file (.NWF) that I can replicate the same issue? I can help to troubleshoot it.

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Query XML Action is returning blank

I'll send it to you as soon as possible (I'm not with that customer today).

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Query XML Action is returning blank

I too am seeing this. Same basic scenario, call Usergroup.asmx to retrieve list of site groups output. Remove xmlns and query XML to retrieve list of Group names and Ids using XPath. Works copy pasting in the Run Now but when I execute the workflow the results are blank? Any solution to this yet?

We are on Nintex 2010 build Version: 2.3.13.0

This use to work in prior builds....

0 Kudos
Accept as Solution Reply
Not applicable

Re: Query XML Action is returning blank

Hi Ryan,

Will be great if you could send me an exported workflow file that can replicate the issue, so I can help to troubleshoot.

You mentioned that it works in previous build? May I know which version? And had you tried to contact our support?

Thanks

0 Kudos
Accept as Solution Reply
Workflow Hero

Re: Query XML Action is returning blank

Hi Chit,

Actually I was able to determine the issue. The Web Services action appears to now strip out the outer xml from the response when storing the result however the Run Now feature does not do this returning the entire soap response. I Had stripped out the soap envelope and body tags but the Result and Response tags also needed to be removed before building my XML xpath query from the output sample.

Thanks

Accept as Solution Reply
Workflow Hero

Re: Query XML Action is returning blank

Hi,

I just sent you the .NWF via email.

Thanks !

0 Kudos
Accept as Solution Reply