> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flexagon.com/llms.txt
> Use this file to discover all available pages before exploring further.

# exportAPEXApplications

> Export APEX applications from App Builder environment. One or more Application is exported based on provided inputs. You can use this operation to exp

Export APEX applications from App Builder environment. One or more Application is exported based on provided inputs. You can use this operation to export applications from development environment and commit to SCM on periodic basis. See example workflow below on this page. Example workflow is exporting applications in apexexport folder and then Git repository is cloned in to apexgitrepo, eventually exported files are copied in to cloned repository and committed.

# Target Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Oracle SQLcl Home</td><td>`FD_SQLCL_HOME`</td><td>Yes</td><td>Folder where SQLcl is installed.Make sure that the endpoint Java Home is a high enough version for your SQLcl version.</td></tr><tr><td>APEX User</td><td>`FDAPEX_USER`</td><td>Yes</td><td>Provide database user APEX\_xxxxx (APEX user requires INHERIT Privilege) or owner (parsing schema) of the application for export and import operations. You can use system user as well. </td></tr><tr><td>APEX Password</td><td>`FDAPEX_PASSWORD`</td><td>Yes</td><td>Password for APEX User. </td></tr><tr><td>Oracle Database URL</td><td>`FDORA_URL`</td><td>Yes</td><td>JDBC URL for Oracle database. For example:<ul local-id="154e59404fec"><li local-id="68b6b35a378b">jdbc:oracle:thin:@HOSTNAME:PORT:SID or</li><li local-id="e39e201cf1ce">jdbc:oracle:thin:@//HOSTNAME:PORT/SERVICENAME*.*</li></ul>Connecting to Oracle Autonomous DatabaseYou will need client credential zip file (wallet) to connect with Oracle Autonomous Database on Oracle cloud. You can download wallet zip file from Oracle Cloud, you will need admin userid and password to perform this download. See [Download Client Credentials (Wallets)](https://docs.oracle.com/en-us/iaas/autonomous-database/doc/download-client-credentials.html) for more details on how to download wallet file.<ul><li>**Since FlexDeploy 9.0.0.9 with Oracle Wallet Credential Type :** Instead of maintaining the wallet zip file under the file system, you can now store the wallet zip as an Oracle Credential Type in FlexDeploy. This allows for secure storage and use of the wallet.<ul><li>Use the URL syntax in the following format: `jdbc:oracle:thin:@service_low?TNS_ADMIN={{FDORACLE_WALLET_FILE}}` is replaced with the temporary wallet folder path during execution. Once execution is completed, the temporary file is cleaned up automatically.</li></ul></li><li>**Before FlexDeploy 9.0.0.9**<ul><li>You must make sure that only authorized users have access to these wallet files. Unzip the client credentials zip file (**wallet\_*****databasename*****.zip**) on FlexDeploy server and/or endpoint where it will be used. For example, /home/flexdeploy/.wallets/\<**wallet\_*****databasename***> is folder where specific wallet file was unzipped. Make sure to secure this folder to FlexDeploy and/or Endpoint user, so that it is not readable by all users.</li><li>We recommend using Oracle Wallet Credential Type for better security and easier management of Wallet usage.</li><li>**Database URL Syntax **: jdbc:oracle:thin:@service\_high?TNS\_ADMIN=/home/flexdeploy/.wallets/\<**wallet\_*****databasename***><ul><li>service\_high is one of the entries in the tnsnames.ora file where client credentials zip file was unzipped. See [Predefined Database Service Names for Autonomous Database](https://docs.oracle.com/en/cloud/paas/autonomous-database/serverless/adbsb/connect-predefined-generic.html) for details on services.</li><li>TNS\_ADMIN value in URL points to the location of the **unzipped client credentials zip file**.</li></ul></li><li>**Database URL Long Connection String Format Syntax **: `jdbc:oracle:thin:@(description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=<hostname>))(connect_data=(service_name=<serice_name>))(security=(ssl_server_cert_dn="CN=<hostname>,OU=Oracle BMCS US,O=Oracle Corporation,L=Redwood City,ST=California,C=US")))`<ul><li>Examples for the same can be found [here](https://www.oracle.com/database/technologies/java-connectivity-to-atp.html).</li></ul></li></ul></li></ul>If using the Oracle Database Plugin with ADW or ATP databases , use the \_low connection. The \_medium and \_high connections can sometimes throw error** ORA-12839: cannot modify an object in parallel after modifying it.**</td></tr><tr><td>Oracle Wallet File</td><td>`FDORACLE_WALLET_FILE`</td><td>No</td><td>**Since 9.0.0.9** - Provide the Oracle Wallet file, see[Credential Type - Oracle Wallet](https://docs.flexagon.com/flexdeploy-11-0-documentation/flexdeploy-users-guide/administration/credentials/credential-types/credential-type-oracle-wallet.md) for more details.</td></tr></tbody></table>

