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.
Views
Replies
Total Likes
Hello @mpalaves
You can get the campaign name in workflow with this code.
var q = xtk.queryDef.create( <queryDef schema="xtk:workflow" operation="get"> <select> <node expr="[operation/@label]" alias="@label/> </select> <where> <condition expr={"@id ="+instance.id} /> </where> </queryDef> ); var workflow= q.ExecuteQuery(); logInfo("Operation Name is :"+workflow.@label);
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.
Regards,
Views
Replies
Total Likes
after this code Add this line.
instance.vars.campaignName=workflow.@label
Then open the delivery and in advance tab for delivery add this code.
delivery.variables._var[0].stringValue=instance.vars.campaignName;
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 %>
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
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,
Thanks
Denis
Views
Replies
Total Likes
Hi,
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 %>
Views
Replies
Total Likes