on 03-30-2006 2:13 PM
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
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Werner,
why dont you map some constants in the way you would like to have the answer into your response during the second mapping (in the exeption branch)? If the process control jumps to the exception branch it is your decision how to fill response container. I suppose there could be a missunderstandig?...
Regards,
Udo
Hello Udo, hello Werner,
for the moment i am not sure but i think if i want to use a mapping i need a xsd that i have imported to my scenario, haven't i? (defined in MessageType?)
and other question: if i have a javamapping infront of the real mapping and this mapping throws an exception: can i catch this javamapping-exception and put this into the second transformation?
thanks a lot
Alex Schramm
Message was edited by: Alexander Schramm (18:36, 31.03.2006)
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
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.