# Project Properties

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Property Name**</th><th>**Property Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Export Supporting Object Definitions</td><td>`FDAPEX_EXPORT_SUPPORTING_OBJECTS`</td><td>No</td><td>Specify whether to export supporting object definitions with your application.</td></tr><tr><td>Export Private Reports</td><td>`FDAPEX_EXPORT_PRIVATE_REPORTS`</td><td>No</td><td>Specify whether to include private reports with your application.</td></tr><tr><td>Export Public Reports</td><td>`FDAPEX_EXPORT_PUBLIC_REPORTS`</td><td>No</td><td>Specify whether to include public reports with your application.</td></tr><tr><td>Export Report Subscriptions</td><td>`FDAPEX_EXPORT_REPORT_SUBSCRIPTIONS`</td><td>No</td><td>Specify whether to include interactive report or interactive grid subscription settings with your application.</td></tr><tr><td>Export Developer Comments</td><td>`FDAPEX_EXPORT_DEV_COMMENTS`</td><td>No</td><td>Specify whether to include Developer Comments in your application export.</td></tr><tr><td>Export Translations</td><td>`FDAPEX_INCLUDE_TRANSLATION`</td><td>No</td><td>Check to include Translations with your application export.</td></tr><tr><td>Use Original Ids</td><td>`FDAPEX_USE_ORIGINAL_IDS`</td><td>No</td><td>Determines if the plugin will use original ids when exporting.**@Since 8.0.0.9**</td></tr></tbody></table>

# Inputs

<table><colgroup><col /><col /><col /><col /></colgroup><tbody><tr><th>**Input Name**</th><th>**Input Code**</th><th>**Required**</th><th>**Description**</th></tr><tr><td>Workspace Name</td><td>`FDAPEX_INP_WORKSPACE_NAME`</td><td>No</td><td>APEX workspace name. If not provided, all applications matching name will be exported.</td></tr><tr><td>Application Name</td><td>`FDAPEX_INP_APPLICATION_NAME`</td><td>No</td><td>APEX application name. If application name, workspace name, and application id are not provided, then all applications will be exported.</td></tr><tr><td>Application ID</td><td>`FDAPEX_INP_APPLICATION_ID`</td><td>No</td><td>APEX Application ID. This will take priority over workspace name and application name if it is provided.</td></tr><tr><td>Application Alias</td><td>`FDAPEX_INP_APPLICATION_ALIAS`</td><td>No</td><td>If provided, the alias is used to resolve the application. Available since 10.0.0.2.</td></tr><tr><td>Export Folder</td><td>`FDAPEX_INP_EXPORT_FOLDER`</td><td>No</td><td>Absolute or relative to temp directory path for exported applications.</td></tr><tr><td>Use Application Alias Name for Export Folder</td><td>`FDAPEX_INP_USE_ALIAS_NAME_FOR_EXPORT_FOLDER`</td><td>No</td><td>Use the Application Alias as the export folder name. If no alias exists, the Application Name is used.</td></tr></tbody></table>

# Artifacts

This operation doesn’t consume or produce any artifacts.

# Endpoint Selection

This operation will select all available endpoints associated to the Target. You can use any Endpoint where SQLcl is installed and has connectivity to database using JDBC URL. We recommend use of LOCALHOST endpoint if connectivity can be established between FlexDeploy and your APEX database.

# Endpoint Execution

This operation will execute on any one of the selected endpoints and will be random in the determination of which one.

# Example Workflow

##### **Export and commit to Git**

