REST put function cant access data from an export template

0
Hi,  have created a microflow to commit data via a REST put command. So, I have configured a JSON and Export template. I am using the two templates within a microflow. Everything looks fine, but the call REST activity generates an error. And I am a little bit surprised, that the “FlexParameter” object contains no reference to the entity of the export object. I tested the whole microflow, by setting the call REST activity to “custom request template” and copied the JSON string into the test box. With the result, that the microflow was executed without error and the data was published. Can you give me a hint, why it doesn’t work with export template (see microflow and debug data below). Thanks and regards, Ingo
asked
1 answers
0

Ingo,

I didn’t see the stack trace in your posting, however, I have a couple of suggestions for you:

  • In the Modeler, on the Console tab open Set Log Levels (its in the Advanced group).  Set Rest Consume to Trace.  This will show you a lot of detailed information about the request made by the REST action and the response received from that action.  You may find an answer in that information about what went wrong.
  • Best practice for REST calls is to have custom error handling – you will find more info here:  https://docs.mendix.com/howto7/logic-business-rules/set-up-error-handling#1-introduction  When you do this, you’ll end your microflow gracefully and get back an error message from the service.  The API documentation for your rest service may have a mapping for error messages, that you could use to get the specific error message.

Hope that helps,

Mike

answered