How to parse vars variables to the Segment Code?

felixsongfei

23-10-2018

I will take below workflow as an example, the first query activity has a js code in initialization script: vars.version1=1.1

1603080_pastedImage_1.png1603081_pastedImage_2.png

2. The second split activity trying to get the variables set in the query activity. Use the expression like below: $(vars/@version1)

1603084_pastedImage_5.png

3. There a below error when I run the workflow:

XTK-170036 Unable to parse expression "'1.1'".

The expression looks like get the value of the variable version1, but it can not set to the Segment code. Is there any problem with the expressions? If yes, please let me know how to correct it? Thanks!

1603083_pastedImage_4.png

Accepted Solutions (1)

Accepted Solutions (1)

sagil23995776

23-10-2018

Hi,
Try injecting it to the xml using the initialization script inside the split activity

activity.transitions.extractOutput[0].code = vars.version1

1603375_pastedImage_0.png

Cheers,
Sagi