Request A Demo
Back to All Blog Articles

Mastering Source Control: Streamlining Functional Setup Data Sync with FlexDeploy and Git Integration in Oracle FSM

Effective source control management (SCM) is pivotal in ensuring the seamless tracking and management of functional setup data. In this blog, we delve into the robust capabilities of FlexDeploy and its integration with Git, offering two distinct approaches to synchronize functional setup data efficiently within Oracle FSM. As we navigate through the utility and package-based workflows, we’ll showcase step-by-step instructions, providing you with a comprehensive guide to enhance your SCM practices. While our examples leverage GitHub, the principles discussed are universally applicable to any Git-based source control system, offering flexibility to align with your specific preferences.

Central to our discussion is the robust integration between FlexDeploy and Git, offering a flexible environment for SCM of functional setup data. FlexDeploy seamlessly supports both zipped and unzipped CSV file packages as deployment artifacts, providing users with the freedom to choose their preferred format. While the FSM UI exclusively accommodates the zipped version, FlexDeploy extends its capabilities to handle either, enhancing its adaptability to diverse user needs.

This integration serves as a cornerstone for effective SCM practices, ensuring a cohesive approach to tracking and managing functional setup data throughout your development lifecycle. As we explore two distinct approaches – the utility and package-based workflows – the innate compatibility of FlexDeploy with Git becomes evident, reinforcing its role as a comprehensive solution for orchestrating deployments and maintaining a single source of truth for your CSV file packages.

Each approach has its own value and will up to the user (you) to determine what works best for them.

We’ll assume you have configured a SCM account in FlexDeploy’s topology with credentials to connect to the Git repository.

Push files to SCM with Git – Utility Approach

Utility Workflow XML to Copy and Paste

name: CSV Download Advanced FSM Setup Task To Git
description: ''
inputs:
- code: EXTRACT_CSV
  description: Optionally expand (unzip) the exported zip file. Default to true.
  dataType: Boolean
  subDataType: Boolean
  defaultValue: 'true'
  defaultValueExpression: false
  displayName: Extract CSV File Package
  listDataExpression: false
  multiselect: false
  required: true
  encrypted: false
- code: JSON
  description: A list of tasks for export expressed as a JSON object. The JSON must
    contain a json array called “tasks”. See special considerations for details.
  dataType: String
  subDataType: TextField
  defaultValue: '@C:\temp\fsm_csv_download_advanced.json'
  defaultValueExpression: false
  displayName: JSON Array or Path
  listDataExpression: false
  multiselect: false
  required: true
  encrypted: false
