Search action using TcConnector returns 0 objects

0
Experts,        I have followed the steps mentioned in the TcConnector 3.1 document and extended the domain model accordingly to query for the “IssueReportRevision” objects from Teamcenter. When I execute the saved query without entering any search criteria, it returns me all the Issue Revision objects. However, when I enter some search criteria as part of my query, I do not see any search results being shown. Running the same saved query with the same search criteria, directly in Teamcenter returns me the objects.       I am using Teamcenter 13 version and TcConnector 3.1. My Mendix studio pro version is 8.12.1       I spent almost a day on this but could not figure out the problem.        Just to let you know that I am using the Teamcenter Connector Sample app as my mendix project.  Anyone who have successfully managed to execute saved queries, appreciate if they can share the info.             
asked
3 answers
1

Kalyan and I worked on this issue off the forum and I'm updating this post for the future reference of Teamcenter Connector developers who may run into this or a similar issue. Here's what we found:

 

To successfully execute Teamcenter Connector’s ExecuteSavedQueries Java action, the User Entry Name of the attribute of a saved query (in Teamcenter) should match the name of the attribute of the search criteria input entity (in Mendix). The exception to this is when the User Entry Name has a space, replace it with an underscore while naming the attribute of the search criteria input entity on the Mendix side. Teamcenter Connector has some internal mapping where it automatically takes care of replacing this underscore back to a space before executing the saved query in Teamcenter.

 

answered
0

Kalyan,

I have executed some simple saved queries through Teamcenter Connector’s ExecuteSavedQueries Java action. The ones that I have experimented with are more or less similar to the Teamcenter out-of-the-box “Item Revision...” saved query. Discalimer: I have tried with Teamcenter 12.3, TcConnector 3.1 and Mendix Studio Pro 8.14.1.

If you are also making use of the ExecuteSavedQueries Java action, please double check the key input fields for it.

Input Data – should be set to a search criteria entity with its attributes having values that you want to search for.

Business Object Mappings – should be the mapping of Teamcenter business object names to Mendix entity names.

answered
0

Hi Pavneet,

      In our case, we have a custom property called “Asset ID” on the Issue Report Revision object.  Our intention is to query for these Issue Report Revision objects when the input search value matches with the “Asset ID” value. For this purpose, e have defined a custom saved query. Now, on the Mendix side, I have defined two entities. One for the IssueReportRevision and the other for IssueRevSearchCriteria. The question here is that the IssueReportRevision object is not a direct child of ItemRevision object. It has more than one level of hierarchy of parents. In that case, I assumed that I have to define the entities in the domain model, for all its parent structure up to the ItemRevision?

      I tried that way but it did not work. Below is my domain model for the IssueReportRevision

 

In the microflow, this is how I was calling the saved query with the mappings: 

  In the above snapshot, the query name and the business object are exactly defined as we have it in Teamcenter.

Please let me know if  I am missing something here.

answered