cancel
Showing results for 
Search instead for 
Did you mean: 

Problem to analyse mapping error

Former Member
0 Kudos

Hi all,

I have a problem to analyse a BPM mapping error on PI7.1. The szenario is as follows: I have 3 different containers (Abstract Interfaces) which data is used to determine the content of a result container.

E.g:

ABSTRACT_INTERFACE_1

ABSTRACT_INTERFACE_2 -> Mapping -> ABSTRACT_RESULT_INTERFACE

ABSTRACT_INTERFACE_3

If have quouted the source interfaces (cardinality 1 for each interface) in my operation mapping and configured the transformation step accordingly. The operation mapping alone works in the integration builder test environment. When I execute the BPM process, the mapping fails. Unfortunately the is no information in the trace leaf of the respective container information. Writing data to the mapping trace doesn't work neither.

Has got anybody an idea what might be the problem?

Kind regards,

Heiko

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Heiko,

Pls, do the following:

1. Build a java mapping which is going to write the payload content before the message mapping.


import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationException;
import java.io.File;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;

/**
 *
 */
public class InputFileWriter implements StreamTransformation {

    public void setParameter(Map map) {
    }

    public void execute(InputStream in, OutputStream out)
    throws StreamTransformationException {
        try{
            File f=new File("C:\PayloadContent.xml");
            FileOutputStream fosPayload = new FileOutputStream(f);
            byte[] content= new byte[in.available()];
            int c;
            int i=0;
            String sb =  "";
            while ((c = in.read()) != -1){
                content<i>=(byte)c;
                sb += (char)content<i>;
                i++;
            }
            fosPayload.write(sb.getBytes());
            fosPayload.close();

            out.write(sb.getBytes());
            out.close();
        }catch(Exception ex){
            ex.printStackTrace();
        }
    }

}

2. Add the javamapping to your interface mapping putting before of message mapping.

3. Run your scenario.

4. Check the file

C:\PayloadContent.xml

5. Test your message mapping in with PayloadContent.xml

And tell me what happened.

Regards

Ivan

Edited by: Jose Iván Reyes Arteaga on Jul 16, 2009 6:05 PM

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

the tip to write the incoming data stream to a file helped to analyse the problem. The mapping failed due to an invalid incoming XML document (3rd Container).

Thanks and regards,

Heiko

former_member200962
Active Contributor
0 Kudos

Check the following:

1) Appropriate ABS MIs (with corresponding MTs) are included in the OM

2) Click on the link named PE in SXMB_MONI...for the BPM message processing entry and view the BPM workflow....you will get to know the step where the BPM is failing...will be marked with red

3) When you say 3 source messages i hope you have propely defined a correlation properly in your BPM when you receive these three messages and this is not a cause of failure of your BPM!

4) Last (not the least) the return code of your BPM is 0 in SXI_CACHE.

Regards,

Abhishek.

former_member272911
Participant
0 Kudos

Hi,

Abhshek is right . Use the step mentioned by him to find the root cause of the problem. If not let me know.

Thanks

kamath