activity timing out on large exception

0

As there is 32K limit on activity result I see activities just timing out when result is larger while it is OK for normal cases, in case when activity is throwing an exception I cannot see the error reason.

Specifically we are using SWF Java Flow Framework. Besides we use Hibernate with Spring. When data access layer throws exception, its text (including all the stack) is longer than 32K. In this case we see no activity failure, but just timeout. We could resolve it using custom serializer, but I would prefer a solution using fewer custom components.

Is there such a solution?

Alex2
已提问 5 年前225 查看次数
4 回答
0

I'm not sure what generic solution would help here. Due to the size limit some information must be lost. IMHO logging the exception from the activity and returning a different exception that misses the stack trace (or part of it) is a reasonable workaround.

mfateev
已回答 5 年前
0

Thank you Maxim!

Is there any standard mechanism to implement a "stardard global" exception handler in between completion of activity and activity worker process?

Thank you

Alex2
已回答 5 年前
0

It looks like (https://github.com/aws/aws-swf-flow-library/blob/master/src/main/java/com/amazonaws/services/simpleworkflow/flow/pojo/POJOActivityImplementation.java#L100) that DataConverter is used to serialize the exception. So you can create a custom DataConverter to implement this logic.

mfateev
已回答 5 年前
0

Thanks a lot. We'll go that way.

Alex2
已回答 5 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则