Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Integrate solutions with Git repositories.

Reference  Solution  DevOpsTrack Changes | Git 


Git Integration & Export (Reference): Comprehensive Git integration for

Overview

...

version control, collaboration, and DevOps workflows while maintaining

...

centralized database architecture

...

Key Features

Hybrid Configuration Management

...

security.

Access: Solution → Export (Git Export settings)

Table of Contents
maxLevel2
minLevel2
indent10px
excludeSteps
stylenone


Git Export Architecture

Hybrid Configuration Management

ComponentFunctionLocation
Centralized DatabaseSingle source of truth.dbsln file
Automatic ExportsVersion control trackingGit folder
Selective ExportConfiguration elementsJSON files
Sensitive DataProtected via placeholdersDatabase only
Bidirectional SyncDatabase ↔ Git repositoryAutomated

...

Git-Friendly JSON Format

FeaturePurposeBenefit
Consistent

...

FormattingClean diffsEasy review
Sorted KeysMinimize conflictsBetter merging

...

Array-based

...

TablesEfficient storageSmaller files
Metadata PreservationVersion trackingAudit trail
Binary Asset HandlingSeparate files with checksumsIntegrity

Configuration

...

Enabling Git Export

Navigate to

...

Solution → Settings Version Control:

SettingOptionsDefault

...

Enable Git Export

...

On/OffOff
Export ModeAutomatic/ManualManual
Export TriggerOn Version Change-
Export Delay5-60 seconds5
Target DirectoryPathSolution-Data\Git

Export Modes

Automatic Export:

  • Monitors configuration changes
  • Exports on version increment
  • Batches rapid changes
  • Background operation

Manual Export:

  • Export All - Complete solution
  • Export Module - Selected module
  • Export Current - Active object

Directory Structure

Solution Root Directory:

  • Solution/ - Core configuration files
    • SolutionCategories.json
    • SolutionSettings.json
  • Displays/ - UI and visualization components
    • Layouts/ - Display configurations
      • MainPage.json
      • Overview.json
    • Images/ - Visual assets
      • Logo.json (metadata)
      • Logo.png (binary file)
  • Scripts/ - Application logic
    • Tasks/ - Server-side scripts
      • ServerStartup.json
    • Classes/ - Reusable code libraries
      • DataProcessor.json
    • ScriptsExpressions.json
  • UNS/ - Unified Namespace data model
    • UnsTags.json
    • UserTypes/ - Custom data templates
      • CustomTemplate.json
  • Alarms/ - Alarm configuration
    • AlarmsGlobalSettings.json
    • AlarmsItems.json
  • .gitignore - Version control exclusions

JSON File Format

Standard Structure

json

Export Modes

Automatic Export

When enabled, FrameworX monitors configuration changes and automatically exports modified objects to Git-compatible JSON files.

? Enable Automatic Export
  Export Trigger: On Version Change
  Export Delay: 5 seconds (batch rapid changes)
  Target Directory: C:\Projects\MyScada\GitRepo

Manual Export

Export entire solution or specific modules on-demand:

  • Export All: Complete solution export
  • Export Module: Selected module only
  • Export Current: Active object in editor

Export Structure

Directory Organization

solution-root/
??? Solution/
?   ??? SolutionCategories.json
?   ??? SolutionSettings.json
??? Displays/
?   ??? Layouts/
?   ?   ??? MainPage.json
?   ?   ??? Overview.json
?   ??? Images/
?   ?   ??? Logo.json
?   ?   ??? Logo.png
?   ??? DisplaysLocalization.json
??? Scripts/
?   ??? Tasks/
?   ?   ??? ServerStartup.json
?   ??? Classes/
?   ?   ??? DataProcessor.json
?   ??? ScriptsExpressions.json
??? UNS/
?   ??? UnsTags.json
?   ??? UserTypes/
?       ??? CustomTemplate.json
??? Alarms/
?   ??? AlarmsGlobalSettings.json
?   ??? AlarmsItems.json
??? .gitignore

JSON File Format

...

