I cannot know what you already tried or did not try, but there are some things that you could possibly do, that maybe will help:
- Within your rest service you can open the operation and change the export mapping to none, and from there you maybe have to also change your microflow return object to none
- another possibility is to make an export mapping based on your json string. This can be done by creating a json structure document and a export mapping where you select you json structure as schema source, then give back the first object within you export microflow
Chad,
It sounds like you have created a Published REST service operation that returns data to the requester using an Export mapping. If this is the case, the microflow that operation points to should return an object or list of objects (depending on what the export mapping expects). You don’t need to convert the data into JSON yourself, the Mendix engine will do that.
For example, if you define an export mapping to export and Invoice and all of the Line Items on that invoice, your microflow would need to return a single Invoice object. If your export mapping is for a list of invoices, your microflow should return a list of invoices. Note that you do not need to retrieve or explicitly pass any line items back from your microflow. The export mapping will gather all of the line items for each invoice and include that in the JSON returned by the operation.
Hope that helps,
Mike
Hi community
You can add an export mapping, and in the microflow, directly return the object or list as mentioned in the documentation. It will work as expected, based on my experience.
Steps to implement:
ExportWithMapping
(Export to JSON) action or manually create an HttpResponse
or HttpHeader
. You can directly return the mapped object or the list retrieved from the database.