I am trying to customize the BPM process exception messages. I have process steps configured properly. I am delivering the payload to SAP using RFC functions. This call doesn't fail but sometimes it returns a message. Depending on the message this call is successful or not. If it fails. I am resubmitting it automatically by throwing an exception using pub.flow:throwExceptionForRetry and I configured retry parameters as well. So far everything works as expected.

But the issue is, when I throw the exception, I don't have any control over the exception call stack. I can pass a message to make it meaningful, it is still looking ugly, and it is irrelevant most of the times, so I want to truncate it a little bit, add some meaningful information there etc.

This is how it looks like in Process Instances log.

I checked the documentation, I couldn't find anything about what to pass to wrappedException field. I tried building the document pub.event:exceptionInfo manually and then passing it. It doesn't work. I tried generating an exception, copying the document from the pipeline and then passing it to wrapped exception, it doesn't work. Most of the exception info in this page is internal and has no business value. The step here is retried 5 times so this can get very ugly and it will consume a lot of DB resource as well.
I want this field truncated or make it somewhat useful. How can I do this?
------------------------------
engin sarlak
------------------------------