Getting the name of delivery used in continous delivery activity before sending an email | Community
Skip to main content
Level 4
May 28, 2020
Solved

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

  • May 28, 2020
  • 2 replies
  • 7259 views

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 

 

 

 

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

 

 

hi kapil, 

 

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

i have two continous delivery components inside my workflow : 

 

 

 

i need this name inside the continous delivery : 

 

 

 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by kapilKochar

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)
}

2 replies

Manoj_Kumar
Community Advisor
Community Advisor
May 28, 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.

Manoj  | https://themartech.pro
RamaswamiAuthor
Level 4
May 28, 2020
hi @14490880, i have tried that but i am getting blank when pull the data. you can see in my screenshot attached in my question.
kapilKochar
kapilKocharAccepted solution
Level 6
May 28, 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)
}

RamaswamiAuthor
Level 4
May 28, 2020
Hi @1273135, What i need to pull from queryDef, if you want me to pull the xml memo(data) i am seeing blank in xml memo column when i just wanted to test it by query activity. You can see my screenshot in my question.