Logo

    Home

    Documentation

    Use Cases

    Training

    Applications

    Release Notes

    Add custom version to an App

    Add custom version to an App

    icon
    Custom version can be displayed in the version display shortcut of the Build.One Applications. This Use Case explains the steps needed to achieve it.
    • 1. Summary
    • 2. Result
    • 3. Step by Step Guide
    • 3.1 Step 1
    • 3.2 Step 2
    • 3.3 Step 3
    • Documentation

    1. Summary

    Build.One provides versioning out of the box. This can be seen by triggering the version display with the Alt+Shift+F1 shortcut. On development workspaces, the Build.One version will be displayed for the client and server. In standalone deployments, it will also include the version of the app.

    There are cases where developers might want to maintain display additional versions in this display. Build.One supports integrating this with our standard version display.

    2. Result

    Custom version will be displayed in the dedicated version display shortcut

    3. Step by Step Guide

    3.1 Step 1

    To achieve this, it will be needed to override the default version provider service and injecting the additional versions to the output:

    src/backend/MyApp/VersionProviderService.cls

    3.2 Step 2

    Once implemented, the service needs to be registered into the PASOE services configuration:

    <?xml version="1.0"?>
    <ttServiceLoader xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    	<ttServiceLoaderRow>
    	  <Order>0</Order>
    	  <ServiceTypeName>Akioma.Swat.Versioning.IVersionProviderService</ServiceTypeName>
    		<ServiceClassName>MyApp.VersionProviderService</ServiceClassName>
    	</ttServiceLoaderRow>
    </ttServiceLoader>
    src/backend/services.xml

    3.3 Step 3

    After trimming the PASOE, the new version should be displayed using the dedicated version display shortcut!

    Documentation

    To find more information, you can check the following documentation.

    Build.One App Build.One App

    Version ControlVersion Control

    Versions and DeploymentVersions and Deployment

    Back to Use CasesUse Cases

    Back to Build.One Help-CenterBuild.One Help-Center Home

    Logo
    BLOCK-LEVEL ON ERROR UNDO, THROW.
    
    CLASS MyApp.VersionProviderService
      INHERITS Akioma.Swat.Versioning.SwatVersionProviderService:
    
      METHOD OVERRIDE PUBLIC Progress.Json.ObjectModel.JsonArray GetVersions():
        DEFINE VARIABLE oVersionInfo AS Akioma.Swat.Versioning.VersionInfo NO-UNDO.
        DEFINE VARIABLE oVersionsArray AS Progress.Json.ObjectModel.JsonArray NO-UNDO.
    
        oVersionsArray = SUPER:GetVersions().
    
        oVersionInfo = NEW Akioma.Swat.Versioning.VersionInfo().
        oVersionInfo:Product = "MyAppCustomComponent".
        oVersionInfo:Version = "1.0.0".
        oVersionsArray:Add(oVersionInfo:ToJsonObject()).
    
        RETURN oVersionsArray.
      END METHOD.
    END CLASS.