on 2018 Nov 12 12:44 PM
Hello,
Currently, I'm creating iFlows with custom interfaces. When one puts an exception subprocess in an iFlow with an error/escalation end the sender will receive a message like below:
An internal server error occured: Message ended with Escalation end event. The MPL ID for the failed message is : <MPL ID> For more details please check tail log.
What I would like to do is to return a custom message, while maintaining the escalated / error label in the message monitor.
My question is whether this is possible to do and how.
Thanks in advance!
Bram
Request clarification before answering.
Hello Bram,
I have tried this feature and its not working as expected. Below are the few pointers.
1) Custom Exception can be set but Message Processing Status in CPI would be COMPLETED ( Usage of Error End or Message End ).
----> Remove property "CamelExceptionCaught" using Content Modifier and use below script.
import com.sap.gateway.ip.core.customdev.util.Message;
import java.util.HashMap;
def Message processData(Message message) {
//Body
def body = message.getBody();
def map = message.getHeaders();
map.put("Content-Type", "application/json");
map.put("CamelHttpResponseCode", 400);
message.setBody("{\"status\": \"Hey Bond,please check CPI monitoring for error details\"}");
return message;
}
2) You want to make Message Processing Status in CPI to be FAILED or ESCALATED with standard error response
---->Just add the Exception Subprocess and set the event as Error End or Escalation.
3) You want to throw Custom Exception back to Sender and set the Message Processing Status in CPI to be FAILED or ESCALATED.
---->This is not working in SAP CPI and following up with development team.You can raise Ticket to SAP team so that this can be prioritized.
Regards,
Sriprasad Shivaram Bhat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
bramkeijers and sriprasadshivaramabhat
do we have any update regarding Option 3
3) You want to throw Custom Exception back to Sender and set the Message Processing Status in CPI to be FAILED or ESCALATED.
---->This is not working in SAP CPI and following up with development team.You can raise Ticket to SAP team so that this can be prioritized.
User | Count |
---|---|
51 | |
6 | |
5 | |
5 | |
5 | |
4 | |
3 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.