I have a use-case where I’d like to create a variable to input to a Service Task. I’ve read through the Feel documentation particularly around expressions but the editor doesn’t allow spaces?
I assume that you create a variable with the name “process.GetCustomerAccounts.wait”, correct?
Again, a variable name should not include operators and . is also an operator
Either rename the name or use a JSON object/document variable (e.g. {"GetCustomerAccounts":{"wait":"P0DT0H0M1S"}}).
Hi Philipp - the variable is a context so its just navigation so I don’t think the variable name is the problem (I’m using variable names like this elsewhere without problems) - the Json looks like below:
If I just use the variable it all works and gets a delay of 1 second. If I use the expression below it returns NULL:
=duration(process.GetCustomerAccounts.wait)+duration(process.GetCustomerAccounts.wait)
Note: the variable name at the top I wasn’t using in the workflow - just a quick (bad) example.
The difference is that you’re using the expression in the source expression of a variable output mapping. Currently, a temporal value can’t be stored directly as a variable. But it can be transferred into a string using the string() function.