I'm trying to implement Compositie operations, a new feature of SUP 2.2. Basically it allows you to save an entire graph of objects with a single operation on the root object. This allows you for example to save an order header and items with a single JCO call or web service call.
We run into problems using this functionality. The biggest difference between the examples (see links below) and our situation is that we have composite 1-to-1 relations instead of composite 1-to-many relations. (We are not using SAP CRM btw, but another CRM vendor)
What goes right:
- Modeling a compositie relation on our 1-to-1 MBOs works just fine.
- iOS code for this model is generated, on first inspection it looks fine.
What goes wrong:
- During deployment, we get the following error message:
org.eclipse.core.runtime.CoreException: Deploy error: code_generation_failed: ----Code generation failed: Compile: C:\Sybase\UnwiredPlatform\JDK1.6.0_31-x64\bin\javac.exeOutput:C:\Sybase\UnwiredPlatform\Servers\UnwiredServer\temp\dsgaps23\207\genfiles\java\src\IFS_CRM\server\SOME_MBO.java:1182: cannot find symbolsymbol : method iterator()location: class CRM.server.SOME_CHILDMBO java.util.Iterator<CRM.server.SOME_CHILDMBO> it = __SOME_CHILDMBO.iterator();
It seems that the server side code that has been generated expects a 1-to-many relationships as it calls an iterator object. This would make sense in a 1-to-many relatinonship, where a list would be used for the relation. However, in a 1-to-1 relationship the relation is not using a list but rather a straight MBO, which does not have an iterator. So it seems that the SUP does not generate correct server side java code.
Any ideas? To me it seems there is no real logical reason why this should only work with 1-to-many relationships...
General info on Composite operations:
Composite Operation and Input Mapping Terminology and Configuration Guidelines:
Composite Operation Requirements and Limitations:
Composite Operation Data flow: