cancel
Showing results for 
Search instead for 
Did you mean: 

Transformationstep and error handling

Former Member
0 Kudos

Hello,

SAP library says:

Transformationstep -> exception exists for system error

-> generated for permanent system error.

My idea was: If I have an error in a mapping embedded in a transofrmation step, this should generate a system error which I can handle with an exception.

So I have created a BPM with such a block with a transform step with an exception .

Then I started the BPM with a message which results in a mapping error.

The error is shown in the SXMB_MONI, but the process continues , in SWI1 transaction the mapping error is not shown.

No exception is triggered.

This is not what I expected!

Mapping error is NO permanenent error?

Any ideas are welcome!

Regards

Dirk

Accepted Solutions (0)

Answers (3)

Answers (3)

bhavesh_kantilal
Active Contributor
0 Kudos

Hi,

also take a look at thise blog to see how Exception handling can be used for reconilation of messages,

/people/krishna.moorthyp/blog/2006/04/08/reconciliation-of-messages-in-bpm

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Dirk,

Mapping error is a permaneent error.

When an error occurs inside the BPM, it checks if there is an exception handling block. if there is, itgoes to the excetpion block and executes the steps inside the exception block, and then moves on to the steps defined after the block inside which the error occured.

If you are from a Java background, it is the same as a try -- catch block of java.

Just ensure that there is a mapping error and check then if the BPM goes into the exception block.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Bhavesh,

Just ensure that there is a mapping error and check then if the BPM goes into the exception block

Yes, that´s what I did.

Mapping error is shown in SXMB_MONI .

"RuntimeException in Message-Mapping transformatio" (RedFlag)

No doubt, an error!

But the process continues w/o using the exception!

So from SXMB_MONI clicking on the PE link to the BPM monitor shows me that the process is reaching the end using all the steps after the block. And in the technical view of BPM all lamps are green!

In SXMB_MONI I can see that the sync/async bridge of this BPM reachs the step for the response closing the S/A bridge at the BPM end with a cheq.flag.

So, I have a block with an exception defined.

The first step in the regular branch of the block is connected to the exception.

This step (transform step) runs into mapping error .

System ignores exception branch!

So, what can I do wrong?

Regards

Dirk

bhavesh_kantilal
Active Contributor
0 Kudos

Dirk,

In the transformation step , There will be the property --> EXCEPTION . Have you given the corresponding Exception Handler Name in this field?

if yes, if there is an exception then ideally the control would go to the Exception Handler given in this field.

Regards,

Bhavesh

Former Member
0 Kudos

Hi Dirk,

You can try one of these...

1. do not define any exception block for your transformation step..so that once the mapping error occurs the process would stop at the transformation step itself...

2. Refer the weblog mentioned by Bhavesh...i.e in the exception blcok use control step to raise an alert(optional) and the have copy of the same transformation step in the exception block so that after raising an alert the same transformation step will get executed once agin in he exception branch and process would stop in the exception branch itself.

Anand

Former Member
0 Kudos

Yes Bhavesh,

I did that , else the exception to be chosen cannot be identified.

This is clear to me!

This is not so different, but with less opportunities to SAP Bus.Workflow

I come from.

I am a little bit frustrated. XI is a little bit like a balking horse!

I will continue now with the blog you told in your earlier answer.

Will see what will happen!

Question:

Exceptions in standard SAP Bus.WF are to be entered in TA PFTC_DIS (WF Builder) in the relevant step in card file EXIT and have to be activated.

For my BPM I find for the related step that has to trigger the exception when the error comes up in this card file an exit "Internal ERROR". But it is not activated. Instead I find a program exit in the card file for program exits CL_SWF_XI_EXIT_HANDLE_FAULT.

I think this is ok?

Best regards

Dirk

Message was edited by:

Dirk Meinhard

Former Member
0 Kudos

Hi

In the mapping , use some UDF which in case of error raise RuntimeException, so ur transformation step will throw Exception, and then u can use an Exception Handle Branch in BPM to handle that exception and proceed as u want.

By this, it will give a red flag in Moni.

Regards

Dhanya Nair