Project Types
From the project types screen, you can manage your own custom project types, file types, and attributes, as well as customizing attributes and file type detection behavior of FlexDeploy's built-in project types. The project types screen is accessible from Customize → Project Types.
Project Types
Project types are used for categorization of package-based projects. Each project type contains any number of file types with attribute definitions.
FlexDeploy provides a list of built-in project types, as well as support for creating your own project types. To create a new project type, select the Create new Project Type option in the Project Type dropdown. To view or edit an existing project type, select it from the Project Type dropdown, then click the edit button.
In the Edit Project Type popup, you can edit the basic details for any custom project types, as well as define a custom match script.
Match Script
A project type’s match script is used to determine the type of each file during project file discovery. The script will be executed for each new file being discovered, and the script is expected to return a file type code to indicate the appropriate type categorization. For built-in project types, the script can return null to let FlexDeploy determine what type to assign the file based on default logic. It can also return __IGNORE__
to ignore the file completely.
The Script Variables table lists all variables available for use in the match script. Define FILE_CONTENT_NEEDED as Boolean.TRUE if file content is necessary to derive default values for attributes in this project type, or return Boolean.FALSE if not necessary.
Match Script Example
Here is an example of a custom match script for Oracle EBS. It matches files from /install/sql as Concurrent Program SQL and /install/bin as Script with Execution.
// indicates file content should be available within attribute default value scripts
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;
File Types
All files in a project’s file catalog are categorized into types, and those types can be managed from the project types screen. Each file type can have any number of attributes defined, which are available for use in build and deploy workflows.
To view or edit a file type, first select its project type in the project type dropdown. Select the file type in the file type dropdown, and then click the edit button. If a custom project type is selected, you will also see the option to create a new file type in the file type dropdown. There is a { } code icon that appears after the file type name in the dropdown if the file type contains attributes with extended default value scripts or list data, for quickly finding any custom scripts.
In the Edit File Type popup, basic details can be edited for custom file types only.
Attributes
Each project file has metadata associated to it in the form of file attributes, which are defined on the project types screen. For built-in project types, these attribute values are used by plugin operations to build and deploy each file. A file’s attributes can also be used in custom configurations within project workflows or in various scripts.
To view a file type’s attributes, first select the associated project type and file type from the dropdowns at the top of the page. A list of attributes will be shown in the order they appear when viewing a file from the project. This list is sortable and attributes can be added/removed within custom project types only. Select an attribute from the list to view details in the right panel.
Default Value Script
Each attribute definition has a default value script, which is executed during file discovery for each new file to set an initial attribute value. This script is also executed to re-set the attribute value each time a file is evaluated, unless the value was set manually at any point and the value has been locked.
Using the context available, return a default attribute value in the script, or return null to let FlexDeploy determine the initial value based on default logic. The Script Variables table lists all variables available for use in the default value script.
This custom script will only be executed for built-in project types if the Extend Default Value Script option is enabled, allowing you to easily enable/disable any custom scripts temporarily while testing.
Default Value Script Example
Here is an example of a default value script for the AOL - Type attribute within the Oracle EBS project type. This allows users to enter path /import/<type>/filename.ldt and the second part is used for the Type attribute value.
// AOL customization when sourcing from EBS
// User will enter path such 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;
List Data Script
Certain attributes may have a small set of valid values, which can be defined using the list data script. This option would only be available for certain data types where applicable.
Using the context available, return a comma-separated string or array of values, or return null to let FlexDeploy determine the list data for the attribute based on default logic. The Script Variables table lists all variables available for use in the list data script.
This custom script will only be executed for built-in project types if the Extend List Data Script option is enabled, allowing you to easily enable/disable any custom scripts temporarily while testing.
List Data Script Example
Here is an example of a list data script for the AOL - Type attribute within the Oracle EBS project type.
return 'FND_CURRENCY,FND_DOC_SEQUENCE_CATEGORIES,FND_FORM_CUSTOM_RULES,FND_LANGUAGE,FND_LOOKUP_TYPE,FND_NEW_MESSAGES,FND_RESPONSIBILITY,FND_SEQUENCE,FND_TABLE,FND_TERRITORY,FND_USER,FND_VIEW'
Script Variables
Variable Name | Example using /path1/path2/APXSOBLX_1.rtf |
| /path1/path2/APXSOBLX_1.rtf |
| APXSOBLX_1 |
| /path1/path2 |
| rtf |
| path2 |
| <content of file as array of Strings> (one element per line) |
Project Properties - Code for each property can be used in script |
|
| 122703 |
| XXHR |
| / FlexDeploy / EBS |
- style