Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 23 Next »

Partial project file attributes are automatically defaulted by FlexDeploy, if necessary you can change defaults behavior for your implementation using Defaults Override Script.

If your FlexDeploy version is 5.2.0.1 or lower, please see Customize Attribute Defaults. as screens explained in this document were added as part of 5.2.0.2.

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. Find specific attribute using search controls. 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.

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

Now let's talk 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_PATH/path1/path2/APXSOBLX_1.rtf
FILE_NAMEAPXSOBLX_1
FILE_PATH_PREFIX/path1/path2
FILE_EXTENSIONrtf
PARENT_FOLDERpath2
FILE_CONTENT<content of file as String>
Project Properties - Code for each property can be used in script
PROJECT_ID122703
PROJECT_NAMEXXHR
FOLDER_PATH/ FlexDeploy / EBS

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

  • No labels