Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Personalizing error notification using values from operation schema

Level 1
Level 1

Hello Team,



Is it possible to set values from campaign to the variables in a workflow notification template.


I am trying to generate a notification to workflow supervisor with campaign name when a campaign workflow fails.


Thank you.


1 Reply
Community Advisor
Community Advisor

Hello @mpalaves 


You can get the campaign name in workflow with this code.


 var q = xtk.queryDef.create(
  <queryDef schema="xtk:workflow" operation="get">
      <node expr="[operation/@label]" alias="@label/>    
        <condition expr={"@id ="}  /> 
var workflow= q.ExecuteQuery();
logInfo("Operation Name is :"+workflow.@label);
Level 1
Level 1

Thank you @Manoj_Kumar_  for your reply.

I am able to get the campaign name but unable to pass it to the workflow error notification template. How can I pass this extracted value to the workflow notification that is sent to the supervisors when the workflow fails.



Community Advisor
Community Advisor



after this code Add this line.



Then open the delivery and in advance tab for delivery add this code.



Now open the delivery go to properties and under variables tab. Create a new variable with data type as string and name it campaignName;


Now in your delivery HTML you can use this code to print the campaign Name

<%= variables.campaignName %>


Level 1
Level 1

Hello @Manoj_Kumar_ 


Excuse me if my request was not clear. I am still learning the tool. I am referring to use the value in a error notification template. I do not have a delivery task in the workflow to notify the workflow supervisors. 


I have customized the technical delivery template with the campaign name variable. But unable to assign the value to it.





HI There,


Unless I am mistaken on the request but the Alert activity allows you to get the Workflow and Campaign information via the editor itself. See below


Hope this helps,



Community Advisor
Community Advisor


When you use supervisor notification as alert there is a link at the end which have all the details of that workflow which failed because of some error and also contains Campaign link and campaign label . If you check the source in HTML , it's using workflow.jssp 


<%@ include option='NmsServer_IntranetURL' %>/xtk/workflow.jssp?id=<%= dataSource.workflowId %>