How to call instance variable instance.vars.xxx in one workflow in to another workflow sub query activity? | Community
Skip to main content
Level 5
August 2, 2024
Solved

How to call instance variable instance.vars.xxx in one workflow in to another workflow sub query activity?

  • August 2, 2024
  • 1 reply
  • 4451 views

Hi team, 

 

In workflow wkf1, I have declared the instance variables. Now, I want to use these instance variables in a subQuery activity (with wkf1 added as the template) within another workflow, wkf2.

 

When I attempted to generate the instance variables in the alert email from wkf2, the variables declared in wkf1 appeared as undefined in the alert email.

 

Thank you in advance

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 ALangridge

Hello! Instance variables are connected with the workflow itself - if you want to make variables accessible within a subworkflow pass in event level variables with vars.myVariableName on that specific arm of your workflow. 

 

"The event variables (vars.xxx) enable the exchange of data between the elementary tasks of a workflow process. These variables are passed by the task that activated the task in progress. ... They are then passed to the following activities."

 

https://experienceleague.adobe.com/en/docs/campaign-classic/using/automating-with-workflows/advanced-management/javascript-scripts-and-templates#event-variables 

1 reply

ALangridge
ALangridgeAccepted solution
Level 4
August 5, 2024

Hello! Instance variables are connected with the workflow itself - if you want to make variables accessible within a subworkflow pass in event level variables with vars.myVariableName on that specific arm of your workflow. 

 

"The event variables (vars.xxx) enable the exchange of data between the elementary tasks of a workflow process. These variables are passed by the task that activated the task in progress. ... They are then passed to the following activities."

 

https://experienceleague.adobe.com/en/docs/campaign-classic/using/automating-with-workflows/advanced-management/javascript-scripts-and-templates#event-variables