Hi Priyanka,
Overall, your approach is valid and is how I've implemented several SOAP integrations where the external system response needs to be available in the Mendix UI.
Yes. A typical flow is:
Call Web Service
↓
Import Mapping
↓
Parse Response
↓
Store in Domain Model
↓
Display in UI
The main question is whether the data is temporary or needs to be persisted.
If the Teamcenter data needs to be viewed, searched, reported on, or reused later, I would store it in your own domain model entities.
If the data is only needed for immediate display, you can use the imported proxy entities generated from the WSDL and avoid creating permanent records.
I'd typically use:
VariantOption
1 ---> * VariantOptionValue
Example:
VariantOption - TeamcenterId - Name - Description VariantOptionValue - Value - DisplayValue
with a 1-* association between them.
This is the one thing I would improve.
Instead of:
Loop Create Commit EndLoop
Prefer:
Loop Create Add to List EndLoop Commit List
For a small number of records it doesn't matter much, but for larger Teamcenter responses the performance difference can be significant.
Once stored in the domain model:
Since VariantOption contains a child collection (AllowedValues), I would normally use:
Data Grid 2 (VariantOption)
↓
Row Details / Nested List View
↓
VariantOptionValue
or a List View containing another nested List View.
I would keep the Teamcenter-generated WSDL entities separate from your business entities.
Teamcenter SOAP Response
↓
Import Mapping
↓
Proxy Objects
↓
Mapping Microflow
↓
Business Entities
This prevents your domain model from breaking if the Teamcenter WSDL changes in the future.
For a production solution:
VariantOption and VariantOptionValue entities.That's generally the cleanest and most maintainable Teamcenter-to-Mendix pattern I've used.