How to use Call Teamcenter Service Javaction for custom service?

0
Hello,   I need to call a custom team center webservice in which I need to provide inputs like patternText, itemGenerationCount, siteSel, createPart etc. and in output I need following item_id.     Do I need to generalize any existing entities from TcConnector module for input or output? What needs to be added in Operation mapping Json file and in Business object mappings?   Kindly suggest a way to move forward.  
asked
1 answers
0

You don’t need to generalize any existing entities from the TcConnector module for input or output. It’s perfectly fine to create your own simple domain model entities (persistent or non-persistent) and map the request and response data into those. Adding inheritance to TcConnector entities usually doesn’t add value and can make maintenance harder.

 

In the Operation mapping JSON, you just need to specify which request mapping is used for the operation and which response mapping should be used to read the result. In the Business object mappings, make sure you map the actual structured fields you need (for example a created ID) from the response nodes (such as dataObjects -> properties -> uiValues) into your own entity attributes, instead of parsing them from a message string like returnMessage. If properties come back as a list, map it as a list entity and then filter on something like the name field in a microflow to get the correct uiValues.

answered