I was able to do it with supports help with a workaround. In case anyone needs this in the future here is how it is done.
Unfortunately the easiest method would be overriding the exception stack before throwing the exception but according to support there is no way to hide the exception stack of the com.wm.util.BasisException. I hope this functionality will be implemented later on. Instead we changed the \MWS\server\default\deploy\wm_mon_processes\ProcessErrors\default.view
We had 2 different options here. We can change the component-type and/or renderer type of errorStackTraceColumn property to 'com.webmethods.caf.faces.table.TruncatingColumn'.
This will change the type of this field to exception stack. This minimizes the exception stack, and shows it when you hover over it.
OR
we can truncate it on the front end by updating control component as below. I liked this solution better in this case because the rest of the exception stack has no value to me here. truncateLen is the length of the string to keep and can be adjusted according to your needs.
<control component-type='javax.faces.HtmlOutputText' renderer-type='com.webmethods.caf.faces.render.output.TruncateOutputText'>
<property name='id' value='errorStackTrace' />
<property name='truncateLen' value='400' />
<property name='value' value='#{row.errorStackTrace}' />
</control>
------------------------------
engin sarlak
------------------------------
Original Message:
Sent: Fri June 27, 2025 05:06 PM
From: engin sarlak
Subject: Overriding the Exception message for pub.flow:throwExceptionForRetry
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
------------------------------