Dependencies in FlowX enable projects and libraries to share and reuse resources, fostering modular development and reducing duplication. By establishing dependency relationships, you can access common assets like processes, enumerations, and media files from external libraries while maintaining version control and stability.

Overview

Dependencies overview
Dependencies allow you to:
  • Share resources across projects and libraries without duplication
  • Maintain version control by referencing specific builds
  • Create modular architectures with reusable components
  • Ensure stability through controlled dependency management
  • Build hierarchical structures with library-to-library dependencies

Types of dependencies

Project Dependencies allow projects to reference and use resources from libraries.

Key Features

  • Library Access: Projects can add libraries as dependencies to access their resources
  • Build-Specific: Dependencies reference specific builds of libraries for stability
  • Version Control: Projects control when to upgrade to newer library versions
  • Resource Availability: All resources from dependent libraries become available in the project

Use Cases

  • Shared UI components and templates
  • Common business processes and subprocesses
  • Standardized enumerations and configuration
  • Reusable integration workflows
Project dependencies example

Dependency tree management

Understanding dependency trees

A dependency tree represents the hierarchical structure of dependencies for a project or library. In FlowX 5.0, dependency trees can include multiple levels of library dependencies.
Dependency tree visualization

Example dependency tree

Mortgage Project
├── Enums Library (1.6.0)
├── Integrations Library (2.5.0)
│   ├── Commons Library (1.1.0)  
│   └── Enums Library (1.6.0) # Transitive dependency
└── Subprocesses Library (1.3.0)
    └── Enums Library (1.6.0)  # Transitive dependency

Dependency tree constraints

Important Constraint: FlowX 5.0 implements a single-version constraint for dependency trees. The same library cannot exist multiple times in a dependency tree with different builds.

Allowed scenarios

Blocked scenarios

Conflict resolution

When dependency conflicts occur, you have several resolution options:
1

Update Direct Dependencies

Update the direct library dependency to a version that uses the required transitive dependency version.
# Before (Conflict)
Project → Library A (1.0) → Commons (1.1)
       → Library B (2.0) → Commons (1.2)  # Conflict

# After (Resolved)
Project → Library A (1.1) → Commons (1.2)  # Updated A to use Commons 1.2
       → Library B (2.0) → Commons (1.2)  # Now compatible
2

Create New Library Builds

Create new builds of libraries that include the required dependency versions.
3

Restructure Dependencies

Reorganize your dependency structure to avoid conflicts, potentially by creating intermediate libraries.

Managing dependencies

Adding project dependencies

1

Navigate to Dependencies

In your project workspace, go to the Config tab and select Dependencies.
2

Add Library Dependency

Click Add Dependency and select the library you want to add.
Add project dependency
3

Select Build Version

Choose the specific build version of the library you want to use.
Only committed builds are available.
4

Validate Dependency Tree

FlowX will automatically validate that the new dependency doesn’t create conflicts in your dependency tree.
5

Confirm Addition

Review the dependency tree preview and confirm the addition. The library’s resources will become available in your project.

Adding library dependencies

1

Open Library Configuration

Navigate to your library and go to the Config tab, then select Dependencies.
2

Add Library Dependency

Click Add Dependency and select another library as a dependency.
Add library dependency
3

Conflict Detection

FlowX will check for potential conflicts, including:
  • Version conflicts with existing dependencies
  • Circular dependency detection
  • Transitive dependency validation
4

Review Dependency Tree

Preview the complete dependency tree to understand all transitive dependencies.

Updating dependencies

Resource resolution

Resource types and references

Different resource types use different referencing mechanisms:
Resource TypeReference MethodExample
ProcessResource Definition IDproc_customer_onboarding_123
Media Library ItemResource Definition IDmedia_logo_456
System/WorkflowResource Definition IDsys_crm_integration_789
EnumerationNameCUSTOMER_TYPES
Substitution TagNameWELCOME_MESSAGE
Notification TemplateNameEMAIL_CONFIRMATION
Document TemplateNameCONTRACT_TEMPLATE
Configuration ParameterNameMAX_RETRY_COUNT

Resource precedence rules

When multiple resources with the same name exist in the dependency tree:
1

Highest Level Wins

Resources from the highest level (closest to the project) take precedence.
Project (Level 0)
├── Library A (Level 1) - contains ENUM_X
└── Library B (Level 1)
    └── Library C (Level 2) - contains ENUM_X

# ENUM_X from Library A (Level 1) is used
2

Same Level Resolution

If resources exist at the same level, the resource from the newest build (by build creation date) takes precedence.
3

Predictable Resolution

The resolution is deterministic and consistent across environments.
Best Practice: Avoid duplicate resource names across libraries in your dependency tree to maintain control and predictability over resource usage at runtime.

Build and deploy considerations

Build export/import

When exporting or importing builds:
  • All dependent libraries are included in the export package
  • Transitive dependencies are automatically resolved and included
  • Version consistency is maintained across environments
  • Dependency tree structure is preserved during import

Runtime behavior

At runtime:
  • Resource resolution follows the established precedence rules
  • Dependency tree is flattened for efficient resource lookup
  • Version consistency ensures predictable behavior
  • Build immutability guarantees that deployed builds remain stable

Best practices

Dependency design

Keep dependencies modular: Design libraries with clear, focused responsibilities to avoid monolithic structures.
Plan your hierarchy: Design your dependency tree structure before implementation to avoid conflicts later.
Use semantic versioning: Follow consistent versioning practices to make dependency management predictable.
Avoid circular dependencies: Design your library architecture to prevent circular references.
Document dependencies: Maintain clear documentation of library purposes and dependency relationships.

Version management

Lock to specific builds: Always reference specific builds rather than “latest” versions for stability.
Test dependency updates: Use development environments to test dependency updates before production.
Plan upgrade paths: Consider the impact on dependent projects when updating library versions.
Maintain backward compatibility: When possible, maintain backward compatibility to ease library updates.

Team collaboration

Establish ownership: Clearly define which teams own which libraries to coordinate updates.
Communication protocols: Establish processes for communicating library changes to dependent teams.
Shared standards: Agree on naming conventions and design patterns across library-owning teams.

Troubleshooting

Common dependency issues

FAQ