{
  "ExportInfo": {
    "ObjectType": "ScriptsTasks",
    "TableVersionID": 6,
    "SolutionVersionID": 245,
    "ExportDate": "2025-08-23T10:30:00Z",
    "ExportUser": "john.doe"
  },
  "Header": {
    // Object metadata from table columns
  },
  "Body": {
    // Object content or table rows
  }
}

...

Export Categories

Individual Object Files

...

:

  • Script Tasks and Classes
  • Display Layouts

...

  • SQL Queries
  • Report Definitions
  • Symbol Definitions

Table Export Files

...

:

  • Tags (UNS)
  • Alarm Items
  • Device Points
  • Security Settings

...

  • Expressions

Security & Sensitive Data

Data Protection

Data TypeHandlingStorage
PasswordsNever exportedDatabase only
Connection StringsEnvironment placeholders${DB_CONNECTION}
API KeysVault referencesSecure storage
Encrypted ValuesNot exportedDatabase only

Environment Variables

json

{
  "DatabaseConnection": "${DB_CONNECTION}",
  "EmailServer": "${SMTP_SERVER}",
  "HistorianPath": "${HISTORIAN_PATH}"
}

Variables resolved at runtime for environment-specific deployment.


Git Workflow

Recommended Process

  1. Initialize Repository

bash

Working with Git

Recommended Workflow

...

cd /path/to/solution
git init
git remote add origin https://github.com/company/scada-config.git

...

...

Initial Commit

git add .
git commit -m "Initial FrameworX configuration export"
git push -u origin main

Development Workflow

...

  1. Development Branch

bash

git checkout -b feature/new-alarm-logic

...


# Make changes in FrameworX

...


git add .
git commit -m "Add 

...

temperature 

...

monitoring for 

...

Reactor-

...

3"
git push origin feature/new-alarm-logic

...

  1. Code Review

...

    • Create pull request

...

    • Team reviews

...

    • changes
    • Merge

...

    • to main branch

...

Environment Management

FrameworX supports environment-specific configurations through placeholder substitution:

{
  "DatabaseConnection": "${DB_CONNECTION}",
  "EmailServer": "${SMTP_SERVER}",
  "HistorianPath": "${HISTORIAN_PATH}"
}

Environment variables are resolved at runtime, allowing the same configuration to work across development, staging, and production.

Security Considerations

Sensitive Data Handling

  • Passwords and credentials are never exported to Git
  • Connection strings use environment variable placeholders
  • API keys reference secure vault entries
  • Encrypted values remain in the database only

Access Control

  • Git export respects FrameworX user permissions
  • Export operations are logged in the audit trail
  • File integrity verified through checksums
  • Binary assets include SHA-256 hashes

Best Practices

What to Export

...

Branching Strategy

Main Branches:

  • main - Production-ready code
  • develop - Integration branch for features

Feature Branches:

  • feature/new-screens - New display development
  • feature/alarm-updates - Alarm system modifications
  • feature/script-optimization - Script performance improvements

Maintenance Branches:

  • hotfix/critical-alarm-fix - Emergency production fixes
  • release/v2.1 - Release preparation and stabilization

Branch Hierarchy:

  • Main branch serves as production baseline
  • Develop branch integrates all feature work
  • Feature branches created from develop
  • Hotfix branches created from main for urgent fixes
  • Release branches created from develop for version preparation

Best Practices Checklist 

What to Export

  • Export to Git:
    • Application configuration
    • Display definitions
    • Script code
    • Alarm rules
    • Report templates
    • Static settings

...

  • Keep in Database Only:
    • Runtime tag values
    • Historical data
    • User passwords
    • Session information
    • Temporary data
    • High-frequency

...

Branching Strategy

Recommended Git branching model:

...

    • updates

...

Commit Guidelines

...

Write clear, descriptive commit messages:

...

GoodBad
"Add

...

temperature

...

monitoring

...

for

...

Reactor-3

...

""Updated stuff"
"Fix

...

alarm

...

delay

...

calculation

...

in

...

Tank-Level

...

