Retrieve workflow id within a typology rule | Community
Skip to main content
New Participant
October 6, 2022
Solved

Retrieve workflow id within a typology rule

  • October 6, 2022
  • 1 reply
  • 578 views

I'm currently working on a project which would require having the workflow Id or workflow internal name within a typology rule.

 

Within a workflow you can use instance.id to retrieve this information, however, when using this within a typology an error is provided stating "instance is not defined". 

 

Is there a way to retrieve either the internal name or pk of the workflow associated eith a delivery execution within a typology rule script?

 

Regards

 

Ash

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 ParthaSarathy

Hi @ashleydo2 ,

In the delivery activity script tab, add below 

//For Workflow Internal Name:
delivery.deliveryCode=instance.internalName;

//Or, For Workflow Primarykey:
//delivery.deliveryCode=instance.id;

And in typology rule code tab,

if(delivery.deliveryCode == 'test')
{
logWarning("Workflow name is : "+delivery.deliveryCode);
return false;
}
else
logInfo("Workflow name is : "+delivery.deliveryCode);
return true;

The above script will throw error in delivery if the workflow internalName is  test

 

 

1 reply

ParthaSarathy
ParthaSarathyAccepted solution
New Participant
October 7, 2022

Hi @ashleydo2 ,

In the delivery activity script tab, add below 

//For Workflow Internal Name:
delivery.deliveryCode=instance.internalName;

//Or, For Workflow Primarykey:
//delivery.deliveryCode=instance.id;

And in typology rule code tab,

if(delivery.deliveryCode == 'test')
{
logWarning("Workflow name is : "+delivery.deliveryCode);
return false;
}
else
logInfo("Workflow name is : "+delivery.deliveryCode);
return true;

The above script will throw error in delivery if the workflow internalName is  test

 

 

 ~  ParthaSarathy S~  Click here to join ADOBE CAMPAIGN USER GROUP for Quarterly In-person | Hybrid | Virtual Meetups