How to save a value of local variable to rule input.
Discussion posts and replies are publicly visible
under saveinto Parameter use a!save(ri!{varName},local!{localVariablName}). For example a!save(ri!data,local!data).
I'm not using this in interface, I'm doing this in rule expression.
Your understanding is absolutely right. And on that track, in a traditional programming lang, you use parameters only to bring in inputs. You use a dedicated return statement to push the output. Same is here. You just avoid return rather you just write that statement.
I'm not facing any problems regarding getting inputs and setting output, My problems is in implementing logic using rule inputs and local variables.
What exactly yoou are trying to get from expression rule. What are your inputs?
My input is a ID......in the expression rule first I will get the value and do some process with that value and then processed data will be my output.
In this case I thought of using local variables for processing (like in traditional programming languages) and once its done I will assign back to output variable.
THERE ARE NO OUTPUT VARIABLES!!!!!
I did get that point. My only point is how to work with both local variables and rule inputs.
Did you see the screenshot?
I did. How to do the other way around.
local!var1 : "sample data",
ri!data : local!var1
You cannot do that. Values of RI cannot be changed. As a matter of fact, values of local variables also cannot be changed once defined.
I'm getting this error while applying above logic.
Expression evaluation error at function a!localvariables: Local variables may only be defined within the "local" domain. The local variable 'ri!sample' uses an invalid domain.