Expand my Community achievements bar.

We are excited to introduce our latest innovation to enhance the Adobe Campaign user experience — the Adobe Campaign v8 Web User Interface!

JS and Environments

Avatar

Level 3

Hello members,

I was able to automate the reporting in campaign with java script and workflow (ref. Sending report via workflow )

However, when I try to use the same script in other adobe campaign environment it goes into infinite execution mode and never goes past the java script box.

I could see submit request is taking forever causing java script box to never stop. Here is the script,

Question is is anything wrong with the script or could it be an environment issue?

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

var reportName = "deliveryStatistics"

var path = '/usr/local/neolane/nl6/var/' + getOption('NmsTracking_Instance') + '/export/test3'+formatDate(new Date(), "%2D%2M%2Y")+'.xls';

logInfo(path);

var exportFormat = "XLS"; // export format

isAdHoc = false; // is ad hoc?

var _ctx = <ctx _context="selection" _reportContext={reportName} _selection= "107317360" _selectionCount= "1" _schema= "operation" />; //context, campaign pk and count

xtk.report.export(reportName,_ctx,exportFormat,path,isAdHoc); //submit request

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Thanks!

10 Replies

Avatar

Level 10

Hi priyal,

In your other environment, is the path defined still valuable and writeable?

Regards

JS

Avatar

Level 3

I believe so, because I have been using the same path for data extraction process or Direct Mail delivery within workflow.

Its been taking forever to pass the variables or may be creating the report at the location. Any way we can check logs to see which step its taking this long time?

Thanks for reply.

Avatar

Level 10

Hi Priyal,

Please may you include the API call xtk.report.export into a Javascript try {} clause so in the catch {} clause you can see if an error is relevant (such as timeout or wrong selection parameter) ?

And are you able with Adobe Campaign client to get the report for the deliveryId 107317360 ?

Regards
JS

Avatar

Level 3

Hi Jean,

I am trying how to for try-catch with this...so far no luck.

For other question, in this particular example I am passing operation schema which is report for that campaign id, from outside  yes I am able to get report on that as well as deliveries.

Thanks again!!

Avatar

Level 10

Hi priyal,

Please may you confirm if you get some error message in the web.log file (on mta server if web resources are published on this server).

I wonder if it is a real time-out or not.

try {
     xtk.report.export(reportName,_ctx,exportFormat,path,isAdHoc); //submit request

}

catch {

     logError("[WKF12345] Error number: " + e); // or use logWarning if the treatment must go on despite this error

}

Regards
JS

Avatar

Level 3

unfortunately as user, I don't get access to logs on the server, but after adding this try catch snippet, the original script errors out. Once of the scripts been running since long time, I wonder if there is any way to kill the workflow?

Thanks!

Avatar

Level 10

you should find someone that can check that Adobe Campaign instance can write files in the targeted folder on your live environment, as it does with your tests environment. Perhaps privileges are not the same, or the path folder not the same, or whatever that could explain a time-out.

Avatar

Level 3

yup, since the data extraction writes to those export directories, it could be possible the xtk report export has some permission issues in environment, not 100% sure thanks for the direction! I will do more digging.

Avatar

Level 10

Hi,

Did you manage to resolve your issue?

Let us know,

Florent

Avatar

Level 3

Adobe support is looking into it, so we can close this issue here.

Thanks all!