Customize Attribute Defaults

Partial deployment project file attributes are automatically defaulted by FlexDeploy during Populate from SCM / Populate from Backend or when you Evaluate file(s) at a later time. Attributes are defaulted during populate or evaluate by FlexDeploy unless it was manually set by user at any point. If attribute was manually entered by user, you will see darker border around the component on files screen. If necessary you can change defaults behavior for your implementation using Defaults Override Script. Follow details in this document to perform specific overrides.

Step-by-step guide

Access object type details screen by using menu option - Administration - Customize - Object Types.

Defaults override can be done for any attribute for any object type. Find specific attribute using search controls. Then click on No or Yes in Defaults Overridden? column for attribute.

Make sure to select Yes for Defaults Overridden? and enter Defaults Override Script. Then click Save.

Here is an example of Groovy script for AOL - Type attribute default. This allows user to enter path /import/<type>/filename.ldt and second part is used for Type attribute. Filename already is used for Name attribute for AOL file type. See details on EBS Object Types Reference.

// AOL customization when sourcing from EBS
// User will enter path as /import/program/abcd.ldt (import/<type>/filename.ldt)
if (parts.length >= 4 && 'EBS'.equals(SOURCE))
    return parts[2].toUpperCase();
return null;

Now let's talk little bit more about how you write such groovy script. You have access to various details about file and project properties as shown below. You can make decision based on available variables and return attribute default that makes sense, or you can return null in which case FlexDeploy will make determination based on default logic as documented in EBS Object Types Reference.

Following variables are available for use in the Groovy script along with Project Properties.

Variable NameExample using /path1/path2/APXSOBLX_1.rtf
FILE_CONTENT<content of file as array of Strings> (one element per line)
Project Properties - Code for each property can be used in script

You can use PROJECT_ID, PROJECT_NAME, FOLDER_PATH variables in script if you want different behavior for specific Project(s).