Function Invoked - Message Boxes Not Firing

I’m working in a MT environment and therefore have to use Functions to do C#. I have created a Function and am calling it in a Pre-Processing BPM but am getting some strange behavior. I was hoping that someone might know where I went wrong.

Below are 2 screenshots. The first is the BPM and I highlighted the Exception that is popping up a dialog box. The second is the Function and I highlighted the two message boxes that are not popping. I’ve also included the Parameters and Signature. Any help is greatly appreciated.

image

image

I’m not entirely sure that Functions are designed to show messages back to the user in the same way as a BPM might be able to (someone will probably correct me on that).

Are you able to set an out variable in your function that can then be consumed by your BPM which then shows the message to the user?

You can, I have done it before. As I think about it, I am wondering if the Function is NOT being invoked. My first message box is just a table query, and since that is not popping there is probably something wrong with my signature. I’m going to play around with the signature and see if that does anything. Maybe change the type to a dataset or something.