Using Variables in Workflows
When designing an Automation workflow, we can refer to values from different steps to create custom scripts, payload requests, and evaluation conditions. Luma Automation provides various workflow and task parameters that can be used in designing workflows.
Following is the list of parameters and syntax used to refer to the parameters:
Type of Parameters | Description | Syntax | Example |
---|---|---|---|
Workflow Input Parameter | Workflow Input Parameters are placeholders for information required to execute the workflow. The source system that triggers the workflow, provides the required information to the workflow. These parameters have global scope and can be accessed throughout the workflow. Workflow Input Parameters are used to pass values to various steps in the workflow. | wf_in_<parameter_name> | execution.getVariable("wf_in_IssueDescription") |
Workflow Variables | Workflow variables are used to hold values to be used throughout the workflow. Scope of Workflow Variables is Global. These variables can be used to assign values at any execution step in the workflow. | wf_var_<parameter_name> | execution.getVariable("wf_var_count") |
Input Parameters | Input Parameters are used to refer to the information required to execute the operation. These parameters are local to the Service Task and can be mapped to Workflow Variables or Input parameters to be used as inputs to the step. | in_<ServiceTask_name>_<parameter_name> | execution.getVariable("in_Activity_13cjtsl_ticketDescription") |
Response Output Parameters | Response Output Parameters are used to hold the information received as output from the target system. These variables can be mapped to the JSON response received from the web operation. The parameters can be referred as input to the following steps or next path evaluation. | out_<ServiceTask_name>_<parameter_name> | execution.getVariable("out_Activity_13cjtsl_ticketId") The above syntax is used to refer to the value in the output parameter of the specified Service Task. |
Meta Parameters | Meta Parameters are used to refer the information received in the Response Header from the target system such as Execution Date, Connection type, Error code etc. | out_<ServiceTask_name>_<parameter_name> | These parameters can be mapped to the input parameters of the other Service or Script task or used for workflow path evaluation. For example, you may to refer to the Meta Parameter 'Date' as: execution.getVariable("out_Activity_17mx2d1_Date”) |
System Defined Inputs | System defined inputs contain the values received from the source system when the workflow is triggered. Scope of Workflow Variables is Global. These variables can be used to assign values at any execution step in the workflow. | wf_in_<parameter_name> Following System defined input parameters are available out of the box: lumaChannelAccountId | These parameters can be mapped to the Service or Script task input parametes or used for workflow path evaluation. For example, you may to refer to the workflow initiator’s id as: 'initiatorContactId' in scripts as: execution.getVariable("wf_in_initiatorContactId”) |
System Defined Variables | System defined variables contain the information on the triggered workflow and Luma Automation tenant information . Scope of these variables is Global. These variables can be used to assign values at any execution step in the workflow. | Following System defined variables are available out of the box: workflowInstanceId | These parameters can be mapped to the Service or Script task input parametes or used for workflow path evaluation. |
System Defined Outputs | System defined output parameters contain the default execution details for a Service or task. The parameters hold information such as execution status, error type, code, message, etc. Scope of these variables is Global. These variables can be used to assign values at any execution step in the workflow. | out_<Task_name>_<parameter_name> Following System defined outputs are available out of the box: activityErrorType | These parameters can be mapped to the input parameters of the next Service or Script task or used for workflow path evaluation. For example, you may refer to the System Define Output parameter 'default_status' in scripts as: execution.getVariable("out_Activity_17mx2d1_default_status”)
|
To access the parameters within the step, use syntax ${<parametername>}. For example, to access a input parameter 'description' within the step, use the following, ${description}.