Hi there
I wonder how expression internally works? and differ from workflow?
for example, if I define a workflow with trigger beforeUpdate would act as an expression?
also, if I have two fields (which are expressions) and one depends on the other … how Corteza evaluate them?
They work how you’d expect an expression to work; it gets parsed into some internal thing, evaluated using the passed parameters.
Under the hood, they use GitHub - PaesslerAG/gval: Expression evaluation in golang where we add some boilerplate code around it.
Expressions are short code snippets that result in some value where workflows define a complex series of steps that need to happen.
Which part are you referring to?
Trigger constraints are values that are used to determine if a workflow should run or not. You could call it an expression, but the contents are not evaluated as an expression – they’re simple assertions.
Don’t quote me on this one because I’m not 100% sure but they should be evaluated in the same order they were provided – the same order the fields were defined in. Feel free to confirm/correct me on this one.