guidewire-upgrade-migration

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Guidewire Upgrade & Migration

Guidewire升级与迁移

Overview

概述

Plan and execute Guidewire InsuranceSuite version upgrades and migrations between self-managed and cloud environments.
规划并执行Guidewire InsuranceSuite版本升级,以及自管环境与云环境之间的迁移。

Prerequisites

前提条件

  • Current version documentation
  • Access to Guidewire Community and documentation
  • Test environment for validation
  • Backup of current system
  • 当前版本的文档
  • 可访问Guidewire社区及官方文档
  • 用于验证的测试环境
  • 当前系统的备份

Version Upgrade Planning

版本升级规划

Guidewire Release Cadence

Guidewire发布节奏

Release TypeFrequencySupport PeriodExample
MajorAnnual3 years2024.x
MinorQuarterlyUntil next minor202503
PatchMonthlyUntil next patch202503.1
发布类型频率支持周期示例
重大版本每年3年2024.x
次要版本每季度至下一个次要版本发布202503
补丁版本每月至下一个补丁版本发布202503.1

Upgrade Path Matrix

升级路径矩阵

Current Version     Target Version      Recommended Path
---------------     --------------      ----------------
2022.x             2024.x              2022 -> 2023 -> 2024
2023.x             2024.x              2023 -> 2024
On-Premise 10.x    Cloud 2024.x        Direct migration with PCF
Current Version     Target Version      Recommended Path
---------------     --------------      ----------------
2022.x             2024.x              2022 -> 2023 -> 2024
2023.x             2024.x              2023 -> 2024
On-Premise 10.x    Cloud 2024.x        Direct migration with PCF

Instructions

操作步骤

Step 1: Assess Current State

步骤1:评估当前状态

bash
#!/bin/bash
bash
#!/bin/bash

assess-current-version.sh

assess-current-version.sh

echo "=== Guidewire Version Assessment ==="
echo "=== Guidewire Version Assessment ==="

Check current version from build files

Check current version from build files

CURRENT_VERSION=$(grep -m1 'guidewire.version' gradle.properties | cut -d= -f2) echo "Current Guidewire Version: $CURRENT_VERSION"
CURRENT_VERSION=$(grep -m1 'guidewire.version' gradle.properties | cut -d= -f2) echo "Current Guidewire Version: $CURRENT_VERSION"

List custom Gosu files

List custom Gosu files

echo "" echo "Custom Gosu Files:" find modules/configuration/gsrc -name "*.gs" -type f | wc -l echo " Gosu source files"
echo "" echo "Custom Gosu Files:" find modules/configuration/gsrc -name "*.gs" -type f | wc -l echo " Gosu source files"

List PCF customizations

List PCF customizations

echo "" echo "PCF Customizations:" find modules/configuration/config -name "*.pcf" -type f | wc -l echo " PCF files"
echo "" echo "PCF Customizations:" find modules/configuration/config -name "*.pcf" -type f | wc -l echo " PCF files"

List entity extensions

List entity extensions

echo "" echo "Entity Extensions:" find modules/configuration/config -name "*_ext.xml" -type f | wc -l echo " extension files"
echo "" echo "Entity Extensions:" find modules/configuration/config -name "*_ext.xml" -type f | wc -l echo " extension files"

List integration points

List integration points

echo "" echo "Integration Points:" grep -r "gw.api.rest" modules/configuration/gsrc --include="*.gs" | wc -l echo " REST API integrations"
grep -r "gw.api.webservice" modules/configuration/gsrc --include="*.gs" | wc -l echo " SOAP integrations"
undefined
echo "" echo "Integration Points:" grep -r "gw.api.rest" modules/configuration/gsrc --include="*.gs" | wc -l echo " REST API integrations"
grep -r "gw.api.webservice" modules/configuration/gsrc --include="*.gs" | wc -l echo " SOAP integrations"
undefined

Step 2: Review Breaking Changes

步骤2:检查破坏性变更

