Teamcenter Connector Revise ItemRevision returns an empty object in ReviseObject_ItemRevision

0
Hi Mendix Community,I am working on a Mendix and Teamcenter integration with the following setup:Mendix Teamcenter Connector: 2606.0.0Teamcenter version: 2512I generated microflows using the Teamcenter service for these operations:Fetch ItemRevisionsUpdate an ItemRevision propertyRevise an ItemRevisionFetching ItemRevisions and updating properties work correctly. However, revising an ItemRevision is failing.ImplementationI fetch the latest ItemRevision using the Search Revision operation and pass the resulting ItemRevision, along with the configuration name string, to the generated microflow:"ItemRevisionHome_ReviseItemRevision"Inside this microflow, the following Java action is called:"ReviseObject_ItemRevision"The Java action returns an empty object. The generated microflow then tries to cast this object to the specialized ItemRevision entity. Since the returned object is empty, the cast action fails.Could someone please help identify what might be causing the ReviseObject_ItemRevision Java action to return an empty object? Any guidance on the required configuration, entity mapping, permissions, or compatibility would be Helpful.
asked
1 answers
0

Hi,

Since Search Revision and Update Item Revision are working, the connection, authentication, and basic object mapping appear to be fine.

What stands out is that the generated microflow expects the Java action to return a populated ModelObject that can then be cast to ItemRevisionHome.ItemRevision, but the object coming back is empty.

In Teamcenter integrations, I've seen this happen when the revise operation succeeds server-side but the revised object type is not included in the response mapping/configuration used by the connector.

A few things I'd check:

  • Enable TRACE logging for the Teamcenter Connector and inspect the actual response from the revise service. Verify whether Teamcenter is returning a revised ItemRevision UID/object reference.
  • Check whether the configuration name passed into ItemRevisionHome_ReviseItemRevision matches the configuration used for the Search and Update operations. A mismatch can result in the connector being unable to resolve the returned object type.
  • Review the object property policy used by the revise operation. If the revised object is returned with insufficient properties loaded, the connector may create a generic ModelObject that cannot be cast to the generated ItemRevision entity.
  • Compare the generated entities and mappings after upgrading to Connector 2606.0.0. Sometimes regenerating the service artifacts resolves casting issues when Teamcenter service metadata has changed.

The fact that the failure happens during the cast immediately after ReviseObject_ItemRevision makes me suspect the revise call is either returning a generic ModelObject or an object type that doesn't match the generated specialization expected by the microflow.

As a quick validation, inspect the returned object before the cast and check:

  • UID
  • Type / Business Object Type
  • Loaded properties

If the object has a UID but no recognized ItemRevision type information, then the issue is likely in the response mapping rather than in the revise operation itself.

I'd also compare the Teamcenter revise response with the search response for the same revision. In similar cases, the search operation returned a fully typed ItemRevision while the revise operation returned a more generic object that required additional property loading before it could be cast successfully.

Hope this helps.


answered