Import Customization File for Environment Specific Constants

Certified Associate Developer

Hello All,

I need an example of the import customization file to define environment specific constants. I have looked around but could not see one.

Also, when creating a constant, if check the 'Environment Specific' option, do I leave the values section blank? 

Appreciate a quick reply for ver 17.4

  Discussion posts and replies are publicly visible

  • Hi Mahesh,

    Tick "Different environments need to have different values for this constant" checkbox while creating the constant and then add to patch and export it. Download the package and the customization file.

    Open the customization file with Notepad ++ and remove the # symbol in front of the constant(It would be in the form of UUID) and then update it with the required value.


    Then import it into the target environment with the package.

    Please find the below example,

    ## ----------------------------------------------------------------------
    ## Instructions
    ##
    ## All of the properties in this file are commented out; they have a pound
    ## symbol at the start of each line that renders them inert.
    ##
    ## Instructions and headings are marked with two preceding pound
    ## symbols (##).
    ##
    ## On import, all commented-out properties are ignored, and the
    ## corresponding values in the destination environment remain
    ## unchanged.
    ##
    ## To set or change a property on import using this file,
    ## uncomment the property by removing the pound symbol from the start
    ## of its line. Then enter a value for the property after the equals
    ## sign (=) at the end of that import customization file.
    ##
    ## If you uncomment a property, but provide no value, the value of
    ## that property will be set to null in the destination environment.
    ## Properties that correspond to admin console settings and require a value
    ## will be set to their default value instead of being set to null. Default
    ## values of settings may be different between versions of Appian.
    ##
    ## Note: Never remove the double pound symbols (##) in front of instructions
    ## and headings.
    ## ----------------------------------------------------------------------

    ## Constant: EDS_ENV_SPC
    ## Type: Number (Integer)
    ##
    ## Integer values can only contain numeric characters.
    content._a-0000e142-dddf-8000-9ba2-011c48011c48_1003406.VALUE=1

    As you can see above, the hash is removed from the last line and I have given the required value

    AFAIK, the value field need not be blank. It can have a value in the lower environments and when migrating to higher environments, the value can be changed through customization file.

    Hope it helps!!!

     

    Thanks,

    Hema

  • Hi Mahesh,

     

    You can use below patch and the properties file for testing this. You can change any value in the property and import it in your environment.  You can even give null values for constants. We use this when we have any environment specific web service or REST API or Sales force and People soft dependencies. 

    Testing Appian Stuff - Patch - 2018-09-21_1253.zip

  • 0
    Certified Associate Developer
    in reply to Hema
    Hema,

    Appreciate your quick reply.

    -Mahesh
  • 0
    Certified Associate Developer
    in reply to Shanmukha
    Ragavendra,

    Appreciate your input.

    -Mahesh
  • 0
    Certified Associate Developer
    in reply to Jayapriya Muthu
    Jayap,

    Thanks a lot for the link.

    -Mahesh
  • Hi maheshp,

    The below mentioned statements may help you in understanding your query,

    It makes sense for these constants to be environment specific constants because environment specific constants that are imported without a value provided in an import customization file will not override the constant's current value on the target system. However, for these constants, you will need to actively manage that you are not providing a value in the import customization file for them when they are in your import package but not intending to overwrite their values.

    It is recommended that once imported onto an environment for the first time, the lines in your import customization file that correspond to these types of constants should be commented out and grouped together in their own section so they are easily discoverable. This way, subsequent imports with the environment's import customization file that include these constants will not override their values that may have changed on the system over time.

    docs.appian.com/.../Managing_Import_Customization_Files.html