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
demandé il y a 5 ans225 vues
4 réponses
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
répondu il y a 5 ans
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
répondu il y a 5 ans
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
répondu il y a 5 ans
0

Thanks a lot. We'll go that way.

Alex2
répondu il y a 5 ans

Vous n'êtes pas connecté. Se connecter pour publier une réponse.

Une bonne réponse répond clairement à la question, contient des commentaires constructifs et encourage le développement professionnel de la personne qui pose la question.

Instructions pour répondre aux questions