Products | Versions |
---|---|
TIBCO Collaborative Information Manager | - |
Not Applicable | - |
Resolution:
Description:
============
How to frame a webservice request to add a parent record, child record and establish a relationship between them using a single webservice call.
Environment:
==========
TIBCO Product name and version: TIBCO Collaborative Information Manager 7.21.
Operating System(s): All Operating Systems
Symptoms:
========
N/A
Cause:
=====
N/A
Resolution:
========
Use the following transaction in the webservice request. The key is to have both the parent record and child record in separate MasterCatalogRecord nodes and specify forward and reverse relationships in the respective MasterCatalogRecord node.
<Transaction>
<Command type="Add">
<MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process">
<ExternalKeys>
<Key name="MASTERCATALOGNAME" type="string">PARENT</Key>
<Key name="PRODUCTID" type="string">p23</Key>
<Key name="PRODUCTIDEXT" type="string">p23</Key>
</ExternalKeys>
<RelationshipData>
<Relationship>
<RelationType>CONTAINS</RelationType>
<RelatedEntities>
<MasterCatalogRecord etype = "Entity">
<ExternalKeys>
<Key name = "MASTERCATALOGNAME">CHILD</Key>
<Key name = "PRODUCTID">c23</Key>
<Key name = "PRODUCTIDEXT">c23</Key>
</ExternalKeys>
<EntityData>
<Attribute name ="QUANTITY">1</Attribute>
</EntityData>
</MasterCatalogRecord>
</RelatedEntities>
</Relationship>
</RelationshipData>
</MasterCatalogRecord>
<MasterCatalogRecord etype="Entity" commandqualifier="Validate/Process">
<ExternalKeys>
<Key name="MASTERCATALOGNAME" type="string">CHILD</Key>
<Key name="PRODUCTID" type="string">c23</Key>
<Key name="PRODUCTIDEXT" type="string">c23</Key>
</ExternalKeys>
<RelationshipData>
<Relationship>
<RelationType>CONTAINEDBY</RelationType>
<RelatedEntities>
<MasterCatalogRecord etype="Entity">
<ExternalKeys>
<Key name="MASTERCATALOGNAME" type="string">PARENT</Key>
<Key name="PRODUCTID" type="string">p23</Key>
<Key name="PRODUCTIDEXT" type="string">p23</Key>
</ExternalKeys>
<EntityData>
<Attribute name="QUANTITY" type="integer">1</Attribute>
</EntityData>
</MasterCatalogRecord>
</RelatedEntities>
</Relationship>
</RelationshipData>
</MasterCatalogRecord>
</Command>
</Transaction>
Attachments:
==========
N/A
References:
=========
N/A
Keywords/Tags:
=============
parent record child relationship single call