""Changes"

...

"Implement new batch report template""Friday work"

Performance

...

Troubleshooting

Common Issues

Export not triggering automatically

  • Verify automatic export is enabled
  • Check export directory permissions
  • Ensure VersionID is incrementing on changes

Large file sizes

  • Consider splitting large tag databases
  • Use table export format for better compression
  • Implement .gitignore for temporary files

Merge conflicts

  • Use consistent export user accounts
  • Coordinate team changes through branches
  • Leverage Git merge tools for resolution

Advanced Features

Custom Export Filters

Define which objects to export:

// ExportFilter.cs
public bool ShouldExport(ConfigObject obj)
{
    // Skip temporary objects
    if (obj.Name.StartsWith("_temp")) return false;
    
    // Skip test configurations in production
    if (Environment == "Production" && 
        obj.Name.Contains("test")) return false;
    
    return true;
}

Post-Export Hooks

Execute custom actions after export:

# post-export.bat
cd %EXPORT_DIR%
git add .
git commit -m "Auto-export: %DATE% %TIME%"
git push origin develop

Import Validation

FrameworX validates imported configurations:

  1. Schema validation against ObjectType
  2. Referential integrity checking
  3. Version compatibility verification
  4. Checksum validation for binary assets

API Reference

Export Commands

// Export entire solution
FrameworX.Git.ExportSolution(targetPath);

// Export specific module
FrameworX.Git.ExportModule("Scripts", targetPath);

// Export current object
FrameworX.Git.ExportObject(currentObject, targetPath);

Configuration Options

<GitExport>
  <Enabled>true</Enabled>
  <AutoExport>true</AutoExport>
  <ExportPath>C:\GitRepo</ExportPath>
  <ExportDelay>5000</ExportDelay>
  <IncludeModules>
    <Module>Scripts</Module>
    <Module>Displays</Module>
    <Module>Alarms</Module>
  </IncludeModules>
</GitExport>

...

Export Performance

Configuration SizeExport TimeFile CountTotal Size
Small (

...

<100 objects)

...

<1 sec50-100

...

<1 MB
Medium (1,000 objects)3-5 sec200-5005-10 MB
Large (10,000 objects)15-20 sec1,000+50-100 MB
Enterprise (50,000+)60-90 sec5,000+500+ MB

Optimization Tips

  • Use selective export for large systems
  • Enable compression for repository

...

  • Implement .gitignore for generated files
  • Schedule exports during low

...

  • activity

...

  • Use shallow clones for CI/CD

...

...


CI/CD Integration

Example GitHub Actions

...

yaml

name: Validate FrameworX Configuration

on:
  pull_request:
    branches: [ main, develop ]

jobs:
  validate:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    
    - name: Validate JSON Schema
      run: |
        for file in $(find . -name "*.json"); do
          python validate_schema.py $file
        done
    
    - name: Check Tag Naming Convention
      run: python check_naming.py ./UNS/UnsTags.json
    
    - name: Verify No Credentials
      run: |
        ! grep -r "password\|credential\|secret" --include="*.json"

...


Troubleshooting

IssueCauseSolution
Export not triggeringAutomatic export disabledEnable in settings
Large file sizesMany objectsUse selective export
Merge conflictsConcurrent editsUse branches
Missing exportsPermission issuesCheck directory access
Sensitive data exposedWrong configurationReview export filters



In this section...

Page Tree
root@parent



  

...

Migration from Other Systems

From Pure Database Systems

  1. Enable Git export in FrameworX
  2. Export complete configuration
  3. Initialize Git repository
  4. Establish branching strategy
  5. Train team on Git workflows

From File-Based Systems

  1. Import existing files to FrameworX database
  2. Verify data integrity
  3. Enable selective Git export
  4. Maintain file organization if desired
  5. Implement security improvements

Roadmap

Current Capabilities (v10.1)

  • ? JSON export for all configuration types
  • ? Automatic and manual export modes
  • ? Binary asset support
  • ? Metadata preservation
  • ? Selective module export

Support Resources

...