Developer forum

Forum » Integration » Job "fails" when there's no data

Job "fails" when there's no data

Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi there,

We have a bunch of integration jobs that run every 20 minutes. We also set up notification emails that are sent out when the job fails.

Unfortunately, Dynamicweb sees the job as failing when the source document is empty; when that happens we receive an error like "No active mappings found" or "Sequence contains no elements". This is a common scenario for us where we deal with deltas that bring over data only when there are changes. Obviously, there are many times where there are no changes, leading to many false positives with the failed email alert.

Is there a way around this behavior so the "failed" email isn't sent when the source document is empty?

And if not, can I make a feature request for this? Maybe a checkbox on the settings like "Don't sent notification email when source document contains no data"?

Thanks,

Imar


Replies

 
Dmitriy Benyuk
Reply

Hi Imar,
unfortunatelly there is no workaround for this, so it should be a new feature.
Regards, Dmitrij

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Dmitriy,

Got it, thanks. Should I copy this post to the Feature Requests forum?

Imar

 
Dmitriy Benyuk
Reply

Hi Imar,
no, I've already sent this request to Jonas, and will see when it will be planned to implement.
Regards, Dmitrij

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Excellent, thanks!

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi guys,

Did this ever get implemented? I run into it on a regular basis and would love to get rid of the false positives.

Thanks!

Imar

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Imar,
there was tfs# 22271 to fix that issue. Do you still get the wrong job result or message with no mappings or is it failing for some other case (not xml provider as a source)?
What messages do you see in the logs?
Regards, Dmitrij

 
Imar Spaanjaars Dynamicweb Employee
Imar Spaanjaars
Reply

Hi Dmitrij,

It seems to be happening with the ScheduledTaskAddIns, rather than with the jobs. Here's what I see in the task log:

The scheduled task Task Name Here failed with the following error:
Xml returned from the web service: 'http://1.2.3.4:8080/DynamicwebService' is empty

It seems to come from this code in ImportDataWithCustomRequestAddIn (although I think others have that too):

if (!string.IsNullOrEmpty(xml))
{
    //write the data retrieved from the Webservice to a file, so that the Data Integration Job can be run.
    ((XmlProvider)jobToRun.Source).WriteToSourceFile(xml);
}
else
{
    ret = false;
    throw new Exception(string.Format("Xml returned from the web service: '{0}' is empty", WebServiceURI));
}

 

Because of this, the job never runs but returns an error which in turn results in the email notification being sent.

Is there a way to prevent that error rmail from being sent out when the XML is empty? 

Thanks!

 
Dmitriy Benyuk Dynamicweb Employee
Dmitriy Benyuk
Reply

Hi Imar,
thx for the details. TFS# 54105 created. I'll fix it so it will consider an empty xml as a warning and sends email about that if notification option "On failure only" is off.
Regards, Dmitrij

 

You must be logged in to post in the forum