typescript
// Breaking change analysis script
interface BreakingChange {
  version: string;
  category: 'API' | 'Gosu' | 'Database' | 'Configuration';
  description: string;
  impact: 'High' | 'Medium' | 'Low';
  migration: string;
}

const breakingChanges: BreakingChange[] = [
  {
    version: '2024.03',
    category: 'API',
    description: 'Deprecated endpoints removed from Cloud API',
    impact: 'High',
    migration: 'Update to new endpoint paths - see migration guide'
  },
  {
    version: '2024.03',
    category: 'Gosu',
    description: 'Query API syntax changes for complex joins',
    impact: 'Medium',
    migration: 'Update Query.make() calls with new join syntax'
  },
  {
    version: '2024.01',
    category: 'Database',
    description: 'Column type changes for monetary amounts',
    impact: 'High',
    migration: 'Run provided migration script before upgrade'
  }
];

function analyzeImpact(currentVersion: string, targetVersion: string): void {
  const applicableChanges = breakingChanges.filter(change => {
    return compareVersions(change.version, currentVersion) > 0 &&
           compareVersions(change.version, targetVersion) <= 0;
  });

  console.log('=== Breaking Changes Analysis ===');
  console.log(`From: ${currentVersion} To: ${targetVersion}`);
  console.log(`Total breaking changes: ${applicableChanges.length}`);

  const byCategory = applicableChanges.reduce((acc, change) => {
    acc[change.category] = acc[change.category] || [];
    acc[change.category].push(change);
    return acc;
  }, {} as Record<string, BreakingChange[]>);

  Object.entries(byCategory).forEach(([category, changes]) => {
    console.log(`\n${category}:`);
    changes.forEach(change => {
      console.log(`  [${change.impact}] ${change.description}`);
      console.log(`    Migration: ${change.migration}`);
    });
  });
}
typescript
// Breaking change analysis script
interface BreakingChange {
  version: string;
  category: 'API' | 'Gosu' | 'Database' | 'Configuration';
  description: string;
  impact: 'High' | 'Medium' | 'Low';
  migration: string;
}

const breakingChanges: BreakingChange[] = [
  {
    version: '2024.03',
    category: 'API',
    description: 'Deprecated endpoints removed from Cloud API',
    impact: 'High',
    migration: 'Update to new endpoint paths - see migration guide'
  },
  {
    version: '2024.03',
    category: 'Gosu',
    description: 'Query API syntax changes for complex joins',
    impact: 'Medium',
    migration: 'Update Query.make() calls with new join syntax'
  },
  {
    version: '2024.01',
    category: 'Database',
    description: 'Column type changes for monetary amounts',
    impact: 'High',
    migration: 'Run provided migration script before upgrade'
  }
];

function analyzeImpact(currentVersion: string, targetVersion: string): void {
  const applicableChanges = breakingChanges.filter(change => {
    return compareVersions(change.version, currentVersion) > 0 &&
           compareVersions(change.version, targetVersion) <= 0;
  });

  console.log('=== Breaking Changes Analysis ===');
  console.log(`From: ${currentVersion} To: ${targetVersion}`);
  console.log(`Total breaking changes: ${applicableChanges.length}`);

  const byCategory = applicableChanges.reduce((acc, change) => {
    acc[change.category] = acc[change.category] || [];
    acc[change.category].push(change);
    return acc;
  }, {} as Record<string, BreakingChange[]>);

  Object.entries(byCategory).forEach(([category, changes]) => {
    console.log(`\n${category}:`);
    changes.forEach(change => {
      console.log(`  [${change.impact}] ${change.description}`);
      console.log(`    Migration: ${change.migration}`);
    });
  });
}

Step 3: Database Upgrade

步骤3:数据库升级

groovy
// build.gradle - Database upgrade tasks
tasks.register('backupDatabase') {
    doLast {
        exec {
            commandLine 'pg_dump', '-h', dbHost, '-U', dbUser,
                       '-d', dbName, '-F', 'c',
                       '-f', "backup-${dbName}-${new Date().format('yyyyMMdd-HHmmss')}.dump"
        }
    }
}

