Nanoflow and Microflow error

I get this error when I call a microflow in a nanoflow. I have tried to look it up but I cant seem to understand what exactly is going wrong here. I am attaching the screenshot below. There is no way for me to change my entity to non-persistable, as I need to store the data in my database, and this is a crucial app requirement. Is there another way around this? I am using mendix studio pro 8.18.3
1 answers

This construct is not allowed and therefore you’ll need to implement a different pattern.

The object being passed needs to be non-persistent and by returning the non-persitent object from the microflow the changes can be persisted in the nanoflow calling the microflow.

So in you nanoflow you have the Survey object, you create a survey_NPE object that you populate (if needed) with the data from the Survey object and pass this NPE object to the microflow. Perform the rest call and update the NPE. Then return the NPE object from the microflow and update the persistent Survey object based on the return value of the microflow call.

Of if the rstcall does not need the data of the survey object, then just perfom the rest call and return the result of the call to the calling nanoflow and perfrom the update in the nanoflow. From the screenshots I can’t see all the details so the choice is up to you based on the requirements.