Create a relation between two WorkspaceObj on Create

0
i have the Problem that i want to create a WSobj and on create its needs a Relation so i cant create the WSob and then set the Relation TC throws an error:    The following errors were returned from the Teamcenter server:The operation input requires a value for the property: "Vendor" for the Business Object: "Vendor Part".Unable to create Business Object.   How can i do that, is there a java action for that?  
asked
4 answers
1

You can create a Vendor Part for an existing Vendor by doing the following:

  1. Create a new Entity VendorPartCreateInput with generalisation ItemCreateInput
  2. Add a string property to this entity called vm0vendor_ref
  3. When you create the Vendor Part, create a VendorPartCreateInput with vm0vendor_ref set to $Vendor/UID and use this as the input to the Create Object activity

image.png

image.png

image.png

answered
0

here is a screenshot of CreateInput (I tried to create and set compoundCreatinput with _referencePropname='vm0vendor_ref' but that did not work either, so ignore the error, its just for displaying what i tried.)

 

But i am also not sure how else the vendor can be added on the creation ( i have the Vendor as Input parameter WorkspaceObject but not sure how i can Link it to the VP at creation of a Vendorpart Workspaceobject.

 

PS: to confirm i use then the createobject java action--> DataManagement/createRelateAndSubmitObjects2DataManagement/createRelateAndSubmitObjects2

image.png

answered
0

oh i think its not yet supported i found this lines in one of the java actions 

 

        // To be supported in future        buffer.append(REQ_TARGETOBJECT_KEY);        buffer.append("\"\",");

        // To be supported in future        buffer.append(REQ_PASTEPROP_KEY);        buffer.append(" \"\"");

 

and thats for creating the relation on create..

 

So a BASIC Functionality like that is not yet supported ? do i understand that correct?

 

 

answered
-1

Looks like you're trying to create a Vendor Part, which must be linked to a Vendor at creation.

If you use Teamcenter web client and show developer tools, you can see how the Vendor uid is sent as a property value during creation.

image.png

answered