tasks.register('upgradeDatabase') {
    dependsOn 'backupDatabase'
    doLast {
        // Run Guidewire database upgrade
        exec {
            commandLine './gradlew', 'dbupgrade',
                       "-PdbHost=${dbHost}",
                       "-PdbName=${dbName}",
                       "-PdbUser=${dbUser}",
                       "-PdbPassword=${dbPassword}"
        }
    }
}

tasks.register('validateDatabaseUpgrade') {
    dependsOn 'upgradeDatabase'
    doLast {
        // Verify schema version
        def result = exec {
            commandLine 'psql', '-h', dbHost, '-U', dbUser, '-d', dbName,
                       '-c', 'SELECT version FROM schema_version ORDER BY id DESC LIMIT 1'
            standardOutput = new ByteArrayOutputStream()
        }
        println "Current schema version: ${result.standardOutput}"
    }
}
groovy
// build.gradle - Database upgrade tasks
tasks.register('backupDatabase') {
    doLast {
        exec {
            commandLine 'pg_dump', '-h', dbHost, '-U', dbUser,
                       '-d', dbName, '-F', 'c',
                       '-f', "backup-${dbName}-${new Date().format('yyyyMMdd-HHmmss')}.dump"
        }
    }
}

tasks.register('upgradeDatabase') {
    dependsOn 'backupDatabase'
    doLast {
        // Run Guidewire database upgrade
        exec {
            commandLine './gradlew', 'dbupgrade',
                       "-PdbHost=${dbHost}",
                       "-PdbName=${dbName}",
                       "-PdbUser=${dbUser}",
                       "-PdbPassword=${dbPassword}"
        }
    }
}

tasks.register('validateDatabaseUpgrade') {
    dependsOn 'upgradeDatabase'
    doLast {
        // Verify schema version
        def result = exec {
            commandLine 'psql', '-h', dbHost, '-U', dbUser, '-d', dbName,
                       '-c', 'SELECT version FROM schema_version ORDER BY id DESC LIMIT 1'
            standardOutput = new ByteArrayOutputStream()
        }
        println "Current schema version: ${result.standardOutput}"
    }
}

Step 4: Code Migration

步骤4:代码迁移

gosu
// Automated code migration helpers
package gw.migration

uses gw.api.util.Logger

class CodeMigrationHelper {
  private static final var LOG = Logger.forCategory("Migration")

  // Replace deprecated API calls
  static function migrateDeprecatedAPIs(code : String) : String {
    var migrated = code

    // Example: Migrate old Query syntax
    migrated = migrated.replaceAll(
      "Query\\.make\\(([^)]+)\\)\\.withEqual",
      "Query.make($1).compare"
    )

    // Example: Migrate old date handling
    migrated = migrated.replaceAll(
      "new Date\\(\\)",
      "Date.Today"
    )

    // Example: Migrate deprecated methods
    migrated = migrated.replaceAll(
      "\\.getBundle\\(\\)",
      ".Bundle"
    )

    return migrated
  }

  // Check for deprecated patterns
  static function findDeprecatedPatterns(code : String) : List<String> {
    var issues = new ArrayList<String>()

    var patterns = {
      "deprecated_query" -> "Query.make.*withEqual",
      "old_date" -> "new java.util.Date\\(\\)",
      "string_concat_in_query" -> "\"SELECT.*\\+.*\\+",
      "deprecated_session" -> "SessionInfo.getCurrentSession"
    }

    patterns.eachKeyAndValue(\name, pattern -> {
      if (code.matches(".*${pattern}.*")) {
        issues.add("Found deprecated pattern: ${name}")
      }
    })

    return issues
  }
}
gosu
// Automated code migration helpers
package gw.migration

uses gw.api.util.Logger

class CodeMigrationHelper {
  private static final var LOG = Logger.forCategory("Migration")

