Routing Service Library Create Entity

2 posts / 0 new
Last post
jakehenry41kc's picture
Offline
Last seen: 8 months 3 weeks ago
Joined: 10/17/2017
Posts: 5
Routing Service Library Create Entity

Hello,

I am trying to use the java api for the rti routing service. I have successfully got the route running with the initial configuration file, but I need more information on how to use the createEntity and deleteEntity methods.

The following is my initial XML file which loads successfully and routing begins:

 

I am trying to add another domain route to this configuration under the "FaceBossSurfaceRouting" routing service and I have tried repeadedly with no success. The issue is that I cannot seem to figure out what the parent entity is that should be passed as the first parameter to the creatEntity method of RoutingService.java. In this scenario I would think my parent entity would be "FaceBossSurfaceRouting" but I keep getting "unsupported parent entity" errors in the routing service output. The api documentation is extremely lacking here and is in dire need of improvement. I have looked over all the API documentation and general documentation and have not been able to find an adequate example or description for what this method is expecting as the parent entity string format.

I would like some clarification on what the deleteEntity method is going to be expecting as well since the documentation states it is expecting a fully qualified entity name. I understand that qualification is usually done by using double colons but I have not been able to get that to work either.

The following is a screenshot of my java code:

Hope to hear from someone in regards to this soon.

Thanks,

Jake

Organization:
Offline
Last seen: 1 month 1 week ago
Joined: 12/05/2019
Posts: 5

Hello Jake,

I have already answered you via the Support channel, but I believe this explanation could be of help for other users in the same spot as you.

The issue here is that the parent entity of a Domain Route would have been the Routing Service entity.
As you are calling these methods from the  RoutingService instance itself, the "entity name" for the Routing Service entity is expected to be the empty string.

// Creating a new Domain Route
myRoutingService.createEntity("", xmlStringOfDomainRoute);

// Deleting a previously created Domain Route
myRoutingService.deleteEntity("MyDomainRoute");

In 6.0.0 and above, these APIs accept referencing the RoutingService entity using the name defined in XML, as well as the empty string.

// Creating a new Domain Route
myRoutingService.createEntity("MyRoutingService", xmlStringOfDomainRoute);

// Deleting a previously created Domain Route
myRoutingService.deleteEntity("MyRoutingService::MyDomainRoute");

Regards,
Alejandro