Customize File Type Detection

When you perform populate operation from SCM, files are organized in various types based path, file extension etc. You can customize this behavior by updating project properties in many cases and further customizations can be done by using groovy script a.k.a Match Script override.

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

Match script override is done for specific project type. For example, you can customize how FlexDeploy determines type for EBS project files as shown below.

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

Search for specific Project Type, in this case EBS. Click on project type name in Project Type column.

Update Match Script (groovy), then click Save.

Here is an example of matching files from /install/sql as Concurrent Program SQL and /install/bin as Script with Execution.

if (!binding.variables.containsKey('FDEBS_APPLICATION_SHORT_NAME'))
{
    throw new Exception('Application Short Name not found. Please Configure FDEBS_APPLICATION_SHORT_NAME property');
}
FILE_CONTENT_NEEDED=Boolean.TRUE;
CP_SQL_DIR='install/sql';
if (FILE_PATH_PREFIX.contains(CP_SQL_DIR) && FILE_EXTENSION.toUpperCase().equals('SQL'))
{
  return 'CP_SQL';
}
SCRIPT_DIR='install/bin';
if (FILE_PATH_PREFIX.contains(SCRIPT_DIR))
{
  return 'SCRIPT_EXECUTION';
}
return null;

Now let's talk about how you write such groovy script. You have access to various details about file and project properties. You can make decision based on available variables about file, then return appropriate Object Type Code, or you can return null in which case FlexDeploy will make determination based on default logic as documented in EBS Object Types Reference.

Match Script Variables

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 array of Strings> (one element per line)
Project Properties - Code for each property can be used in script
PROJECT_ID122703
PROJECT_NAMEXXHR
FOLDER_PATH/ FlexDeploy / EBS

Return FILE_CONTENT_NEEDED as Boolean.TRUE if file content is necessary to derive attribute defaults or return Boolean.FALSE.

Also, return one of the following object type when you can derive type, otherwise return null and FlexDeploy will determine object type in the usual manner.]

EBS Object Type Codes

Code to be ReturnedFor Type

OAF_JAVA

WORKFLOW_XML

OAF_MDS

CP_SQL

JAVA_SP

SQL

XDF

SQL_LDR

JLT

AOL

FORM

REPORT

WORKFLOW_DEFINITION

LIBRARY

PUBLISHER

PROG

FONT

SCRIPT

PERL_MODULE

MEDIA

HTML

OTHER

WEB_ADI

DATA_FIX

SETUPS

SCRIPT_EXECUTION

__IGNORE__

Oracle Application Framework (OAF) JAVA

Workflow XMLs

Oracle Application Framework (OAF) MDS

Concurrent Program SQLs

Java Stored Procedures

DB Objects (SQLs)

XML Definition Files (XDF)

SQL*Loader

Java Loader Text (JLT)

Application Object Library (AOL)

Forms

Reports

Workflow Definitions

Libraries

Publisher Files

Program Files

Font Files

Scripts

Perl Modules

Media Files

HTML (Web) Files

Other Files

Web ADI

Data Fixes

Functional Setups

Script With Execution

Ignore the file completely

The following macros are not currently supported in the footer:
  • style