SharePoint visual studio workflow is very much useful. Recently while working in a visual studio 2015 workflow for SharePoint online, I received the below error while running the workflow for a particular list item. The workflow went to a suspended mode and the error comes as:
An unhandled exception occurred during the execution of the workflow instance. Exception details: System.UriFormatException: Invalid URL: The format of the URI could not be determined. The error looks like below:
An unhandled exception occurred during the execution of the workflow instance
In the workflow, we were using HttpSend workflow activity to retrieve the URL of the RootWeb. In HttpSend I was using a variable to return the value form CurrentWebUri value (which returns the site url).
My HttpSend Uri value looks like below:
siteURL+”_api/Site/RootWeb”
Here the value which was coming in siteURL was like below:
https://onlysharepoint2013.sharepoint.com/sites/Bhawana (without “/” at the end)
So my HttpSend Uri was becoming like below:
https://onlysharepoint2013.sharepoint.com/sites/Bhawana_api/Site/RootWeb (missing “/” before _api)
So I changed my HttpSend Uri value to like below
siteURL+"/_api/Site/RootWeb"
Now it generate the URL correctly like below:
https://onlysharepoint2013.sharepoint.com/sites/Bhawana/_api/Site/RootWeb
Read few SharePoint workflow tutorials:
- Start a task process SharePoint designer 2013 workflow action
- Copy Document SharePoint Designer 2013 Workflow Action
- Collect Signature Workflow in SharePoint Online
- SharePoint designer workflow: Create Laptop Request Approval Workflow
- SharePoint designer 2013 Workflow: Assign task to group using Assign a task workflow action
- SharePoint Designer 2013 Workflow: Do Calculation Action Example
- SharePoint Designer Workflow Declare item as record
- This computer is part of a farm error while uninstalling workflow manager 1.0 in SharePoint 2016/2013
- SharePoint Designer 2013 Workflow: Create List Item Action with Example
- SharePoint designer 2013 Workflow Condition: person is a valid sharepoint user with Example
Hope this will be helpful to resolve An unhandled exception occurred during the execution of the workflow instance. The format of the URI could not be determined SharePoint online.
I am Bijay from Odisha, India. Currently working in my own venture TSInfo Technologies in Bangalore, India. I am Microsoft Office Servers and Services (SharePoint) MVP (5 times). I works in SharePoint 2016/2013/2010, SharePoint Online Office 365 etc. Check out My MVP Profile.. I also run popular SharePoint web site EnjoySharePoint.com