variables: []
steps:
- id: '1'
  name: 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: FLEXDEPLOYFSM
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEST_SUBFOLDER
      value:
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_BRANCH
      value:
        value: main
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_TREELESS_CLONE
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEPTH
      value:
        value: ''
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_SPARSE_CHECKOUT_FOLDERS
      value:
        isExpression: false
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
- id: '2'
  name: csvDownloadAdvanced
  type: INVOKE_PLUGIN
  data:
    pluginName: FlexagonOracleSaaSFSMPlugin
    pluginOperation: csvDownloadAdvanced
    endpointInstanceOverride:
      isExpression: false
    consumesArtifacts: false
    producesArtifacts: false
    endpointSelection:
      choice: All
    endpointExecution:
      choice: Any
      stopOnError: false
    inputs:
    - name: FDFSM_INP_CLOUD_ACCOUNT_CODE
      value:
        isExpression: false
      isEncrypted: false
    - name: FDFSM_INP_TIMEOUT
      value:
        value: '3600'
        isExpression: false
      isEncrypted: false
    - name: FDFSM_INP_STOP_ON_ERROR
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    - name: FDFSM_INP_DOWNLOAD_FOLDER
      value:
        isExpression: false
      isEncrypted: false
    - name: FDFSM_INP_JSON_FILE_PATH
      value:
        value: JSON
        isExpression: true
      isEncrypted: false
    - name: FDFSM_INP_EXTRACT_CSV
      value:
        value: EXTRACT_CSV
        isExpression: true
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
- id: '3'
  name: add
  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: FLEXDEPLOYFSM
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEST_SUBFOLDER
      value:
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_FILELIST
      value:
        value: .
        isExpression: false
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
- id: '4'
  name: commit
  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: FLEXDEPLOYFSM
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEST_SUBFOLDER
      value:
        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: '"Commited by " + FD_SERVER_BASE_URL + " - " + FD_PROJECT_NAME + "
          - " + FD_PROJECT_VERSION'
        isExpression: true
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
- id: '5'
  name: push
  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: FLEXDEPLOYFSM
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEST_SUBFOLDER
      value:
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_BRANCH
      value:
        value: main
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_FOLLOW_TAGS
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
  1. Create a utility workflow. Copy the workflow xml provided as a template. The workflow contains the following basic steps:
    1. Git clone
    2. csvDownloadAdvanced
    3. Git Add
    4. Git Commit
    5. Git Push
  2. Edit each Git step. Change the instance code to point to your Git repository and branch to point to your branch. I am using the default “main” branch as defined by GitHub.
  3. Activate the workflow.
  4. Create a utility project and map your new workflow. The target group will be the same used on your deployment project. You should be ready to execute the project now.
    Sync Setup Tasks to Git Config
  5. Start syncing CSV file packages.
    1. Click “Execute” on the Executions tab.
    2. Select the environment and Target Group from which you want to export. It’s best practice to source from your development environment in most cases.
    3. If you want to store the files as a zip, disable “Extract CSV File Package.” Unzipped files will be useful for reviewing purposes, so we recommend keeping the extract option enabled.
    4. The final input can either be a JSON Object literal, as described in the plugin guide, or a path to JSON file. For this example, I’ll use a path to the JSON file, but the content of the JSON file could be pasted into the input as well.
    5. Click “Submit.”

Execute Request

fsm_csv_download_advanced.json

{
“tasks”:
[
{
“TaskCode” : “FUN_MANAGE_BUSINESS_UNIT”,
“ExportCriteria”: [
{
“BusinessObjectCode” : “FUN_BUSINESS_UNIT”,
“AttributeName” : “Name”,
“AttributeValue” : “Aquisition Business Unit”,
}
]
}
]

}

As for the content of the JSON file, you can add any number of objects you want inside the ‘tasks’ array. Each object will be its own separate export. Within each ‘tasks’ object, you can optionally define ‘Export Criteria’ and ‘Filter Criteria’ to refine the contents of the export. Again, the plugin guide will explain specifics about the JSON file.

Push files to SCM with Git – Package-based Approach

