Skip to Content
author's profile photo Former Member
Former Member

How to properly turn a process red within a Process Chain

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.

-


Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Apr 21, 2011 at 10:21 AM

    Please try to use function module: RSPC_PROCESS_FINISH

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

    Hope this can help.

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Apr 21, 2011 at 04:02 PM

    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

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.