I have a simple list with one field I named ‘Recipient’. It is a name field that allows you to select other sharepoint users. The workflow has one action, send email that does a workflow lookup at the Recipient filed on the current item and returns the field as a semicolon delimited email address. When I create a new item and select myself as the recipient the email gets sent but if I select anyone else the workflow goes into suspend status with the following status:
I forgot to include the error message that shows when the workflow is suspended.
RequestorId: 5e99c8d9-3b7a-1307-0000-000000000000. Details: RequestorId: 5e99c8d9-3b7a-1307-0000-000000000000. Details: An unhandled exception occurred during the execution of the workflow instance. Exception details: System.ApplicationException: HTTP 400 {“Transfer-Encoding”:[“chunked”],”X-SharePointHealthScore”:[“0″],”SPClientServiceRequestDuration”:[“80″],”SPRequestGuid”:[“5e99c8d9-3b7a-1307-b4f3-666fde0f2b37″],”request-id”:[“5e99c8d9-3b7a-1307-b4f3-666fde0f2b37″],”X-FRAME-OPTIONS”:[“SAMEORIGIN”],”MicrosoftSharePointTeamServices”:[“15.0.0.4420″],”X-Content-Type-Options”:[“nosniff”],”X-MS-InvokeApp”:[“1; RequireReadOnly”],”Cache-Control”:[“max-age=0, private”],”Date”:[“Thu, 23 Jan 2014 20:21:02 GMT”],”Server”:[“Microsoft-IIS\/7.5″],”X-AspNet-Version”:[“4.0.30319″],”X-Powered-By”:[“ASP.NET”]} at Microsoft.Activities.Hosting.Runtime.Subroutine.SubroutineChild.Execute(CodeActivityContext context) at System.Activities.CodeActivity.InternalExecute(ActivityInstance instance, ActivityExecutor executor, BookmarkManager bookmarkManager) at System.Activities.Runtime.ActivityExecutor.ExecuteActivityWorkItem.ExecuteBody(ActivityExecutor executor, BookmarkManager bookmarkManager, Location resultLocation)
Another interesting fact is that in the stage of the workflow where I am setting the approver to myself, I am selecting my name in the exact same way that I do when I select it in the Send Email stage. For example, I enter my login name and allow it to resolve to my name and email address. So it finds me to send the email in the second case, but not in the first case. Very weird!
Thank you so much, Eric for all your troubleshooting suggestions. I will do my best to respond to your questions/suggestions.
1. My workflow can be triggered manually. I am using that feature to retry after making my changes.
2. I am actually the approver who gets assigned to my test list items. It won’t send an email to me if the system sets me as the approver. It will only send an email to me if I specifically select my name as the recipient in the To: field. To do so, I enter my AD login in the “Type a Name or Email Address” field. It then resolves to my name/email address. What is strange is that if I send the email to myself, but include the field “Approver” in the text of the email, it shows my correct name and email address. So the system is resolving the approver to my name. But the email isn’t coming to me.
6. Tried this test and the field doesn’t get filled in. So it’s not getting that far.
Regarding your last suggestion about the workflow being broken up – the screen shots I sent are only a portion of the total workflow. Basically, there are several tests for value and other items. Based on that, an approver is set. The next step for all the “assign approver” steps is to go to the “Send Email” step. This is just my way of compartmentalizing it so I can easily change the logic or approvers in the future if needed. I am confident that these steps are working. It’s just the email step that is failing.
Thanks again for all your suggestions. Any others are greatly appreciated.
Hi Mike,
please check user profile of that particular user exist or not. If not try full user profile synch.
Still if your not able to get, use fiddler to verify that.Usually , workflow picks from the UserInformationList which is hidden list using REST API’s. Once userprofile is exists automatically your few of profile properties will fall in UserInformationList.
please let me know, still if you face any issues.
Got the screenshots and everything looks right. When the workflows gets suspended, can you click on the instance of the workflow and see the error its showing? It should say something about the email address not being valid or field value cannot be null or something that can help.
Here is a troubleshooting step for how I would try and fix this.
- Set the workflow to kickoff manually
- Add your name in the Approver Field
- Run workflow to see if it sends you an email (I think you said it does)
- Go back and change your name to someone else in the Approver Field
- Run workflow to see if it sends them the email
- If it doesn’t do this….
- Add a single line of text column in your list called “email check”
- Go to your workflow and add a line after your “send email”
- Set Field “Email Check” to “Workflow processes to here”
- Rerun your workflow as you or anyone to see if the list item gets updated with that value
If the list updates you at least know your workflow logic is good, and then you can start looking directly at the field and permissions. You may not have permissions to email another user even though you are a site owner. You may need Site Collection rights to do that (Just a hunch). Also I wrote out the steps not to consider you ignorant, but so that I could ensure I wrote out how I would walk through it myself.
Another thing that could help. Have you considered using one step with all your logic defined within or even separate steps, not separating it. That’s not a major deal but could help you with troubleshooting where its failing. It looks like you are calling another process or workflow, instead you can write your send email underneath the logic. It would look like this:
If Current….. is greater than 2500
Set Approver to John Doe
Send email to Approver
I hope this helps you. Let me know.
Eric
I do not want to complicate this workflow by using a task. It is very simple. If certain fields meet certain criteria, an approver is set accordingly. This all works so it is not the problem. The problem comes in when I send an email to anyone other than a person specifically selected in the To: field of the Send Email action. If I select myself, the email works fine, so my email connection settings should all be working. But when I select the CurrentItem:Approver field in the To: field, the email is never sent. The workflow is suspended. I can verify that the CurrentItem:Approver contains a valid email address, and I can confirm that my SharePoint server can communicate with my email server.
Not sure how to include screen shots but I have uploaded them as files.