cancel
Showing results for 
Search instead for 
Did you mean: 

BPM - Create process error - red flag in monitor

Former Member
0 Kudos

Hi.

I have a question about generating errors in a BPM.

The scenario is like this:

After some process I have a switch. In case of an error, the switch branch to a control step that throws an exception. A control step afterwards cancels the process.

Everything works like it should, but in the monitor, every process step has a sucessfull flag. I would like the process to fail somehow, so the process step indicates an error.

We do not use the alert framework!

Anyone got an idea?

Regards...

Peter

Accepted Solutions (0)

Answers (1)

Answers (1)

justin_santhanam
Active Contributor
0 Kudos

Peter,

Are u using Cancel Process in Control Block? If yes then the BPM will not be errord out rather it will say success. Cancel Process is nothing but Logically Deleting the workflow, hence it will always shows success status.

raj.

Former Member
0 Kudos

Hi Raj.

What should be the process then?

If I remove the cancel process step, the BPM just continues executing...

Again, the result I want is a red flag in the XI monitor!

Regards...

Peter

justin_santhanam
Active Contributor
0 Kudos

Peter,

Can u explain this condition?

<i>In case of an error, the switch branch to a control step that throws an exception</i>

How come Switch will decide error or not? What sort of error is this?

raj.,

Former Member
0 Kudos

Hi again

The switch step looks into a return structure from a proxy call (BAPIRET2).

If any line in the RETURN segment contains TYPE=E an error has occured in the backend. So the switch looks for this, and throws an exception, if this is the case!

The point is, that everything works as it should, but Im having some trouble showing it to the system supporters

Regards...

Peter

justin_santhanam
Active Contributor
0 Kudos

Peter,

I got your flow. You need to do the below steps in order to achieve your scenario.

--Place a block. In Block Properties enter Exception name[ Anything as ur wish]

--Place the Switch step inside the Block.

-- As per your above logic check for TYPE =E and place the Control block in the corresponding brach.

-- Control Block choose Action as "Throw Exception" and Exception as defined in Step 1.

-- Remember don't insert any Exception branch and catch the exception, then you won't get any errorrs. If you want the BPM to be errord out then follow the steps mentioned above.

If you have any doubts, please revert back.

raj.

Former Member
0 Kudos

Hi again.

I actually tried this.

But for some reason the process just ends up with "Outbound status": Message scheduled on outbound side.

The PE has a green flag. The error on queue level is: Permanent error in BPE inbound processing.

If I go with this approach, the failed message will block the queue, until it is removed.

And what is worse, the process status is still succesfull. No Errors shown!

Regards...

Peter

justin_santhanam
Active Contributor
0 Kudos

Peter,

I followed the same way for most of the integrations it works perfectly. Could you please verify the SXI_CACHE and check whether ur BPM has return code '0'

raj.

Former Member
0 Kudos

I did that, and status is '0'.

I found some threads in the forum that describes the same problem, as the one I get (Green flag in PE). But I find no solutions!

Peter