JsonXmlParser and Conditions

Stefano_Finetti_78

Customer
Joined
Mar 4, 2025
Messages
12
Reaction score
5
Hi!
I'm trying to use Create Condition on CFD but I'm running into a problem. I can't seem to store properly the variable that should be checked.
I have a Web Rest Method that returns a very simple Json containing { "found": true } or { "found": false } according to the session.ani I passed to it.
Immediately after the Web Rest I have a JsonXmlparser object that reads the output of the method and store it in a project$ variable called "SocioRiconosciuto". It should store true or false according to the REST method response.
The Call Condition is set to EQUAL(project$.SocioRiconosciuto,true) or EQUAL(project$.SocioRiconosciuto,false)
But it never gets there. If get an hangup as soon as the first welcome message is played.

This is a screenshot of the actual flow:

Screenshot 2025-03-05 132209.png
From what I understand reading the docs, the JsonXmlParser should read the content of RiconoscimentoSocio.ResponseContent and map "found" value to the variable project$.SocioRiconosciuto
I'm sure I'm doing something wrong here, but I can't find what exactly.
 
I think the problem is that the value is being returned as a string and not a boolean. So you should try with the expression as:
EQUAL(project$.SocioRiconosciuto,"true")
 
Man you are a genius.
I was in effect sending a true boolean, but you were right.
Changing the EQUAL to parse the string, and changing my api endpoint to return a string instead of the boolean, did the trick, I was able to process the condition correctly.
 

Forum statistics

Threads
112,298
Messages
591,768
Members
165,438
Latest member
cur_cb