  // Replace deprecated API calls
  static function migrateDeprecatedAPIs(code : String) : String {
    var migrated = code

    // Example: Migrate old Query syntax
    migrated = migrated.replaceAll(
      "Query\\.make\\(([^)]+)\\)\\.withEqual",
      "Query.make($1).compare"
    )

    // Example: Migrate old date handling
    migrated = migrated.replaceAll(
      "new Date\\(\\)",
      "Date.Today"
    )

    // Example: Migrate deprecated methods
    migrated = migrated.replaceAll(
      "\\.getBundle\\(\\)",
      ".Bundle"
    )

    return migrated
  }

  // Check for deprecated patterns
  static function findDeprecatedPatterns(code : String) : List<String> {
    var issues = new ArrayList<String>()

    var patterns = {
      "deprecated_query" -> "Query.make.*withEqual",
      "old_date" -> "new java.util.Date\\(\\)",
      "string_concat_in_query" -> "\"SELECT.*\\+.*\\+",
      "deprecated_session" -> "SessionInfo.getCurrentSession"
    }

    patterns.eachKeyAndValue(\name, pattern -> {
      if (code.matches(".*${pattern}.*")) {
        issues.add("Found deprecated pattern: ${name}")
      }
    })

    return issues
  }
}

Step 5: Configuration Migration

步骤5:配置迁移

bash
#!/bin/bash
bash
#!/bin/bash

migrate-configuration.sh

migrate-configuration.sh

TARGET_VERSION="202503" SOURCE_DIR="./modules/configuration" BACKUP_DIR="./migration-backup-$(date +%Y%m%d)"
echo "=== Configuration Migration to $TARGET_VERSION ==="
TARGET_VERSION="202503" SOURCE_DIR="./modules/configuration" BACKUP_DIR="./migration-backup-$(date +%Y%m%d)"
echo "=== Configuration Migration to $TARGET_VERSION ==="

Backup current configuration

Backup current configuration

echo "Backing up current configuration..." mkdir -p "$BACKUP_DIR" cp -r "$SOURCE_DIR" "$BACKUP_DIR/"
echo "Backing up current configuration..." mkdir -p "$BACKUP_DIR" cp -r "$SOURCE_DIR" "$BACKUP_DIR/"

Update product model references

Update product model references

echo "Updating product model references..." find "$SOURCE_DIR/config/products" -name ".xml" -exec sed -i
's/xmlns="http://guidewire.com/pc/product/[0-9]
"/xmlns="http://guidewire.com/pc/product/'"$TARGET_VERSION"'"/' {} ;
echo "Updating product model references..." find "$SOURCE_DIR/config/products" -name ".xml" -exec sed -i
's/xmlns="http://guidewire.com/pc/product/[0-9]
"/xmlns="http://guidewire.com/pc/product/'"$TARGET_VERSION"'"/' {} ;

Update typelist references

Update typelist references

echo "Updating typelist references..." find "$SOURCE_DIR/config/typelist" -name ".xml" -exec sed -i
's/schemaVersion="[0-9]
"/schemaVersion="'"$TARGET_VERSION"'"/' {} ;
echo "Updating typelist references..." find "$SOURCE_DIR/config/typelist" -name ".xml" -exec sed -i
's/schemaVersion="[0-9]
"/schemaVersion="'"$TARGET_VERSION"'"/' {} ;

Validate XML files

Validate XML files

echo "Validating XML files..." find "$SOURCE_DIR/config" -name "*.xml" -exec xmllint --noout {} ; 2>&1
echo "Configuration migration complete"
undefined
echo "Validating XML files..." find "$SOURCE_DIR/config" -name "*.xml" -exec xmllint --noout {} ; 2>&1
echo "Configuration migration complete"
undefined

Step 6: Integration Migration

步骤6:集成迁移

typescript
// API version migration
interface EndpointMigration {
  oldPath: string;
  newPath: string;
  changes: string[];
}

