Leiste mit Community-Erfolgen erweitern.

Submissions are now open for the 2026 Adobe Experience Maker Awards

Mark Solution

Diese Konversation wurde aufgrund von Inaktivität geschlossen. Bitte erstellen Sie einen neuen Post.

GELÖST

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 Akzeptierte Lösung

Avatar

Korrekte Antwort von
Community Advisor

Hi @CampaignerForLife ,

Create a JS, and add below script

 

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

 

ParthaSarathy_0-1696938694730.png

Lösung in ursprünglichem Beitrag anzeigen

4 Antworten

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

Korrekte Antwort von
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?