Guidewire InsuranceNow is a cloud-based insurance platform offering comprehensive tools for policy, billing, and claims management, designed to streamline operations and improve customer service in the insurance industry.
The ballerinax/guidewire.insnow
package provides a client API to connect to Guidewire InsuranceNow cloud API using Ballerina.
The Ballerina Guidewire InsuranceNow connector is compatible with the Guidewire InsuranceNow 2023.3 (Innsbruck)
REST API version.
To use the Ballerina Guidewire InsuranceNow connector, access to the Guidewire API is required. Access is granted to partners or customers of the Guidewire platform. To become a partner or customer, reach out to Guidewire's sales team via the Guidewire website. For detailed instructions on obtaining authentication/authorization keys, please go through the portal development guide.
To use the Guidewire InsuranceNow connector in your Ballerina application, modify the .bal
file as follows:
Import ballerinax/guidewire.insnow
module into your Ballerina project.
import ballerinax/guidewire.insnow;
Create an insnow:Client
object with your domain URL and relevant authentication options.
configurable string username = ?;
configurable string password = ?;
insnow:ConnectionConfig insnowConfig = {
auth: {
username,
password
}
};
insnow:Client insuranceNow = check new (insnowConfig, "https://<your-domain>/coreapi/v5");
Now, utilize the available connector operations.
insnow:ListApplication applications = check insuranceNow->/applications();
insnow:Attachment attachment = {
compositeFile: [
{
fileName: "insurance_application_form.pdf",
id: "comp-app-form-001"
}
],
description: "Application and supporting documents for auto insurance policy.",
filename: "complete_insurance_application_bundle.pdf",
id: "doc-789456",
linkReferences: [
{
description: "Link to customer's policy.",
id: "link-policy-456789",
idRef: "policy-123456",
modelName: "CustomerPolicy",
status: "Pending",
systemIdRef: "gw-insurance-system-001"
}
],
tags: [
{
id: "tag-policy-application",
name: "Policy Application",
tagTemplateIdRef: "template-policy-app"
},
{
id: "tag-auto-insurance",
name: "Auto Insurance",
tagTemplateIdRef: "template-auto-ins"
}
],
templateId: "template-insurance-application"
};
_ = check insuranceNow->/applications/["123"]/documents.post(attachment);
bal run
The Guidewire InsuranceNow connector provides practical examples illustrating usage in various scenarios. Explore these examples, covering the following use cases:
- Online application portal - Implement an online insurance application portal using Guidewire InsuranceNow cloud API.
-
Download and install Java SE Development Kit (JDK) version 17. You can download it from either of the following sources:
Note: After installation, remember to set the
JAVA_HOME
environment variable to the directory where JDK was installed. -
Download and install Ballerina Swan Lake.
-
Download and install Docker.
Note: Ensure that the Docker daemon is running before executing any tests.
-
Export Github Personal access token with read package permissions as follows,
export packageUser=<Username> export packagePAT=<Personal access token>
The following command was used to generate the Ballerina client from the OpenAPI specification. The command should be executed from the repository root directory.
bal openapi -i docs/spec/openapi.yml --mode client --license docs/license.txt -o ballerina
Note: The license year is hardcoded to 2024, change if necessary.
Execute the commands below to build from the source.
-
To build the package:
./gradlew clean build
-
To run the tests:
./gradlew clean test
-
To build the without the tests:
./gradlew clean build -x test
-
To run tests against different environments:
./gradlew clean test -Pgroups=<Comma separated groups/test cases>
-
To debug the package with a remote debugger:
./gradlew clean build -Pdebug=<port>
-
To debug with the Ballerina language:
./gradlew clean build -PbalJavaDebug=<port>
-
Publish the generated artifacts to the local Ballerina Central repository:
./gradlew clean build -PpublishToLocalCentral=true
-
Publish the generated artifacts to the Ballerina Central repository:
./gradlew clean build -PpublishToCentral=true
As an open-source project, Ballerina welcomes contributions from the community.
For more information, go to the contribution guidelines.
All the contributors are encouraged to read the Ballerina Code of Conduct.
- For more information go to the
guidewire.insnow
package. - For example demonstrations of the usage, go to Ballerina By Examples.
- Chat live with us via our Discord server.
- Post all technical questions on Stack Overflow with the #ballerina tag.