How to capture related outputs using Teamcenter services Java action method ?

0
Hello everyone,   Context:  I’m trying to use Teamcenter services not included in Teamcenter Connector using Java Action method.   For example : I would like to invoke the below TC API     The operation mapping for the same is:     Below is my domain model:     Current Result:  The output shown is empty i.e., I’m unable to capture the output into my entities.     Expected Result: I would like to get output (secondary) object with its related input and related relationshipobjects.     Could anyone suggest me the right domain model and the operation mapping to capture the required values?
asked
5 answers
0

Hi Aishwarya, 

 

Could you maybe re-upload your pictures? Somehow it does not render for me. 

 

Best,

Vincent

answered
0

Hi Vincent,

 

I've re-uploaded the pictures. Could you please check now ? 

 

Regards,

Aishwarya

answered
0

Hi Aishwarya,

 

Thanks for uploading your example, I have a few remarks that might help you further:

- Please disregard this remark if necessary, but in your example you are customizing a SOA call that exists as a standard TcConnector activity under the name ExpandGRMRelationsForPrimary.

- When you are declaring something in your operationmapping you should always refer to either your input or output object; ExpandGRM_Output or input? and ExpandGRMResponse in your case. You reference to these objects with either $Input or $Output, which you do correctly for your input objects and attributes, but not for your output objects. In your case you should declare as follows: "$Response\/Mainmodule.<association>

- If you are trying to receive the objects over your response object please assure that the relations are associated to your response object, they are currently related to your input object it seems (eventhough it's named as output in your screenshot)

 

When you are testing please be aware of handling the partial errors correctly, setting up your own SOA calls requires a lot of trial and error!

 

Hope this was of any help.

 

Best,

Vincent

answered
0

Hi Vincent,

 

Thanks for the response.

 

My requirement is to send array of inputs and get the array of output( input + related secondary objects ).

Here I'm customizing soa because the existing microflow under TcConnector do not provide Input objects in the output.

 

I tried using this method initially ( "$Response\/Mainmodule.<association>) but always used to throw an error saying it's invalid.

Hence tried with the above method. Here, I get the right json response string ( input and its secondary objects ) without any partial errors .

The only problem I'm facing now is to capture the response as custom entities that i have defined in my domain model.

answered
0

I understand now, two responses to your comment:

  • You probably do not run into compiling or syntax errors because the Java action does not recognize your notation of an association, with the current notation it however would not know where to write the response objects to.
    • To this end I am however curious: does your request lead to a succesful response without partial errors?
  • For your specific goal I would suggest to first look into the TcConnector example module (and perhaps also of the Tc Toolkit) as this contains an example of a ExpandGRMRelationsForPrimary call, including an operation mapping!
answered