Skip to Content

HTTP.RESPONSE in synch BPM

Hello,

I want to receive a XML message from a HTTP sender synchron into a BPM.

In the BPM I have to to several steps, one is a mapping step and another is an asynchronus SEND of an IDOC to an R/3.

I have setup this BPM and everything works ok.

The BPM sends a HTTP-200OK back and a response message.

But in some cases the mapping step throws an exception. e.g. a mandatory field is missing.

In this case the HTTP-500 ERROR code is sent back, but with the response message

"Internal Server Error

<SAP:Error><SAP:Category>XIServer</SAP:Category><SAP:Code>INTERNAL.PL_TIMEOUT</SAP:Code><SAP:Stack>Pipeline timeout condition satisfied</SAP:Stack></SAP:Error>"

If I handle the exception in an exception branch everything work ok again, but then the HTTP-200OK is sent back.

Now my question:

How can I send back an HTTP-500 ERROR code from this synchronous BPM with my own response message.

I have tried with CONTROL STEP-CANCEL PROCESS, but I also get the same missleading error message back for the TIMEOUT. Also in this case the process is canceled after 60seconds with this timeout error.

Is is possible to send an HTTP-500 ERROR status and to cancel the process immediatly?

If yes, how can I set a specific RESPONSE message?

best regards

Werner Magerl

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • Best Answer
    Mar 30, 2006 at 01:35 PM

    Hi Werner,

    usually following should work:

    - create a block

    - define a exception for your mapping (just fill a field)

    - define a excption branch for your block

    - put a execption handler for that exception there

    - create a second mapping - you should be able to use all containers - and fill your response container

    - now in case of exceptions the container should be filled and the block after that finished

    Regards,

    Udo

    Add comment
    10|10000 characters needed characters exceeded

    • Hello Udo,

      yes, I think there is a missunderstanding.

      It is no problem to fill the RESPONSE container with my message.

      What I want to have is, there should be also an HTTP-Error code sent back from the BPM to the sender.

      At the moment I always get an HTTP-OK(200).

      But I want to give another HTTP-code back.

      Is this possible?

      best regards

      Werner