const endpointMigrations: EndpointMigration[] = [
  {
    oldPath: '/account/v1/accounts/{id}/policies',
    newPath: '/account/v1/accounts/{id}/active-policies',
    changes: ['Path renamed', 'Only returns in-force policies']
  },
  {
    oldPath: '/job/v1/submissions/{id}/quote',
    newPath: '/job/v1/submissions/{id}/actions/quote',
    changes: ['Moved to actions sub-resource']
  }
];

function migrateApiCalls(code: string, fromVersion: string, toVersion: string): string {
  let migratedCode = code;

  endpointMigrations.forEach(migration => {
    const oldPattern = new RegExp(
      migration.oldPath.replace(/\{[^}]+\}/g, '[^/]+'),
      'g'
    );

    if (oldPattern.test(migratedCode)) {
      console.log(`Migrating: ${migration.oldPath} -> ${migration.newPath}`);
      console.log(`  Changes: ${migration.changes.join(', ')}`);

      migratedCode = migratedCode.replace(
        migration.oldPath,
        migration.newPath
      );
    }
  });

  return migratedCode;
}
typescript
// API version migration
interface EndpointMigration {
  oldPath: string;
  newPath: string;
  changes: string[];
}

const endpointMigrations: EndpointMigration[] = [
  {
    oldPath: '/account/v1/accounts/{id}/policies',
    newPath: '/account/v1/accounts/{id}/active-policies',
    changes: ['Path renamed', 'Only returns in-force policies']
  },
  {
    oldPath: '/job/v1/submissions/{id}/quote',
    newPath: '/job/v1/submissions/{id}/actions/quote',
    changes: ['Moved to actions sub-resource']
  }
];

function migrateApiCalls(code: string, fromVersion: string, toVersion: string): string {
  let migratedCode = code;

  endpointMigrations.forEach(migration => {
    const oldPattern = new RegExp(
      migration.oldPath.replace(/\{[^}]+\}/g, '[^/]+'),
      'g'
    );

    if (oldPattern.test(migratedCode)) {
      console.log(`Migrating: ${migration.oldPath} -> ${migration.newPath}`);
      console.log(`  Changes: ${migration.changes.join(', ')}`);

      migratedCode = migratedCode.replace(
        migration.oldPath,
        migration.newPath
      );
    }
  });

  return migratedCode;
}

Step 7: Testing Migration

步骤7:迁移测试

gosu
// Migration test suite
package gw.migration.test

uses gw.testharness.v3.PLTestCase
uses gw.testharness.v3.PLAssert

class MigrationTestSuite extends PLTestCase {

