on 12-06-2013 11:57 AM
I have a synchornous (request,response and fault) send step in BPM. If the target system sends fault I raise an exception in BPM. In the exception branch I have a seperate mapping(transformation step) to send an alert email to target audience.
The question is how do I pass the fault message field content to this transformation step. Can that be done using parametrized mapping? or any other way?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hareesh,
Going by the above blogs...loooks like fault message content cannot be read in bpm without using the approach mentioned by alex.
But just a thought...my request, response and fault mapping is happening outside the bpm. So there are no async abstract interfaces defined for either the source or target synchronous interfaces. But can I export the value of fault message and import it in BPM some how so that I can use it for other transformation steps I am doing in the BPM.
Your thoughts....
Hi Vicky
You can trigger the alert email in the below way also
Write an UDF in your fault message mapping and inside the udf call the function module SALERT_CREATE
sample code:
java.util.Map map;
try {
String msgid;
map = container.getTransformationParameters();
msgid = (String) map.get(StreamTransformationConstants.MESSAGE_ID);
Channel channel = LookupService.getChannel("test00","CC_RFC_R_PI");
RfcAccessor accessor = LookupService.getRfcAccessor(channel);
String rfcXML= "<ns0:SALERT_CREATE xmlns:ns0=\"urn:sap-com:document:sap:rfc:functions\">"+
"<IP_ALIAS/>"+
"<IP_APPLICATION_GUID/>"+
"<IP_CAT>ALERT_TEST_UDF</IP_CAT>"+
"<IP_XML_CONTAINER/>"+
"<IT_CONTAINER>"+
"<item>"+
"<ELEMENT>ZCUSTOMER</ELEMENT>"+
"<TAB_INDEX>0</TAB_INDEX>"+
"<ELEMLENGTH>20</ELEMLENGTH>"+
"<TYPE>C</TYPE>"+
"<VALUE>"+pnum+"</VALUE>"+
"</item>"+
"<item>"+
"<ELEMENT>ZMSGID</ELEMENT>"+
"<TAB_INDEX>1</TAB_INDEX>"+
"<ELEMLENGTH>70</ELEMLENGTH>"+
"<TYPE>C</TYPE>"+
"<VALUE>"+msgid+"</VALUE>"+
"</item>"+
"</IT_CONTAINER>"+
"</ns0:SALERT_CREATE>";
InputStream inputStream =new ByteArrayInputStream(rfcXML.getBytes());
XmlPayload payload = LookupService.getXmlPayload(inputStream);
Payload rfcOutPayload = accessor.call(payload);
throw new StreamTransformationException ( " Message Mapping Failed because of invalid Customer number");
}
catch(Exception e)
{
throw new RuntimeException("Exception while checking for Distribution channel : "+e);
}
Hi Vicky
Why you are creating the mapping for triggering alert. You can create an alert category and use the same in control step to trigger the alert email.
Create a container variable in BPM and then use assign step to assign the xpath of the fault message fields. Then in the alert message you can use the container variables.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How do you create a abstract async interface for fault message...shouldn't it be associated with its request and response message? Is this how you are mentioning.
Also, do i need to create corresponding directory objects as well for abs falut message interface?
Just finished testing it...it doesn't work..
Hi Vicky
Have u got the response back as a fault message during synchronous send step ?
If u got the response message type as response, then the container variable should be filled up
with the value that came in response . The alert email should also displayed the same.
Also I am curious to know how you are performing the synchronous send step with out creating the abstract interface for sync and request ,response messages?
I have a seperate fault message in the interface so the fault response from the traget system comes in fault message not in response message.
I am calling the abs sync message in synchronous send step. But beacuse its a sync abs interface, I cannot create a container variable for the fault message.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.