Getting the name of delivery used in continous delivery activity before sending an email

Avatar

Avatar

Ramaswami

Avatar

Ramaswami

Ramaswami

28-05-2020

Hi Team, 

 

i have a requirement where i need dto get the name of the delivery used in continous delivery component before it's execution :  like the image below in the javascript node i want the label of the delivery template which is used in continous delivery. Can anyone suggest 

 

Ramaswami_0-1590659602362.png

 

 

here is what i see when i query my workflow for deliveries and xml data : 

 

Ramaswami_0-1590684927404.png

 

hi kapil, 

 

Below are the results i am seeing when i use query def : 

i have two continous delivery components inside my workflow : 

 

Ramaswami_0-1590755160367.png

 

Ramaswami_1-1590755191239.png

 

i need this name inside the continous delivery : 

Ramaswami_2-1590755226767.png

 

 

 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

kapilKochar

MVP

Avatar

kapilKochar

MVP

kapilKochar
MVP

28-05-2020

Hi ,

 

If you check the workflow XML all continuous delivery saved between <notification> Tag. Inside Notification tag there is one field name as "scenario-cs" . This field saves the label of the delivery template which that continuous delivery contains. 

 

So what you need to do is : 

 

xmldata is [queryDef of xtk:workflow]

var activityXML = xmldata.workflow.activities.notification;

for each (var child in activityXML)
{
logInfo("Retrieve fields value ->"+child.@label)
}

Answers (1)

Answers (1)

Avatar

Avatar

_Manoj_Kumar

MVP

Avatar

_Manoj_Kumar

MVP

_Manoj_Kumar
MVP

28-05-2020

Hello @Ramaswami ,

Use can query the workflow schema via javascript and then pull the deliveries attached to that workflow to get the name/label for the delivery.