  function testQueryAPICompatibility() {
    // Test new Query API syntax works
    var accounts = Query.make(Account)
      .compare(Account#AccountStatus, Equals, AccountStatus.TC_ACTIVE)
      .select()
      .toList()

    PLAssert.assertNotNull(accounts)
  }

  function testEntityExtensions() {
    // Verify custom entity extensions still work
    var policy = createTestPolicy()
    policy.CustomField_Ext = "Test Value"
    policy.Bundle.commit()

    var loaded = Query.make(Policy)
      .compare(Policy#ID, Equals, policy.ID)
      .select()
      .AtMostOneRow

    PLAssert.assertEquals("Test Value", loaded.CustomField_Ext)
  }

  function testIntegrationEndpoints() {
    // Verify integration endpoints respond correctly
    var client = new ExternalServiceClient()
    var response = client.healthCheck()
    PLAssert.assertTrue(response.isHealthy())
  }

  function testDataMigration() {
    // Verify migrated data integrity
    var count = Query.make(Account).select().Count
    PLAssert.assertTrue(count > 0, "Expected migrated accounts")
  }
}
gosu
// Migration test suite
package gw.migration.test

uses gw.testharness.v3.PLTestCase
uses gw.testharness.v3.PLAssert

class MigrationTestSuite extends PLTestCase {

  function testQueryAPICompatibility() {
    // Test new Query API syntax works
    var accounts = Query.make(Account)
      .compare(Account#AccountStatus, Equals, AccountStatus.TC_ACTIVE)
      .select()
      .toList()

    PLAssert.assertNotNull(accounts)
  }

  function testEntityExtensions() {
    // Verify custom entity extensions still work
    var policy = createTestPolicy()
    policy.CustomField_Ext = "Test Value"
    policy.Bundle.commit()

    var loaded = Query.make(Policy)
      .compare(Policy#ID, Equals, policy.ID)
      .select()
      .AtMostOneRow

    PLAssert.assertEquals("Test Value", loaded.CustomField_Ext)
  }

  function testIntegrationEndpoints() {
    // Verify integration endpoints respond correctly
    var client = new ExternalServiceClient()
    var response = client.healthCheck()
    PLAssert.assertTrue(response.isHealthy())
  }

  function testDataMigration() {
    // Verify migrated data integrity
    var count = Query.make(Account).select().Count
    PLAssert.assertTrue(count > 0, "Expected migrated accounts")
  }
}

Cloud Migration Checklist

云迁移检查清单

Pre-Migration

迁移前

#TaskStatus
1Complete Guidewire Cloud readiness assessment[ ]
2Identify all integration points[ ]
3Document custom Gosu code[ ]
4Assess data volume and migration time[ ]
5Plan downtime window[ ]
序号任务状态
1完成Guidewire云环境就绪性评估[ ]
2识别所有集成点[ ]
3记录自定义Gosu代码[ ]
4评估数据量与迁移时长[ ]
5规划停机窗口[ ]

Migration Execution

迁移执行

#TaskStatus
6Export configuration from on-premise[ ]
7Transform configuration for Cloud[ ]
8Deploy to Cloud sandbox[ ]
9Run smoke tests[ ]
10Migrate data[ ]
11Update integration endpoints[ ]
12Validate all functionality[ ]
序号任务状态
6从自管环境导出配置[ ]
7转换配置以适配云环境[ ]
8部署至云沙箱环境[ ]
9运行冒烟测试[ ]
10迁移数据[ ]
11更新集成端点[ ]
12验证所有功能[ ]

Post-Migration

迁移后

#TaskStatus
13Performance testing[ ]
14Security validation[ ]
15User acceptance testing[ ]
16Go-live approval[ ]
序号任务状态
13性能测试[ ]
14安全验证[ ]
15用户验收测试[ ]
16上线审批[ ]

Rollback Procedure

回滚流程

bash
#!/bin/bash
bash
#!/bin/bash

rollback-upgrade.sh

rollback-upgrade.sh

echo "=== Upgrade Rollback ==="
echo "=== Upgrade Rollback ==="

Restore database backup

Restore database backup

LATEST_BACKUP=$(ls -t backup-*.dump | head -1) echo "Restoring from: $LATEST_BACKUP"
pg_restore -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" -c "$LATEST_BACKUP"
LATEST_BACKUP=$(ls -t backup-*.dump | head -1) echo "Restoring from: $LATEST_BACKUP"
pg_restore -h "$DB_HOST" -U "$DB_USER" -d "$DB_NAME" -c "$LATEST_BACKUP"

Restore code to previous version

Restore code to previous version

git checkout previous-version ./gradlew clean build
git checkout previous-version ./gradlew clean build

Restart services

Restart services

./gradlew runServer
echo "Rollback complete - verify system functionality"
undefined
./gradlew runServer
echo "Rollback complete - verify system functionality"
undefined

Output

输出成果

  • Version assessment report
  • Breaking change analysis
  • Migration scripts
  • Test results
  • Rollback procedure
  • 版本评估报告
  • 破坏性变更分析报告
  • 迁移脚本
  • 测试结果
  • 回滚流程文档

Resources

参考资源

Next Steps

下一步

For CI/CD integration, see
guidewire-ci-integration
.
如需集成CI/CD,请查看
guidewire-ci-integration
文档。