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.
  • Unzip D2SV-SDK-23.4.0.zip
  • Copy d2sdk-maven-plugin-23.4.0.jar from following path in zip.
    • D2SV-SDK-23.4.0 (Archive root)/tools/
  • Paste the copied d2sdk-maven-plugin-23.4.0.jar in following path.
    • d2sv-sdk-23.2.0(Existing SDK workspace root)/tools/
  • Execute the following command in D2SV-SDK-23.2.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 23.4.0 dependencies for UI and REST.
  • Documentation will be updated with latest D2 Smartview 23.4.0.
  • SDK infrastructure will be updated for root SDK and all plugin modules in workspace.
  • 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.

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.
    • So that, SDK developer can restore the workspace with older version of SDK.
      • 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 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.
  • Handling Java and Spring upgrade

    • In 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.