Expand my Community achievements bar.

SOLVED

Getting workflow's attributes

Avatar

Level 3

Hi,

 

I am looking for the way to get the workflow's attributes (e.g. internal name, label or timezone) using the JS activity. I know that it is achievable by querying Workflow schema but I am looking for a universal method to always being able to get current workflow attributes.

 

Thanks,

Dominik

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hello @dwnuk ,

With the instance variable in a JavaScript activity, you can easily retrieve workflow attributes.

PFA: Screenshot

Parvesh_Parmar_0-1705435518591.png

 

 

For e.g. if you want to obtain the value of the internal name of a workflow, you can achieve this through 'instance.internalName'.

 

Here's an example code snippet that prints the internal name of a workflow in a JavaScript activity:

logInfo(instance.internalName);

 

You can find the more details about the different type of variable on below link.

 

https://experienceleague.adobe.com/docs/campaign-classic/using/automating-with-workflows/advanced-ma...

 

Kr,

Parvesh

 

 

 

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hello @dwnuk ,

With the instance variable in a JavaScript activity, you can easily retrieve workflow attributes.

PFA: Screenshot

Parvesh_Parmar_0-1705435518591.png

 

 

For e.g. if you want to obtain the value of the internal name of a workflow, you can achieve this through 'instance.internalName'.

 

Here's an example code snippet that prints the internal name of a workflow in a JavaScript activity:

logInfo(instance.internalName);

 

You can find the more details about the different type of variable on below link.

 

https://experienceleague.adobe.com/docs/campaign-classic/using/automating-with-workflows/advanced-ma...

 

Kr,

Parvesh