Adding null check in microflows

Hi, If the returned value of a rest call is null, i have to use the null check to avoid the error. But in null check, am using Decision event, expression ($object != empty). How i will handle after the condition true/false in microflow??  Could you please tell me the complete microflow ??
3 answers

Have you looked at adding an error handler to your REST call? Set this to either “Custom with Rollback” or “Custom without Rollback” depending on your needs. Mark one of the paths out of the REST call as the error handler and show your message there.

Have a look at the documentation on the Mendix site for the different types of error handling and how they behave.

Hope this helps


UPDATE: To show how an error handler should work. The null check isn’t needed, as the error being caught is doing the same job.



Its bit not clear what you are asking for. But as far as I understood your question, add your check in the split and draw up lines for true or false and handle it accordingly.

If you are looking for processing a JSON and creating an object from the JSON, you must work with import mapping, get the object, later check the object, if it is empty proceed with happy flow. Otherwise return the response with error or do other actions as you need. 

In any case, its better to look in to Mendix tutorials, which has a lot of information on these questions.


In above microflow, want to retrieve a object from db through rest call. Suppose in db, there is no record, mean it will return null. So in Mendix UI, am getting the error like

I want to implement null check properly  here.

$Sslc != empty

In case of “true”, it should return “SSLC” object & in case of “false” it should show the message “Add SSLC details” .