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
Region | Value |
---|---|
AMER | https://integrationdatamanager.api.omega2-andromeda.guidewire.net/ |
Canada | https://integrationdatamanager.api.omega2-butterfly.guidewire.net/ |
APAC | https://integrationdatamanager.api.omega2-circinus.guidewire.net/ |
EMEA | https://integrationdatamanager.api.omega2-cartwheel.guidewire.net/ |
Japan | https://integrationdatamanager.api.omega2-milkyway.guidewire.net/ |
Switzerland | https://integrationdatamanager.api.omega2-whirlpool.guidewire.net/ |
Scopes
Each pool in Integration Data Manager is like a database table, and access to these
pools is managed by using scopes. When a new pool is created in Integration Data
Manager a corresponding scp.flexistore
scope is automatically
generated for that pool. Use that scope to grant Integration Gateway applications
and other services the necessary permissions to read from or write to that pool.
The format is
scp.flexistore.insurerCode.project.poolID
,
where insurerCode is the code for the insurer or tenant,
project is the project or environment identifier, and
poolID is the specific pool within Integration Data Manager
being granted access. For example, a scope named
scp.flexistore.company.gwcp.agency_pool
grants access to the
pool named agency_pool
for the company
insurer in
the gwcp
project.
An Integration Gateway application might include several related Integration Data Manager scopes in its list of scopes. For example:
"scopes": [
"appeventsnapshots.execute",
"cassini.discovery",
"ccs-property-service.igtestapp.read",
"ccs-property-service.igtestapp.secret-read",
"ccs-property-service.secret-read",
"int-gateway.dev.all.all.deploy",
"planet_class.lower",
"project.gwcp",
"scp.appeventsnapshots.read",
"scp.flexistore.preview.gwcp.CFLightSpeed",
"scp.flexistore.preview.gwcp.CFLightSpeedPropertyPrefill",
"scp.flexistore.preview.gwcp.TestAppEvent",
"tenant.preview"
],
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.
flexistore.url = <Integration Data Manager URL>/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.flexistore.FlexistoreClient
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.flexistore.FlexistoreClient
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}")