Skip to main content
Runs user-specified groovy script. The plugin provides the ability for the user to define additional inputs that will be available to the scripts when executing. See Project Types to create custom Project Type with various File Types and their Attributes. Custom Project Type is very useful with this operation, where you can create custom Package-based Build and Deploy automation. Here are some example scenarios where you custom project type would be useful:
  • Source code repository has individual files for Informatica workflow and other objects that needs to be deployed and tracked individually.
  • Source control system has individual files defining WebSphere resource configuration and they needs to be deployed and tracked individually.
If you were already using Generic Project Type, you can continue to use it as well. In addition, the plugin provides the ability for the user to define any number of outputs from the execution of the script that could be utilized in subsequent steps in the workflow. All Workflow Execution variables and Inputs are available in Groovy script. Refer to the FlexDeploy Variables Guide for more details. In addition, the following variables are available with information about a particular file.

File Level Variables With Example

Variable name

Description

Value if File Name (with path) is /XXHR/publisher/APXSOBLX_1.rtf

FILE_PATH

File path of the package deploy file. (File Name (with path)) on the package deployment screen.

/XXHR/publisher/APXSOBLX_1.rtf

FILE_NAME

File name of the package deploy file.

APXSOBLX_1

FILE_PATH_PREFIX

File path, excluding the file name and extension.

/XXHR/publisher

FILE_EXTENSION

File extension on the package deploy file.

rtf

SOURCE_FILE

Fully qualified location of the file on the endpoint.

Fully qualified path to file being processed. This can be different locations for build and deploy workflow execution as there might be some checkout folder specified for build. See examples below for build and deploy workflow where FILE_PATH is in bold text.

  • /home/oracle/application/localhost/work/846808/840047/temp/PackageExecute/EBSCustomizations/XXHR/import/XXHR_Second_CP.ldt

  • /home/oracle/application/localhost/work/846808/840059/temp/import/XXHR_Second_CP.ldt

FILE_HASH

The Hash of the file as generated recorded by FlexDeploy.

FILE_SCM_REVISION

The SCM Revision of the package deploy file.

Project Properties

Property Name

Property Code

Required

Description

Stop on Deployment Error

FDGROOVY_STOP_ON_DEPLOYMENT_ERROR

No

Stop deploying package files if any error occurs. If unchecked all files will be deployed even if one or more files fails. This is for package operations only. True by default.

Inputs

Input Name

Input Code

Required

Description

File Path

FDGROOVY_INP_FILE_PATH

Yes

The file path of the file to be executed.

Classpath

FDGROOVY_INP_CLASSPATH

No

Additional classpath(s) to use java libraries. Classpaths can be separated by semicolons or colons. Classpath entries may contain a wildcard (*).

Restrict Target Groups

FDGROOVY_INP_RESTRICT_ENVIRONMENT

No

Provide comma-separated target group codes to restrict available target properties. If no value is provided, all target properties are available in environment.

Artifacts

This operation delegates the consumes/produces artifacts decisions to the workflow developer. Check Consumes Artifacts on the workflow step editor if this operation requires artifacts to be delivered prior to execution of the script. Check Produces Artifacts on the workflow step editor if this operation creates artifacts. The artifacts folder is available via the FD_ARTIFACTS_DIR variable.  

Endpoint Selection

This operation delegates endpoint selection to the workflow developer. The workflow editor will default the selection to “All”, which selects all available endpoints associated to the target. Selecting a specific resource will result in selection of endpoints associated to the target which have that resource defined.

Endpoint Execution

This operation delegates endpoint execution to the workflow developer. The workflow editor will default to “Any”, which will execute on any one of the selected endpoints, which will be randomly picked from selected endpoints or a specific endpoint where previous step may have executed. Changing this value to “All” to will result in execution on all selected endpoints.

Special Considerations

Outputs

User defined outputs – an output must be defined in the workflow editor to be accessible. Within your script, an outputs map is available to add your outputs. Add an output value in outputs map and it will be returned to the workflow process. Any number of outputs can be defined, which makes this plugin very useful as it can be customized to perform actions that may not be supported out of box by FlexDeploy.
Example on how to set Output

File Status

The status of the File can be set in your script using the packageFunctions object. This object has several functions available to it, see the example below. If an exception occurs in your script, the status will be set to Failed. Statuses will only be set when deploying.
Setting Status