POJOActivityImplementation.throwActivityFailureException method throws ActivityFailureExceptions but doesn't truncate the "details" constructor param to 32k. This causes AmazonSimpleWorkflowClient.executeRespondActivityTaskFailed to fail:
Caused by: com.amazonaws.services.simpleworkflow.model.AmazonSimpleWorkflowException: 1 validation error detected: Value '...some error payload >32k...' at 'details' failed to satisfy constraint: Member must have length less than or equal to 32768 (Service: AmazonSimpleWorkflow; Status Code: 400; Error Code: ValidationException; Request ID: 741c57e6-e861-42f4-be70-3ab0d1f75761)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.handleErrorResponse(AmazonHttpClient.java:1712)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1367)
...
at com.amazonaws.services.simpleworkflow.AmazonSimpleWorkflowClient.respondActivityTaskFailed(AmazonSimpleWorkflowClient.java:3115)
...
at com.amazonaws.services.simpleworkflow.flow.worker.SynchronousActivityTaskPoller.execute(SynchronousActivityTaskPoller.java:211)
...
Notice that the 'reason' parameter is truncated - but not the details param:
com.amazonaws.services.simpleworkflow.flow.pojo.POJOActivityImplementation
POJOActivityImplementation.throwActivityFailureException method throws ActivityFailureExceptions but doesn't truncate the "details" constructor param to 32k. This causes AmazonSimpleWorkflowClient.executeRespondActivityTaskFailed to fail:
Notice that the 'reason' parameter is truncated - but not the details param: com.amazonaws.services.simpleworkflow.flow.pojo.POJOActivityImplementation
I suggest truncating 'details' the same way as 'reason':
details = WorkflowExecutionUtils.truncateDetails(converter.toData(exception));
Feel free to assign this to me to fix by pull request... thanks.