-
Scenario
How to upgrade a Nintex for Office 365 workflow to Nintex Workflow Cloud that uses the Query XML action.
After Update
- If you use the Content property to store XML data inside your workflow, the action will upgrade in your workflow with no issues. It will function as it does in Nintex for Office 365.
- If you use the property, Existing SharePoint content, you will need to reconfigure how your workflow locates the XML data you want to query.
- If you use the property, Current item, from inside a workflow associated with a document library, you will need to reconfigure how your workflow locates the XML data you want to query.
Differences- The property, Existing SharePoint content, is not supported in Nintex Workflow Cloud.
- The property, Current item, is not supported in Nintex Workflow Cloud.
- Use the action, Call a SharePoint web service, to get an XML file from a document library to satisfy the above two differences.
- Use the action, Call a web service, to query external data providers that have an API that returns XML.
- The XML Source property only accepts XML text that you enter in manually or pass in through a text-based variable populated with XML data.
- Use the Start event object variable that references list items in your SharePoint site that contain columns with XML data to pass data into the Query XML action.
Configuration
Existing SharePoint Document
This example shows you how to use the SharePoint Online action, Call a SharePoint web service, to get an XML document from a document library and use it with the Query XML action. The workflow was upgraded and needs to read data from an XML document that lives in an existing SharePoint Document library within the site collection. By using the SharePoint REST API, we can still get to this document and use the Query XML action to pull data out.
- Drag the action, Call a SharePoint web service, onto your design canvas from the SharePoint Online grouping of actions.
- Configure the Connection property to point to an existing SharePoint Online connection.
- Enter the SharePoint REST API URL that will return the information you are looking for. Exact syntax for the URLs are beyond the scope of this document, but you can refer to Microsoft documentation that shows you how to work with files using the SharePoint REST API. In this example we have an HTTP Get request pulling in a specific document from a document library that is an XML document. Note, request headers can be set to XML to also give the response in an XML format when calling other lists for data too.
- Configure a Result object variable to store the output response that comes back from the API call. The file will be stored in the Response content variable inside the object variable that gets created.
- In the Query XML action, populate the XML Source property by inserting the response variable from the SharePoint Online Object result variable. Open it and drill down to select Response content. This will hold the actual text of the XML document that we pulled in from the Call a SharePoint web service action. Use an XPath Query to read the XML document.
Current Item
- If your workflow starts by using the SharePoint start events for New list item and/or Update list item in the list, you can use the Start event variable to plug in XML information related to the current item that starts the workflow.
External XML Sources
- For external XML web services outside of your SharePoint environment, you can use the action, Call a web service, to pull in XML data.
- Use the Response content results variable from Call a web service, inside the Query XML action.
References
Be the first to reply!
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.