Skip to main content

Upgrading Documentum D2 SmartView SDK to the latest version

With Documentum D2 SmartView SDK, new features will be added and delivered in each release. So,the SDK workspace need to be updated for consuming newly delivered feature.

D2 SmartView SDK provides an automated way to update the current workspace to the latest version of SDK.

Steps to update existing workspace to new version SDK.

  • Close any IDE opened in existing workspace root.
  • Close all the processes related to D2 SmartView SDK like documentation server or workspace assistant.
  • Take backup of lib([Existing SDK workspace root]/lib) folder in workspace root, if any third-party jar dependencies are added in the workspace. Because the workspace root lib folder will be regenerated as part of workspace upgrade.
  • User must have Delete permission on directory where D2-SmartView SDK workspace exist.
  • Unzip D2SV-SDK-24.2.0.zip
  • Copy d2sdk-maven-plugin-24.2.0.jar from following path in zip.
    • D2SV-SDK-24.2.0 (Archive root)/tools/
  • Paste the copied d2sdk-maven-plugin-24.2.0.jar in following path.
    • d2sv-sdk-23.2.0(Existing SDK workspace root)/tools/
  • Execute the following command in D2SV-SDK-23.4.0(Existing SDK workspace root) using Command Prompt. With this command execution, current SDK workspace will be updated with latest D2-SmartView dependencies and changes.
    • ws-update.bat
  • Wait for Success message for SDK update.

Testing workspace upgrade and update all plugins in the workspace

  • Execute npm start in workspace root folder in terminal application.
  • Choose option Build all plugins in this workspace to compile and build all plugins in the workspace. This operation will restore all symbolic folder links in the workspace plugin. Check the generated plugin jars in dist folder in workspace root.
  • Choose option Check out the documentation to open the SDK documentation and verify the version in the documentation.
  • Deploy the generated plugin in server validating UI code and Backend code is compatible with new version of D2 SmartView SDK.
  • Run the plugins in local node server for validating UI code is compatible with new version of D2 SmartView SDK.
  • Open the updated SDK workspace in IDE.

Effect of workspace update

  • Current workspace will be updated with latest 24.2.0 dependencies for UI and REST.
  • Documentation will be updated with latest D2 SmartView 24.2.0.
  • Backup will be created for root pom.xml and package.json with version number suffix. (package_23.2.0.json.bak and pom_23.2.0.xml.bak)
  • Backup will be created for existing workspace as zip file in same directory where workspace exist. If workspace root folder name D2SV-SDK-WORKSPACE then zip name will be D2SV-SDK-WORKSPACE_23.4.0_bak.zip.
  • SDK infrastructure will be updated for root SDK and all plugin modules in workspace.
  • When the plugin is updated for new version D2-SmartView SDK, plugin's runtime initializer file will be regenerated as per new SDK specification.
  • Restoring the plugin's runtime initializer for SmartView

    • SmartView initializer file is located in inside source code of SmartView path.
      • Path: [WORKSPACE_ROOT]/[PLUGIN_ROOT]/[PLUGIN_NAME]/src/main/smartview/src/[PLUGIN_NAMESPACE]-init.js
      • Sample Path: D2SV-SDK/plugins/D2-AdminGroups/src/main/smartview/src/admingroups-init.js.
    • If any plugin project is having additional code written inside the SmartView initializer, then the same must be restored in the generated plugin initializer file after the update.
    • During SDK update, a backup of the old version SmartView plugin initializer file will be created by the same name with .bak extension. With the help of the backup file, An SDK developer has to manually restore the previously written additional code in the new SmartView plugin initializer file.
      • Sample backup file: admingroups-init.js.bak is the backup of admingroups-init.js

Troubleshooting SDK Update

  • Restoring Dependencies

    • As part of SDK upgrade, workspace root pom.xml and package.json will be regenerated with new dependencies.
    • If SDK developer has added any new java dependency in pom.xml or new npm dependency in package.json in older version, then those dependencies need to be restored again in new version pom.xml and package.json.
    • For SDK developer's reference, backup created for the older version pom.xml and package.json file.
  • Restoring workspace with older version of SDK

    • When upgrade SDK fails, D2 SmartView SDK developer can restore the SDK workspace to older version.
    • As part of SDK upgrade, complete workspace backup is created as zip file in same directory where workspace exist.
    • If ws-update.bat execution fails, D2 SmartView SDK developer can restore the SDK workspace to older version using the backup zip file.
      • Steps to restore the older version of workspace
        • Unzip the backup zip file.
        • Delete the new version of d2sdk-maven-plugin.jar in tools folder and keep only the old version of the same jar.
        • Update current root folder's path in lib.path property in root pom.xml for pointing to older dependency. Since this zip is back of original workspace, the original workspace path will be available in lib.path property.
        • Execute the ws-init.bat -fo (ws-init with force overwrite argument) command in extracted folder using Command Prompt.
        • With this command execution, current SDK workspace will be restored with older version of D2-SmartView dependencies and changes.
        • Later same workspace can be upgraded to new version of SDK. While update the workspace from backup to the new version, keep only latest version of d2sdk-maven-plugin.jar.
  • Handling Java and Spring upgrade

    • From 23.4.0 Documentum and D2-Rest has migrated to the new version of Java v17 and Spring v6.
    • Tomcat server need to be upgraded to version 10.
    • If there was any Java code uses older Java or Spring dependencies in any of the plugin, then build will be failing for those plugins.
    • SDK developer need to manually fix the compilation issues, which is caused due to Java and Spring upgrade.
  • Handling SDK upgrade for excluded modules

    • If some plugin modules are excluded from root pom.xml, then those plugins are not considered for SDK upgrade automation.
    • The upgrade for the excluded plugins in the workspace need to be done manually.
    • For such excluded plugins, create a new plugin and migrate the source code changes manually.