Build Workflow XML to copy and paste
name: FSM - Build from FSM and save to GIT
description: ''
steps:
- id: '1'
  name: 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: FLEXDEPLOYFSM
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEST_SUBFOLDER
      value:
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_BRANCH
      value:
        value: main
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_TREELESS_CLONE
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEPTH
      value:
        value: ''
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_SPARSE_CHECKOUT_FOLDERS
      value:
        isExpression: false
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
- id: '2'
  name: csvExport
  type: INVOKE_PLUGIN
  data:
    pluginName: FlexagonOracleSaaSFSMPlugin
    pluginOperation: csvExport
    endpointInstanceOverride:
      isExpression: false
    consumesArtifacts: false
    producesArtifacts: false
    endpointSelection:
      choice: All
    endpointExecution:
      choice: Any
      stopOnError: false
    inputs:
    - name: FDFSM_INP_CLOUD_ACCOUNT_CODE
      value:
        value: FSMDEV9
        isExpression: false
      isEncrypted: false
    - name: FDFSM_INP_TIMEOUT
      value:
        value: '3600'
        isExpression: false
      isEncrypted: false
    - name: FDFSM_INP_SAVE_EXPORT_RESULT_FILE
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    - name: FDFSM_INP_SAVE_EXPORT_REPORT_FILE
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    - name: FDFSM_INP_SAVE_EXPORT_SUMMARY_REPORT_FILE
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    - name: FDFSM_INP_FILTER_CRITERIA_PREVIEW_MODE
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
- id: '3'
  name: add
  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: FLEXDEPLOYFSM
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEST_SUBFOLDER
      value:
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_FILELIST
      value:
        value: --all .
        isExpression: false
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
- id: '4'
  name: commit
  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: FLEXDEPLOYFSM
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEST_SUBFOLDER
      value:
        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: '"Committed by FlexDeploy. Project Version " + FD_PROJECT_VERSION'
        isExpression: true
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
- id: '5'
  name: push
  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: FLEXDEPLOYFSM
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_DEST_SUBFOLDER
      value:
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_BRANCH
      value:
        value: main
        isExpression: false
      isEncrypted: false
    - name: FDGIT_INP_FOLLOW_TAGS
      value:
        value: 'false'
        isExpression: false
      isEncrypted: false
    outputs: []
    userInputs: []
    userOutputs: []
  1. Create a build workflow. Copy the workflow xml provided above as a template with the following basic steps:
    1. Git clone
    2. csvExport
    3. Git Add
    4. Git Commit
    5. Git Push
  2. Edit each Git step. Change the instance code to point to your Git repository and branch to point to your branch. I am using the default “main” branch.
  3. Activate the workflow.
  4. Create a packaged-based Oracle SaaS FSM project and map your new workflow. The target group will be the same used on your deployment project. Note, there will be no deploy workflow as this project will not be used to deploy FSM setups.
    FSM - Source FSM and save to Git
    Build workflow configured only
  5. Navigate to the file catalog to create/configure a file for syncing to SCM. I’ll use the setup Manage Business Unit as an example file. Export criteria and filter criteria are optional fields. The specifics for export criteria and filter criteria are documented on the plugin guide with examples. Setup Task file - Manage Business Unit
  6. Add your file to a package and execute build on that package against your development environment.

Utility vs Packaged-based

When exporting your setup task from a development FSM instance and transferring the file to the Git repository, both approaches achieve this goal. The primary distinction lies in the initial configuration and execution process.

The utility approach, relying on a JSON file or JSON object literal, typically offers a faster project execution. The initial setup involves creating your JSON file(s), which you can store in the same Git repository and reference on the execution form. Naming the JSON files appropriately is advisable, allowing users and developers to easily infer the task(s) exported within that specific JSON file.

On the other hand, the package-based approach eliminates the need for a JSON file. Instead, you configure individual files in the file catalog, add them to packages, and then build the package when needed. Similar to the utility approach, it’s recommended to name the packages appropriately. This practice enables users and developers to understand the files to be exported based on the package name alone.

Conclusion

In concluding this exploration of FlexDeploy’s integration with Oracle FSM for source control management, we’ve presented two powerful approaches that cater to diverse user preferences. Whether you opt for the utility approach, leveraging JSON files for swift execution, or the package-based approach, allowing you to build and synchronize individual files seamlessly, the end goal remains consistent – a unified source of truth for CSV file packages in your Git repository. As you embark on your SCM journey, FlexDeploy empowers you to make informed decisions, ensuring a streamlined process for deploying functional setup data to higher environments.

To deepen your understanding and harness the full potential of FlexDeploy’s integration, we encourage you to explore further into the dynamic realm of Oracle FSM.

FlexDeploy’s FSM Filter Criteria

Related Resources

FlexDeploy for Visual Builder SaaS Extension

FlexDeploy streamlines the development lifecycle of Visual Builder SaaS Extensions in Oracle Visual Builder Cloud Service. Key features include native ...

FlexDeploy for Oracle Visual Builder Application

FlexDeploy streamlines the development lifecycle of Oracle Visual Builder applications with its native support, handling both development and production stages. ...

Coming in FlexDeploy 9.0 – Advanced Git Integration

It’s official: Git has won the source control battle. Many of us may not even know that there are other ...

Join DevOps leaders across the globe who receive analysis, tips, and trends in their inbox