Your integration issues span all three critical areas - let me provide a comprehensive solution:
Unit Conversion Logic Enhancement:
The middleware conversion rules are insufficient. You need defensive conversion logic that validates before transforming:
<conversion-rule>
<validate-source-unit required="true"/>
<validate-numeric-range min="0" max="999999"/>
<apply-conversion source="kg" target="tonnes" factor="0.001"/>
<apply-conversion source="lbs" target="tonnes" factor="0.000453592"/>
<round-result precision="3"/>
</conversion-rule>
Add explicit rejection logic for ambiguous data. Configure your middleware to quarantine records where unit metadata is missing or unrecognized.
Middleware Configuration Improvements:
Implement a multi-stage validation pipeline in your integration flow:
- Input Validation Stage: Verify unit metadata presence and format
- Conversion Stage: Apply transformations with logging
- Output Validation Stage: Confirm target units match Teamcenter expectations
- Audit Stage: Log all conversions with source/target values for traceability
Add this to your middleware config:
<pipeline>
<stage name="validate" class="UnitValidator">
<reject-on-missing-unit>true</reject-on-missing-unit>
</stage>
<stage name="convert" class="UnitConverter">
<log-conversions>true</log-conversions>
</stage>
</pipeline>
Reporting Template Updates:
Your templates need defensive logic. Add unit verification before calculations:
<calculation name="total_carbon_footprint">
<assert-unit expected="tonnes"/>
<sum field="carbon_value"/>
<format precision="2" unit="tonnes CO2e"/>
</calculation>
Implement template-level validation that flags records with unexpected units. Generate a data quality report alongside your sustainability metrics showing conversion statistics and any anomalies detected.
For the 40% of records missing unit tags, work with your data providers to fix the source systems. In the interim, configure explicit mapping rules based on data source - if System A always sends kg, codify that in your integration profile rather than relying on defaults.
Finally, add comprehensive audit logging for all conversions. Store the original value, original unit, converted value, and conversion factor applied. This creates a traceable record for compliance audits and helps diagnose future discrepancies quickly.
This draft is based on general Teamcenter knowledge. It has not been verified against your specific version and environment. Practitioners: verify the steps and share your experience below.