```
name: Export Apex Applications
description: ''
steps:
- id: '1'
  name: exportAPEXApplications
  type: INVOKE_PLUGIN
  data:
    pluginName: FlexagonOracleAPEXPlugin
    pluginOperation: exportAPEXApplications
    endpointInstanceOverride:
      isExpression: false
    consumesArtifacts: false
    producesArtifacts: false
    endpointSelection:
      choice: All
    endpointExecution:
      choice: Any
      stopOnError: false
    inputs:
    - name: FDAPEX_INP_WORKSPACE_NAME
      value:
        isExpression: false
      isEncrypted: false
    - name: FDAPEX_INP_APPLICATION_NAME
      value:
        isExpression: false
      isEncrypted: false
    - name: FDAPEX_INP_EXPORT_FOLDER
      value:
        value: apexexport
        isExpression: false
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
- id: '2'
  name: Git Clone
  type: INVOKE_PLUGIN
  data:
    pluginName: FlexagonGITPlugin
    pluginOperation: clone
    endpointInstanceOverride:
      isExpression: false
    consumesArtifacts: false
    producesArtifacts: false
    endpointSelection:
      choice: All
    endpointExecution:
      choice: Any
      stopOnError: false
    inputs:
    - name: FDGIT_INP_INSTANCE_CODE
      value:
        value: GITDEMO
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEST_SUBFOLDER
      value:
        value: apexgitrepo
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_BRANCH
      value:
        value: master
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEPTH
      value:
        value: '1'
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_SPARSE_CHECKOUT_FOLDERS
      value:
        value: APEXV2
        isExpression: false
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
- id: '3'
  name: Copy exported files to local Git repo
  type: INVOKE_PLUGIN
  data:
    pluginName: FlexagonFilePlugin
    pluginOperation: copy
    endpointInstanceOverride:
      isExpression: false
    consumesArtifacts: false
    producesArtifacts: false
    endpointSelection:
      choice: All
    endpointExecution:
      choice: Any
      stopOnError: false
    inputs:
    - name: FDFILE_INP_FILE_FILTER
      value:
        value: '*.sql'
        isExpression: false
      isEncrypted: false
    - name: FDFILE_INP_FILE_FILTER_EXCLUDED
      value:
        isExpression: false
      isEncrypted: false
    - name: FDFILE_INP_SOURCE_PATH
      value:
        value: FD_TEMP_DIR + "/apexexport"
        isExpression: true
      isEncrypted: false
    - name: FDFILE_INP_TARGET_PATH
      value:
        value: FD_TEMP_DIR + "/apexgitrepo/APEXV2"
        isExpression: true
      isEncrypted: false
    - name: FDFILE_INP_CLEAN_DIRECTORY
      value:
        value: 'true'
        isExpression: false
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
- id: '4'
  name: Add any new Files
  type: INVOKE_PLUGIN
  data:
    pluginName: FlexagonGITPlugin
    pluginOperation: add
    endpointInstanceOverride:
      isExpression: false
    consumesArtifacts: false
    producesArtifacts: false
    endpointSelection:
      choice: All
    endpointExecution:
      choice: Any
      stopOnError: false
    inputs:
    - name: FDGIT_INP_INSTANCE_CODE
      value:
        value: GITDEMO
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEST_SUBFOLDER
      value:
        value: apexgitrepo
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_FILELIST
      value:
        value: --all .
        isExpression: false
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
- id: '5'
  name: Commit to Git
  type: INVOKE_PLUGIN
  data:
    pluginName: FlexagonGITPlugin
    pluginOperation: commit
    endpointInstanceOverride:
      isExpression: false
    consumesArtifacts: false
    producesArtifacts: false
    endpointSelection:
      choice: All
    endpointExecution:
      choice: Any
      stopOnError: false
    inputs:
    - name: FDGIT_INP_INSTANCE_CODE
      value:
        value: GITDEMO
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEST_SUBFOLDER
      value:
        value: apexgitrepo
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_NAME
      value:
        value: FD_WF_USER
        isExpression: true
      isEncrypted: false
    - name: FDGIT_INP_EMAIL
      value:
        value: FD_WF_USER_EMAIL
        isExpression: true
      isEncrypted: false
    - name: FDGIT_INP_REVISION_MESSAGE
      value:
        value: new apex files
        isExpression: false
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
- id: '6'
  name: Push to Central Repository
  type: INVOKE_PLUGIN
  data:
    pluginName: FlexagonGITPlugin
    pluginOperation: push
    endpointInstanceOverride:
      isExpression: false
    consumesArtifacts: false
    producesArtifacts: false
    endpointSelection:
      choice: All
    endpointExecution:
      choice: Any
      stopOnError: false
    inputs:
    - name: FDGIT_INP_INSTANCE_CODE
      value:
        value: GITDEMO
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEST_SUBFOLDER
      value:
        value: apexgitrepo
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_BRANCH
      value:
        value: master
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_FOLLOW_TAGS
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
```
