Integration graphs

An integration graph is a special base configuration schema and mapper that is used by certain base configuration outbound integrations to send information about a parent object and its children objects. Integration graphs are not used by Cloud API, but the files that define them are a part of Cloud API.

As of this release, Cloud API has the following integration graphs:

  • The ClaimCenter claim_graph, whose parent is Claim
  • The PolicyCenter policyperiod_graph, whose parent is PolicyPeriod
  • The ContactManager contact_graph, whose parent is Contact

There are several outbound integrations that make use of integration graphs. Depending on the InsuranceSuite application, this may include:

  • Guidewire App Events
  • Cloud Rules
  • Analytics and Data Services (ADS)

Guidewire recommends against insurers configuring integration graphs directly. However, when you generate endpoints for a custom entity, you can also add the custom resource to an integration graph if the resource has a parent resource and that parent resource belongs to the integration graph. To add the custom resource to the graph, answer the final prompt ("Should <CustomEntity> be added to an integration graph?") with "y". There may be an additional prompt asking for the name of the graph.

When a custom entity is added to an integration graph, the REST endpoint generator modifies the following files:

  • The <graphName>_graph_ext-1.0.schema.json file
  • The <graphName>_graph_ext-1.0.mapping.json file
  • The shared_ext-1.0.apiconfig.yaml file

You do not need to configure the graph schema file. But, configurations are required in the graph mapper file and the apiconfig.yaml file.

The graph schema file

The graph schema file defines the structure of the integration graph. When you specify that you want to add a custom resource to a given graph, the REST endpoint generator adds code to the corresponding <graphName>_graph_ext-1.0.schema.json file.

Typically, the graph schema file does not require configuration.

The graph mapper file

The graph mapper file defines how information is written to the properties in an integration graph. When you specify that you want to add a custom resource to a given graph, the REST endpoint generator adds code to the corresponding <graphName>_graph_ext-1.0.mapping.json file.

You must configure the file by specifying the path for custom entity collection properties. This is typically set to the corresponding array on the parent data model entity.

Mapping in the apiconfig file

The shared_ext-1.0.apiconfig.yaml maps shared element resource and collection resources to Gosu Resource files. It also specifies URI mappings for integration graphs. When you specify that you want to add a custom resource to a graph, the REST endpoint generator adds code to the corresponding shared_ext-1.0.apiconfig.yaml file.

For example, suppose you generated endpoints for the CustomEntity_Ext data model entity and added the corresponding resource to the ContactManager Contact graph. The shared_ext-1.0.apiconfig.yaml file has the following code added (shown in bold):

entityURIMappings:
 CustomEntity_Ext:
    uri: "${parentUri}/custom-entities-ext/${CustomEntity_Ext.RestId}"
    parent: "TODO RestEndpointGenerator link to the parent of CustomEntity_Ext"

You must configure the file by specifying the parent for custom entities. This is typically set to the corresponding foreign key on the custom data model entity.

Following on from the previous example, the path attribute in the shared_ext-1.0.apiconfig.yaml file would need to be set as follows:

entityURIMappings:
  CustomEntity_Ext:
    uri: "${parentUri}/custom-entities-ext/${CustomEntity_Ext.RestId}"
    parent: "CustomEntity_Ext.Contact"

Marking graph properties as eventSafe

The REST endpoint generator also checks if the root entity for the endpoint generates events. If it does, it sets the eventSafe property on the graph mapping property appropriately.