cancel
Showing results for 
Search instead for 
Did you mean: 

Exception in BPM

Former Member
0 Kudos

Hello Dear Community ,

I have an asynchronous scenario using BPM and it's working well.........

Start->Receiver->Transformation->Send->Stop

I inserted a Container operation and Control using Michal's Blog "Alerts with variables from the messages payload (XI) - UPDATED" /people/michal.krawczyk2/blog/2005/03/13/alerts-with-variables-from-the-messages-payload-xi--updated to send an alert and it worked well too.

I move the Container and Control Steps to an Exception Block.....but when mapping error occurs It seems to be that the Exception isn't caught and the alert is never send...

I did next steps:

- I inserted a block and I entered the exception "runtime".

- I add an exception handler branch and I entered the exception "runtime" in the exception handler attribute.

- In the transformation step I entered the exception "runtime".

- I moved the Container operation and the Control step into the exception branch.

My doubt is if I can catch any exception in the BPM. In this case the mapping error was due to a bad index using the substring function.

Or is it necessary to throw the exception explicitly in the mapping ?.

thanks a lot for your help.

Accepted Solutions (0)

Answers (1)

Answers (1)

VijayKonam
Active Contributor
0 Kudos

Hi,

You can catch any exception thrown by the steps used in the main branch as long as the exception branch exception handler also has the same exception name configured as the main branch steps.

Vijay

Former Member
0 Kudos

Thanks Vijay for your early answer,

The exception I entered in the main branch and the transformation step and in the exception branch is the same: runtime.

But it's not caught when a mapping error occurs......

Thanks a lot.

Yuván.

henrique_pinto
Active Contributor
0 Kudos

Are you sure you have activated your latest changes?

Also, check in SXI_CACHE if your BPM has return code equals 0.

Regards,

Henrique.

Former Member
0 Kudos

Hi Henrique,

Thanks for your help.

All changes are activated and the ReturnCode of the BPM is 0.

I still have the problem....

Regards.

henrique_pinto
Active Contributor
0 Kudos

First, check whether your BPM instances have "COMPLETED" status in SWWL (or SXMB_MONI_BPE, but SWWL is simpler; don't delete any instances though ).

If there are any instances with "ERROR" status in SWWL, then your BPM is having problem before that and is not even getting to the exception throwing step.

You can double click the BPM name in order to go into technical workflow (and from there you can check which steps executed with errors).

If all the instances are ok, make sure that the exception branch was not executed.

Go into the BPM technical workflow and check which steps were executed. Make sure that the steps in exception branch were not.

If they were executed, then the problem is with your alert. Maybe it was not defined correctly.

If they were not, then the problem really is in exception throwing.

Which exception did you expect to happen? Are you sure it had happened?

Get the payload which is used in Transformation Step (from SXMB_MONI message which goes into BPM) and test it in Message Mapping (or Interface Mapping) test tab.

Regards,

Henrique.

Former Member
0 Kudos

Hi Henrique,

I checked the BPM in SWWL and it has "ERROR" status. I can see in Technical Details the error:

No action -> Work item 000000006060: Object FLOWITEM method execute cannot be executed

No action -> Error executing service for node 0000000032

When I test the message mapping the RuntimeExeception is java.lang.StringIndexOutOfBoundsException......it's ok ....becasuse as I said before I'm using the substring function.

Thanks a lot for your interest..

Regards,

Yuván.