Expand my Community achievements bar.

Adobe Campaign User Groups are live now. Join our Adobe Campaign User Groups and connect with your local leaders!
SOLVED

Create workflow activity using javaScript

Avatar

Level 7

Hello, is there any way to create an Activity using Javascript? 

Basically, create it in execution 

 

Thanks; 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @CampaignerForLife ,

Create a JS, and add below script

 

var frequency = 10 * 1000 // 10 seconds
task.wait(frequency)

 

ParthaSarathy_0-1696938694730.png

View solution in original post

4 Replies

Avatar

Community Advisor

Hi @CampaignerForLife ,

 

Could you Please explain which activity needs to be created in runtime and also the use case for this issue ?

 

If it is a delivery activity, then yes, it can be created in runtime using JavaScript.

 

PFA the sample code

 

var delivery = nms.delivery.create();
delivery.Duplicate("nms:delivery|" + vars.ID);
delivery.save();
vars.deliveryId = delivery.id;
logInfo("vars.deliveryId: "+vars.deliveryId);

 

Regards,

Pravallika.

Lets say I want to create a "Wait" activity in a workflow using Javascript, how could I do it?

Avatar

Correct answer by
Community Advisor

Hi @CampaignerForLife ,

Create a JS, and add below script

 

var frequency = 10 * 1000 // 10 seconds
task.wait(frequency)

 

ParthaSarathy_0-1696938694730.png

Avatar

Level 7

And how could I for example modify the columns of an Enrichment activity using Javascript? Lets say I want to add 4 more columns, how?