Expand my Community achievements bar.

Problem attaching 3 data extraction in recurring delivery

Avatar

Level 1

Hi,

based on this post (https://experienceleaguecommunities.adobe.com/t5/adobe-campaign-classic-questions/how-to-add-2-attac...) I'm trying to attach 3 attachments from three different data extractions to a recurring delivery but the delivery continues to fail like this, even though other deliveries with single extraction and attachment work correctly: 

Cocozza3_0-1732781744994.png

This is how I set up the workflow:

Cocozza3_1-1732782002009.png

 

The first column of 3 javascript activities contain

 

Spoiler

instance.vars.count1 = vars.recCount;

instance.vars.count2= vars.recCount;

instance.vars.count3 = vars.recCount;

 

because in the email I send to my customer I also print the number of that outbound transition.

 

In the file_1, file_2 and file_3 javascript activities i put: 

Spoiler

 instance.vars.file_1 = vars.filename;

instance.vars.file_2 = vars.filename;

instance.vars.file_3 = vars.filename;

 

 

And in the Email report delivery script i put:

 

Spoiler

delivery.variables._var[0].stringValue=instance.vars.count1;
delivery.variables._var[1].stringValue=instance.vars.count2;
delivery.variables._var[2].stringValue=instance.vars.count3;

delivery.attachment.add(
<attachment compressMode="print" filterActive="false" label="my label"
nameScriptActive="false" type="normal" upload="false">
<name>{instance.vars.file_1}</name>
</attachment>);

delivery.attachment.add(
<attachment compressMode="print" filterActive="false" label="my label"
nameScriptActive="false" type="normal" upload="false">
<name>{instance.vars.file_2}</name>
</attachment>);

 

delivery.attachment.add(
<attachment compressMode="print" filterActive="false" label="my label"
nameScriptActive="false" type="normal" upload="false">
<name>{instance.vars.file_3}</name>
</attachment>);


delivery.hasAttachments = true

 

 

I can't understand why the recurring delivery fails. Is there something wrong with the workflow or the javascript code?

 

Thanks a lot,
Osvaldo

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

3 Replies

Avatar

Community Advisor

Hi @Cocozza3 ,

Connect all 3 output transition of  'File' JavaScript activity with AND-Join activity, and in AND-Join select 'File-2' as primary set (the transition in which you planned to target the recipients), and connect it with Delivery.

ParthaSarathy_0-1732784027962.png

Avatar

Level 1

Hi @ParthaSarathy 

thank you for your help, really appreciated!

 

I tried but I got the same errors.

Cocozza3_0-1732784773701.pngCocozza3_1-1732784812245.png

 

However the delivery must not go to the target resulting from the transition of the javascript activity file_2 but only to me (and in the future only to my manager) because it is only a periodic reporting email, not a communication to end customers.


I configured it as follows:

Cocozza3_2-1732784877270.pngCocozza3_3-1732784904923.png

Is there something wrong with the delivery configuration?

 

Thank you a lot,

Osvaldo

Avatar

Level 1

Or maybe is something related to the size of the data attached?

Cocozza3_0-1732786882887.png

 

Thanks,
Osvaldo