cancel
Showing results for 
Search instead for 
Did you mean: 

Mapping not working in the CCBPM Scenario -(http://scn.sap.com/community/bpm/blog/2014/01/30/simple-bpm-scenario#comment-635438)

Former Member
0 Kudos

I referred to the following link to have proof of concept of the CCBPM

http://scn.sap.com/community/bpm/blog/2014/01/30/simple-bpm-scenario#comment-635438

So while executing the ccBPM getting the following error in the trace log...

It is not working throwing following exception...

Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD

at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:369)

Accepted Solutions (1)

Accepted Solutions (1)

justin_santhanam
Active Contributor
0 Kudos

Naveed,

Not sure if it's going to help, but just give a try,

1)Please create the files (with no spaces or dashes etc) and run the interface and see what's the result

<?xml version="1.0" encoding="UTF-8"?>

<ns:InsuranceDetails xmlns:ns="http://KE/TestProject/MultiFile_BPM">

<File>

<EmpID>00000815</EmpID>

<PolicyNumber>456789</PolicyNumber>

<Amount>774896</Amount>

<Type>1</Type>

</File>

</ns:InsuranceDetails>

<?xml version="1.0" encoding="UTF-8"?>

<ns:EmployeeDetails xmlns:ns="http://KE/TestProject/MultiFile_BPM">

<File>

<EmpID>00000815</EmpID>

<Name>Naveed Iqbal</Name>

<Phone>+1-212-1234567</Phone>

<Address>

<Street>15th Street</Street>

<City>Karachi</City>

<PinCode>745000</PinCode>

<Country>Pakistan</Country>

</Address>

</File>

</ns:EmployeeDetails>

<?xml version="1.0" encoding="UTF-8"?>

<ns:ProjectDetails xmlns:ns="http://KE/TestProject/MultiFile_BPM">

<File>

<EmpID>00000815</EmpID>

<ProjectId>77</ProjectId>

<ProjectName>774896</ProjectName>

<WorkLocation>Karachi</WorkLocation>

</File>

</ns:ProjectDetails>

2) If it doesn't help. Then change the occurrences of the files of target fields to 0..1. If it works then if you don't get some of the fileds then atleast we know there is something wrong with one of the source fields.

3) Before doing Step 2. Go to your mapping program, Test tab, copy each file data (from the SXMB_MONI) ,don't just copy it, right click on the payload page and say view -source and then copy it and paste it into the mapping program and test it. Paste the payload between <ns0:Message1> for first file and between <ns0:Message2> for second file and so on.

Let us know the results.

Thanks!

Answers (4)

Answers (4)

Former Member
0 Kudos

Employee details file...

<?xml version="1.0" encoding="UTF-8"?>

<ns:EmployeeDetails xmlns:ns="http://KE/TestProject/MultiFile_BPM">

 

  <File>

 

    <EmpId>00000815</EmpId>

    <Name>Naveed Iqbal</Name>

    <Phone>+1-212-1234567</Phone>   

  <Address>

  <Street>15th Street</Street>

  <City>Karachi</City>

  <PinCode>745000</PinCode>

  <Country>Pakistan</Country>

  </Address>

  </File>

 

</ns:EmployeeDetails>

Insurance details file

<?xml version="1.0" encoding="UTF-8"?>

<ns:InsuranceDetails xmlns:ns="http://KE/TestProject/MultiFile_BPM">

 

  <File>

 

    <EmpID>00000815</EmpID>

    <PolicyNumber>456789</PolicyNumber>

    <Amount>774896</Amount>   

  <Type>1</Type>

  </File>

 

</ns:InsuranceDetails>

Project Details file

<?xml version="1.0" encoding="UTF-8"?>

<ns:ProjectDetails xmlns:ns="http://KE/TestProject/MultiFile_BPM">

 

  <File>

 

    <EmpID>00000815</EmpID>

    <ProjectId>77</ProjectId>

    <ProjectName>774896</ProjectName>   

  <WorkLocation>Karachi</WorkLocation>

  </File>

 

</ns:ProjectDetails>

former_member186851
Active Contributor
0 Kudos

Naveed,

Your first message Tag is wrong.

it should be EmpID.

check it

Former Member
0 Kudos

I made the change but still getting the error...

