I have problem in creating xcP defined relationship using DFS
This example is right form the xCP Tutorial. They have 2 business objects cia_policy and cia_vehicle both have super type of dm_sysobject. There is reltionship defined in xCP that has created cia_vehicle_policy_relationship that has super type of dm_relation.
If we create objects thru xcp relationship gets created is of type cia_vehicle_policy_relationship, But If we want to create relatioonship thru DFS it creates relationship of type dm_relation with relation name as cia_vehicle_policy_relationship , There is no option in DFS relationship to make relationship of type cia_vehicle_policy_relationship.
The skeleton code of the DFS java code that we are trying to use.
ServiceFactory serviceFactory = ServiceFactory.getInstance();
objectService = serviceFactory.getRemoteService(IObjectService.class,serviceContext,moduleName,host);
ObjectIdentity<Object> objectIdentity = new ObjectIdentity<Object>(repository);
//Parent Object
DataObject policyDataObject = new DataObject(objectIdentity, "cia_policy");
PropertySet policyProperties = new PropertySet();
policyProperties.set("object_name", "DFS-Test-Parent-NoContent" + System.currentTimeMillis());
policyDataObject.setProperties(policyProperties);
//Child Object
DataObject vehicleDataObject = new DataObject(objectIdentity, "cia_vehicle");
PropertySet vehicleProperties = new PropertySet();
vehicleProperties.set("object_name", "DFS-Test-Child-No conetent " + System.currentTimeMillis());
vehicleDataObject.setProperties(vehicleProperties);
//Relationship Object
ObjectRelationship vehPolRelationship = new ObjectRelationship();
vehPolRelationship.setTarget(vehicleDataObject);
vehPolRelationship.setName("cia_vehicle_policy_relationship");
vehPolRelationship.setTargetRole(Relationship.ROLE_CHILD);
vehPolDataObject.getRelationships().add(objRelationship);
DataPackage dataPackage = new DataPackage(policyDataObject);
OperationOptions operationOptions = null;
dataPackage = objectService.create(dataPackage, operationOptions);
I don't know if there is option to create custom relationship(NOT dm_relation) using ObjectRelationship