cancel
Showing results for 
Search instead for 
Did you mean: 

How to properly turn a process red within a Process Chain

Former Member
0 Kudos

Hi,

I am working in a program that will run within a process chain.

There are some circumstances under which I need the program to fail, and the corresponding process to go RED, so the Process Chain will stop.

I think the proper way to do this is by raising an exception, so I wrote some code for that. When debugging, I notice that the exception is raised, but the process goes GREEN, and the process chains does not stop.

What is the proper way to stop the program, so the process goes RED?.

This is the code I use to raise the exception.

-


DATA oref TYPE REF TO cx_root.

DATA text TYPE string.

TRY.

TRY.

RAISE EXCEPTION TYPE CX_DEMO_CONSTRUCTOR

EXPORTING MY_TEXT = SY-REPID.

CATCH CX_DEMO_CONSTRUCTOR INTO OREF.

TEXT = OREF->GET_TEXT( ).

WRITE / TEXT.

RAISE EXCEPTION OREF.

ENDTRY.

CATCH CX_DEMO_CONSTRUCTOR INTO OREF.

TEXT = OREF->GET_TEXT( ).

WRITE / TEXT.

ENDTRY.

-


Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Please try to use function module: RSPC_PROCESS_FINISH

For the parameters, you can found them in table: RSPCPROCESSLOG

Hope this can help.

Answers (1)

Answers (1)

Former Member
0 Kudos

Rollin,

thanks for the tip.

one question: how do I get the mandatory parameters for this?

- Log ID of a Process Chain Run

- Process Type

- Process Variant (Name)

- Process Instance (Value)

thanks,

Mauricio