Tracing for additional info -runtimeexception
Thrown:
com.sap.aii.mappingtool.tf7.IllegalInstanceException: Cannot create target element /ns0:Messages/ns0:Message1/ns1:EmpCompleteDetails_IB/FILE/EmpID. Values missing in queue context. Target XSD requires a value for this element, but the target-field mapping does not create one. Check whether the XML instance is valid for the source XSD, and whether the target-field mapping fulfils the requirement of the target XSD
at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:369)
at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:411)
at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:411)
at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:411)
at com.sap.aii.mappingtool.tf7.AMappingProgram.processNode(AMappingProgram.java:411)
at com.sap.aii.mappingtool.tf7.AMappingProgram.start(AMappingProgram.java:504)
at com.sap.aii.mappingtool.tf7.Transformer.start(Transformer.java:149)
at com.sap.aii.mappingtool.tf7.AMappingProgram.transform(AMappingProgram.java:640)
at com.sap.aii.ib.server.mapping.execution.JavaMapping.executeStep(JavaMapping.java:112)
at com.sap.aii.ib.server.mapping.execution.Mapping.execute(Mapping.java:60)
at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:87)
at com.sap.aii.ib.server.mapping.execution.MappingHandler.map(MappingHandler.java:71)
at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleMappingRequest(MappingRequestHandler.java:122)
at com.sap.aii.ibrun.sbeans.mapping.MappingRequestHandler.handleRequest(MappingRequestHandler.java:72)
at com.sap.aii.ibrun.sbeans.mapping.MappingServiceImpl.processFunction(MappingServiceImpl.java:79)
at sun.reflect.GeneratedMethodAccessor308.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:46)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:74)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:191)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:23)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:179)
at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
at com.sun.proxy.$Proxy564.processFunction(Unknown Source)
at sun.reflect.GeneratedMethodAccessor315.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at com.sap.engine.services.rfcengine.RFCDefaultRequestHandler.handleRequest(RFCDefaultRequestHandler.java:183)
at com.sap.engine.services.rfcengine.RFCJCOServer$J2EEApplicationRunnable.run(RFCJCOServer.java:267)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:182)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:280)

former_member186851
Active Contributor
0 Kudos

Naveed check the payload,I gues it is the problem in the payload only

Former Member
0 Kudos

Where I am able to check the payload? Also, can you please provide me the same payload

former_member186851
Active Contributor
0 Kudos

I mean your input payloads.

Former Member
0 Kudos

My payloads, please let me know how do I test in the Enterprise Service Repository


<?xml version="1.0" encoding="UTF-8" ?>

- <ns:InsuranceDetails xmlns:ns="http://KE/TestProject/MultiFile_BPM">

- <File>

<EmpID>00000815</EmpID>

<PolicyNumber>456789</PolicyNumber>

<Amount>774896</Amount>

<Type>1</Type>

</File>

</ns:InsuranceDetails>



<?xml version="1.0" encoding="UTF-8" ?>

- <ns:EmployeeDetails xmlns:ns="http://KE/TestProject/MultiFile_BPM">

- <File>

<EmpID>00000815</EmpID>

<Name>Naveed Iqbal</Name>

<Phone>+1-212-1234567</Phone>

- <Address>

<Street>15th Street</Street>

<City>Karachi</City>

<PinCode>745000</PinCode>

<Country>Pakistan</Country>

</Address>

</File>

</ns:EmployeeDetails>


<?xml version="1.0" encoding="UTF-8" ?>

- <ns:ProjectDetails xmlns:ns="http://KE/TestProject/MultiFile_BPM">

- <File>

<EmpID>00000815</EmpID>

<ProjectId>77</ProjectId>

<ProjectName>774896</ProjectName>

<WorkLocation>Karachi</WorkLocation>

</File>

</ns:ProjectDetails>



Former Member
0 Kudos

Raghuraman Sritharan,

I followed your blog. I am stuck in transformation. I tried all possible solutions but still not able

find the correct solution. Please help me on this...

former_member186851
Active Contributor
0 Kudos

can you post the CCBPM pattern you developed in ESR?

Former Member
0 Kudos

what do you mean?

Former Member
0 Kudos

I followed your scenario, just want to confirm is it really possible to write a transformation without any extra effort to produce 1 file xml, coming from 3 different sources. Because the issues which I am facing is purely due to context related things.

former_member186851
Active Contributor
0 Kudos

The CCBPM pattern built in ESR?.

justin_santhanam
Active Contributor
0 Kudos

Can you give the sample XML for one of the source messages?

Thank you,

Justin.

former_member186851
Active Contributor
0 Kudos

Hello Naveed,

check whether the payload satisifies the correlation condition to generate the XML payload.

iaki_vila
Active Contributor
0 Kudos

Hi Naveed,

i think if you go to sxi_monitor you can notice that the source message it is not being generated right. I think the problem could be in the files that you are using like examples.

Regards.