Setting up Integration Data Manager clients
This section contains instructions for setting up a connection between an Integration Gateway or InsuranceSuite client and Integration Data Manager.
Integration Data Manager URLs
super-galaxy | region | value |
---|---|---|
centaurus | amer | https://integrationdatamanager.api.omega2-andromeda.guidewire.net/ |
copeland | apac | https://integrationdatamanager.api.omega2-circinus.guidewire.net/ |
pandora | emea | https://integrationdatamanager.api.omega2-cartwheel.guidewire.net/ |
Setting up an Integration Gateway client
Guidewire provides an Integration Gateway component that makes it easier to call Integration Data Manager from an Integration Gateway route. The component must first be included in your build.gradle.
implementation("com.guidewire.camel:gw-camel-idm:${integrationGatewayVersion}")
To configure the component, you must set the appropriate region URL for Integration Data Manager in route.properties. For example:
gw.camel.idm.url=https://integrationdatamanager.api.omega2-andromeda.guidewire.net/
See the table above for a list of all the region URLs.
gw-camel-flexistore
component is
deprecated and will soon be unsupported. Instead, use the
gw-camel-idm
component.Integration Data Manager component methods are listed below:
idm:{API name}/{method name}
documents
createDocument
deleteDocument
retrieveDocumentMetadataFirstPage
getDocumentsBySearchKey
retrieveDocument
retrieveDocuments
updateDocumentMetadata
You must set the expected headers for the component. These headers are
CamelIdm.poolId
and
CamelIdm.schemaVersion
.
A sample route to create a document is shown below.
@Override
public void configure() throws Exception {
rest().id("check-idm-create-document")
.post("/check/idm-create-document")
.consumes("application/json")
.produces("application/json")
.description("Checks storing IDM document to given poolId")
.param().dataType("string").type(RestParamType.query).name("poolId").endParam()
.param().dataType("integer").type(RestParamType.query).name("schemaVersion").endParam()
.param().type(RestParamType.body).name("document").endParam()
.to("direct:check-idm-create-document");
from("direct:check-IDM-create-document")
.process(exchange -> {
Map<String, Object> headers = exchange.getIn().getHeaders();
ObjectNode bodyAsObjectNode = (ObjectNode) new ObjectMapper().readTree((InputStream) exchange.getIn().getBody());
DefaultMessage outbound = new DefaultMessage(exchange);
outbound.setBody(bodyAsObjectNode);
exchange.setMessage(outbound);
exchange.getIn().setHeader("poolId", headers.get("poolId"));
exchange.getIn().setHeader("schemaVersion", headers.get("schemaVersion"));
})
.toD("idm:documents/createDocument?poolId=${header.poolId}&schemaVersion=${header.schemaVersion}&inBody=document")
.process(exchange -> {
String response = new ObjectMapper().writeValueAsString(exchange.getIn().getBody());
exchange.getIn().setBody(response);
});
}
A sample route to retrieve a document is shown below.
@Override
public void configure() throws Exception {
rest().id("check-idm-retrieve-document")
.get("/check/idm-retrieve-document")
.produces("application/json")
.description("Checks retrieve document from IDM")
.param().dataType("string").type(RestParamType.query).name("poolId").endParam()
.param().dataType("string").type(RestParamType.query).name("documentId").endParam()
.to("direct:check-idm-retrieve-document");
from("direct:check-idm-retrieve-document")
.toD("idm:documents/retrieveDocument?poolId=${header.poolId}&documentId=${header.documentId}")
.process(exchange -> {
String response = new ObjectMapper().registerModule(new JavaTimeModule()).writeValueAsString(exchange.getIn().getBody());
exchange.getIn().setBody(response);
});
}
Setting up an InsuranceSuite client
Guidewire provides an Integration Data Manager client class that can be used to connect to Integration Data Manager.
You must set the external property flexistore.url
so that the client
knows which Integration Data Manager server to connect to. For a local deployment you can set this property in config.properties.
idm.url = https://idm.api.dev.ccs.guidewire.net/api/v1
Using Helios, the property values are set at the super-galaxy level for PolicyCenter, ClaimCenter, BillingCenter, and ContactManager. The same value is applicable for all tenants unless it is overwritten at a different Helios layer.
A sample call to create a document is shown below:
uses gw.api.idm.idmClient
var documentContent = "{}"
var schemaVersion = 1
var poolId = "testPool"
var idmClient = idmClient.getInstance()
var documentContent = idmClient.createDocument(poolId, schemaVersion, documentContent)
A sample call to retrieve a document is shown below:
uses gw.api.idm.idmClient
var poolId = "testPool"
var docId = "e98353f3-5c33-484b-88dd-1fbe330e0c12"
var idmClient = idmClient.getInstance()
var documentContent = idmClient.retrieveDocument(poolId, docId)
Using a secondary attribute to retrieve documents
Integration Data Manager allows a secondary attribute to be set when writing a document. You can then retrieve documents (with multiple document IDs) based on this secondary attribute.
As an InsuranceSuite client, when you create a document using the
POST
endpoint the secondary attribute can be included as an
optional query parameter. There is a corresponding GET
endpoint for
finding all document IDs associated with the secondary endpoint
(searchKey
).
The same functionality is available for an Integration Gateway client:
.toD("idm:documents/createDocument?poolId=${header.poolId}&schemaVersion=${header.schemaVersion}&searchKey=${header.searchKey}&inBody=document")
.toD("idm:documents/getDocumentsBySearchKey?poolId=${header.poolId}&searchKey=${header.searchKey}&pageLimit=${header.pageLimit}&forward=${header.forward}")