Workflow event variables event-variables

Some workflow activities allow you to edit scripts in the expression editor to perform specific actions such as retrieving data coming from previous activities, building conditions, or computing file names based on event variables.

What are event variables scripting

Scripts executed in the context of a workflow access a series of additional global objects such as the workflow itself that is being executed (ìnstance), its various tasks (task), or the events that activated a given task (event).

To each type of object is associated a category of variables that can be leveraged in the expression editor when editing scripts in activities such as JavaScript code or Test.

  • Instance variables (instance.vars.xxx) are comparable to global variables. They are shared by all activities.
  • Task variables (task.vars.xxx) are comparable to local variables. They are only used by the current task. These variables are used by persistent activities to keep data and are sometimes used to exchange data between the different scripts of a same activity.
  • 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. Event variables are the most often used variables, and they should be used in preference to instance variables.
NOTE
Additional information on scripting and the exposed objects and variables in Adobe Campaign is available in the Campaign v8 (client console) documentation in this section.
Please note that while this resource offers valuable insights, discrepancies may exist as it specifically applies to the client console rather than Campaign Web User Interface.

Leverage event variables in the expression editor expression-editor

Predefined event variables are available for use in the expression editor left-hand side pane. You can also create new ones by initializing a new variable in your code.

In addition to these event variables, you can also leverage the Conditions menu in the left pane to build conditions and the Add current date menu to use functions related to date formatting.

recommendation-more-help
c39c2d00-ba9a-424b-adf9-66af58a0c34b