I have a simple flow service that query the db (return 4 fields). I mapped them to four variables. Then in the flow service, I loop the result set. I branch on fourth field if it is greater than zero, I will send an email. Send email is inside of sequence of inside of the branch. I was able to use the first three variable values in the email body but not the fourth one. The fourth one just gave me the expression.
So here is how my email looks like: ODI_Agent_Production_1, PRODUCTION, 13-NOV-2017 14:01:00, %/getMinuteGapOutput/results/MINUTEGAP%
when a variable is empty (it does not have a value), it can not be resolved when using in an expression.
In this case the variable name will remain in the string as shown by you.
Thank you, Holger. In my flow, I have a sequence label under the branch: %/getMinuteGapOutput/results/MINUTEGAP% > 0.
That condition works because it will send out correct emails. So I am confused as how does this expression works but the variables won’t work.
Attached is the execution results. As you will see, I have values for the fields in result sets: MINUTEGAP, and it is mapped to variable Gap. However, it is just not receiving that value. All other three variable works perfectly.
It seems to me that the variable “MINUTEGAP” is of type “Integer”, not “String”. Such variables are evaluated correctly when used in condition expressions but are not resolved when they are referenced as %…% in strings.
In this case you might need to check your branch condition if it still works correctly.
You can have the result as Integer and then convert this variable to a string variable before using it in the email body.
If there is no built-in service (i.e. under pub.string folder) you can check for the WmTransformationServices package available from the download section from TechCommunity.
Holger, you rated two posts of mine with four stars. Out of curiosity: why did you give four and not five? Were the replies not quite correct? Or off topic?