Converting result of external Task into JSON: where is the right place to do it?

@thorben my apologies for reviving an old thread but JSON serialization appears to be broken with respect to external tasks. We’ve been working around the issue by serializing JSON as strings for a couple of months now but it’s an imperfect workaround and is increasingly becoming a problem.

The crux of the issue is that Camunda appears to store the Java class with the serialized value and both the engine and external task client attempt to use the original class to deserialize the value. Of course in the context of an external task running in a different JVM, the class is not in the classpath and this results in a class not found exception.

I don’t understand why Camunda stores the class value at all. It defeats the purpose of serialization. Please see Serialization issue with external tasks for further details.