Transform errors with 'com.glide.rest.outbound.scriptable.ScriptableRESTResponse cannot be cast to com.glide.script.adaptors.WSResult'


Description

Synchronous transform that uses a workflow and originates with a REST call throws return this error message com.glide.rest.outbound.scriptable.ScriptableRESTResponse cannot be cast to com.glide.script.adaptors.WSResult

This error is also found in the system logs:

SEVERE *** ERROR *** com.glide.rest.outbound.scriptable.ScriptableRESTResponse cannot be cast to com.glide.script.adaptors.WSResult

Release or Environment

All releases.

Cause

When the synchronous transform starts, the data is still loading in the import set table and isn't ready to be transformed.

Resolution

In the workflow called by the transform, add a timer.

Additional Information

This solution can apply also if the import set is being populated by a SOAP message.