The problem is that you are trying to serialize variable of Object type which does not implement serializable interface. In case of serializable is implemented flowable uses java serialization to persist the instance. I would not recommend it.
Use JSON instead.
Regards
Martin
The generic pattern I use, when doing a POST request body in a JSON approach, is to break out the bits of data you need into each parameter. Using your object, param, that has a field name and a field value, it could look like this when setting the request Body field in the modeler:
paramA=${param.Name}¶mB=${param.value}
The goal, basically, is to make sure that all your data being passed over the wire is either a string or a java primitive (int, boolean, etc). Strings and primitives don’t get serialized so you won’t get errors. Also, it’s easier to debug because you can dump out your request body variables to a log file if you need to.
As for the number of variables, if you find yourself needing a dynamic number of variables I would rethink your approach. I’ve done a fair number of HTTP POST requests using the modeler. I’ve never had to use a variable Request Body size (where I have between 0 and n arguments).