executeCodePackage

Execute a Jython script. This operation differs from executeCode by executing the code snippet for every file in the package. This operation has the same support for inputs and outputs available to it as the executeCode operation. In addition it has the following variables 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

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.

Ā 

All file attributes defined on Project Files tab are included as well.

Project Properties

Property Name

Property Code

Required

Property Name

Property Code

Required

Stop On Deployment Error

FDJYTHON_STOP_ON_DEPLOYMENT_ERROR

No

Inputs

Input Name

Input Code

Required

Input Name

Input Code

Required

Code Snippet

FDJYTHON_INP_CODE_SNIPPET

Yes

Classpath

FDJYTHON_INP_CLASS_PATH

No

Artifacts

This operation delegates the consume/produce artifacts decision to the workflow developer.

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 use the Map outputs (type Map<String,Object>) to set any outputs.

Example

Output Example
ouptuts.put("MY_STRING_OUTPUT","Output result") # output will be "Output result" ouptuts.put("MY_BOOLEAN_OUTPUT",bool("")) # output will be false

Setting 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 the status examples
packageFunctions.setObjectResultStatusSuccess() # Status will be Success packageFunctions.setObjectResultStatusFailed() # Status will be Failed packageFunctions.setObjectResultStatusSkipped() # Status will be Skipped packageFunctions.setObjectResultStatusNotAttempted() # Status will be Not Attempted packageFunctions.setObjectResultStatusIgnore() # Status will be Unknown
The following macros are not currently supported in the footer:
  • style