on 11-27-2007 4:20 PM
I have a scenario where I'm receiving an IDOC I then use a JAVA mapping program in my first transformation step. Immediately following I have a switch step but there is not data in from the mapping program.
1) Receive Step
2) Transformation IDOC to Table using Java class
3) Switch step based on Table field value
Problem is there is no values in the table.
This java class was not developed within NetWeaver but was used in our old process. We simply imported the jar file for accessing our existing java classes. Is there something else we need to do to utilize our java modules within the BPM process?
Yes I was able to test the interface mapping and data was received in the target structure. I even see data if a execute my BPM with just two steps:
1)Receive
2) Transformation using java class
<u><b>Output with just two steps</b> </u>
<?xml version="1.0" encoding="UTF-8" ?>
- <ns0:MT_CWF_TABLES_UPDATE xmlns:ns0="http://halliburton.com/IA/XI">
- <Invoice>
<InvoiceNum>94732918</InvoiceNum>
<Timestamp>200711271052052</Timestamp>
<RevisedInvoiceType>M</RevisedInvoiceType>
<InvoiceType>M</InvoiceType>
<SoldToId>300466</SoldToId>
<BillToId>300466</BillToId>
<PlantId>007M</PlantId>
<PSLId>18</PSLId>
<InvoicePDF>N</InvoicePDF>
<PIDXXMLFileRequired>Y</PIDXXMLFileRequired>
<PIDXIntegration>Y</PIDXIntegration>
<WaitForFT>Y</WaitForFT>
<AttachFT>Y</AttachFT>
<SbynXchngProfileName>TP_300466_TZODX</SbynXchngProfileName>
<SbynXchngOutProtocol>RNIF</SbynXchngOutProtocol>
<EmailNotificationMode>NONE</EmailNotificationMode>
<EmailMsgFrom>NONE</EmailMsgFrom>
<EmailMsgTo>NONE</EmailMsgTo>
<EmailMsgCc>NONE</EmailMsgCc>
<PSL_Name>NONE</PSL_Name>
<Email_Message_ID>1776</Email_Message_ID>
</Invoice>
</ns0:MT_CWF_TABLES_UPDATE>
However, when I add the next step it's not seeing the data in the fields. My second transformation is just sending the fields through the email adapter. The email received shows blanks for all the fields.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The namespace does appear to be incorrect. Not sure where it's picking that up from.
I'll update the question and add points if this corrects my problems.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You must to have in the java class:
- You java have to be like:
import java.io.InputStream;
import java.io.OutputStream;
import java.util.Map;
import java.util.HashMap;
import com.sap.aii.mapping.api. AbstractTrace;
import com.sap.aii.mapping.api.StreamTransformation;
import com.sap.aii.mapping.api.StreamTransformationConstants;
public class JavaMapping implements StreamTransformation {
private Map param = null;
private AbstractTrace trace = null;
public void setParameter (Map param) {
this.param = param;
if (param == null) {
this.param = new HashMap();
}
}
public void execute(InputStream in, OutputStream out) {
try {
trace = (AbstractTrace)param.get(
StreamTransformationConstants.MAPPING_TRACE );
trace.addInfo(...);
// ...
String receiverName = (String)param.get(
StreamTransformationConstants.RECEIVER_NAME);
// ...
}
}
}
The method execute take the InputStream with the XML source. The out (OutputStream) have to be an XML like the IDOC structure.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Audra,
did you test your inetrface mapping using the test-tab?
Was there any result?
Regards mario
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
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.