Hi everybody.I have a process model that starts after a trigger from an email received.When i save the subject of the mail, witht the mail's property "Subject", I pass the subject as a rule input for a expression rule.Unfortunally, the rule doesen't work well, but if I pass the subject of the mail as a wired string, the expression rule works correctly.I DON'T KNOW WHY.I suppose it's something about the format of the subject passed from the mail, but I tried with functions like "touniformstring" but nothing.In this last screen, there's the wrong result, but the subject(pv!oggetto) seems the same
Discussion posts and replies are publicly visible
marco.basolu said:I DON'T KNOW WHY.
Without knowing what your mysterious expression is doing, we cannot help you.
Here the mystery
Hm ... I do not see any obvious mistake.
Can you help me understand what exactly you mean with "doesen't work well"?
In this first case, I call the process by the mail, and it doesen't return me nothing in the record variabile "appendice", popultaed by the rule "getAppByParameters" in the expression rule.In this second case, I call the process manually, passing by default the pv of the object, that is the same of the email, and it works correctly
Yeah, OK ... You will have to investigate deeper into what is actually going on. For the non-working case, what values do you see in the local variables in that expression when using the subject value from the email. There must be a difference, even if both your tests look similar.
I tried using functions like "touniformstring" in the case that che cause was the format.I copy and paste the value in the pv!oggetto in both cases, or I copy and past before on Notepad and next copy and paste in the process, and the string are the same! I don't know what to do...
Using other functions will not help as long as you do not know the root cause.
You could use the error() function to stop the process and create an error message that allows you to see exactly what is going on inside the expression, when called in the process with real data.
Consider that the process's end is immediately after the first node, in the wrong case.so I don't know where to look.
You need to be able to take a look inside the local variables of your expression rule, while it is triggered in the process model.
So you could add the following code snippet in line 10:
error(concat( "logetto:", local!logetto, ",", "polizza:", local!polizza, ........... ))
This will trigger a process alert and the text you create in the error() call will show up in the process alerts tab when monitoring that instance.
Thanks for the advice!
With that situationSending the email with the following subject The process return me these error, witht these values
The subject in this case in not correct, but the values of the "polizza" and the "dataEffetto" are correct, indeed the function with these values return me 2 record, but not in the process