Skip to main content
Nintex Community Menu Bar

sent emails in a foreach doesn´t work

  • Dec 7, 2017 10:59 AM UTC
  • 7 replies
  • 28 views
  • Translate All

I have a nintex workflow that read a collection and sent one email for each item. For each element in this collection, have to read a item in other list where obtains the recipients of this emails.

In the 4th iteracction the workflow is suspended and show the following error:

 

System.Net.WebException: Exception encountered while processing the HTTP request. Exception details: 'HttpClient.SendAsync task was canceled. TraceActivityId=cc9dc52b-1b8e-dafa-bcf0-0097770175f0'.
at Microsoft.Workflow.Common.AsyncResult.End[TAsyncResult](IAsyncResult result)
at Microsoft.Activities.Hosting.HostedHttpExtension.HttpRequestWorkItem.HttpRequestWorkItemAsyncResult.End(IAsyncResult result, Int32& responseCode)
at Microsoft.Activities.Hosting.HostedHttpExtension.HttpRequestWorkItem.OnEndComplete(ScheduledWorkItemContext context, IAsyncResult result)

7 replies

Forum|alt.badge.img+12
  • Nintex Partner
  • Dec 7, 2017 4:59 PM UTC

Hi,

Is it happening with 4th iteration every time?

Please try logging the item value before send email action and see what it is retrieving?

Translate

Forum|alt.badge.img+8
  • Dec 7, 2017 7:27 PM UTC

Are the email addresses coming from a collection? If so I would put the email value out to the wf history to check the value.

Translate

  • Author
  • Dec 9, 2017 7:37 PM UTC

No. The addresses are stored in different variables because I get them from other lists

Translate

  • Author
  • Dec 9, 2017 7:39 PM UTC

Almost always in the fourth. I get a list of values of a field of the item. Each value is the title of an item from another list. From there I get the emails. I have changed this list of values and I still have the same problem.

It can be a problem of times when reading data from the other list?

Translate

Forum|alt.badge.img+8
  • Dec 11, 2017 1:07 PM UTC

Have you tried using the same email address for every time you send it? Maybe there is an issue with the email address in the 4th one.

Translate

Forum|alt.badge.img+12
  • Nintex Partner
  • Dec 11, 2017 2:50 PM UTC

Hi, Please try to log all variable into history, and examine the values including email, and see if the fourth item values are as expected or something wrong.

Translate

Forum|alt.badge.img+8
  • Dec 11, 2017 3:00 PM UTC

Yes! This is the best way I've found to troubleshoot workflows.

Translate