Workload Orchestration
Relevant source files
The following files were used as context for generating this wiki page:
Workload Orchestration in the flext-oracle-oic extension provides a structured framework for executing and managing different integration patterns within the Oracle Integration Cloud (OIC) ecosystem. It supports app-driven orchestrations, scheduled tasks, and file transfer patterns by utilizing a mixin-based architecture that bridges high-level service facades with low-level API clients.
The system ensures reliability through railway-oriented programming using the p.Result type, allowing for graceful error handling during the execution of complex integration flows. It is configured through centralized settings that enable or disable orchestration features based on environment requirements.
Sources: src/flext_oracle_oic/services/orchestration.py:1-12, src/flext_oracle_oic/settings.py:38-40
Orchestration Patterns
The system categorizes integration workloads into three primary execution patterns, each handled by specific methods in the FlextOracleOicOrchestrationMixin.
App-Driven Orchestration
App-driven orchestrations are triggered via REST endpoints. The system prepares a JSON payload, mapping values to a format acceptable by the OIC API, and submits a POST request to the specific integration's connection endpoint.
Scheduled Orchestration
Scheduled patterns represent integrations that run based on predefined time intervals or specific events. The orchestration service passes a schedule configuration to the client to initiate or manage these background tasks.
File Transfer Pattern
The file transfer pattern specializes in moving data between systems. It utilizes a dedicated file configuration and communicates with OIC endpoints specifically designed for file-based integration tasks.
Sources: src/flext_oracle_oic/services/orchestration.py:19-86, src/flext_oracle_oic/ext_client.py:92-113
Architecture and Data Flow
The orchestration architecture follows a tiered approach where the FlextOracleOicService facade uses the FlextOracleOicOrchestrationMixin to delegate operations to the FlextOracleOicClient.
The diagram above illustrates the flow from a service call through the specific pattern handlers to the final API request performed by the unified client.
Sources: src/flext_oracle_oic/services/orchestration.py:19-123, src/flext_oracle_oic/ext_client.py:92-113
Sequence of Execution
When an orchestration is triggered, the system first retrieves an authenticated client before attempting the network request.
The sequence ensures that client initialization and authentication (OAuth2) are handled before any orchestration logic is executed.
Sources: src/flext_oracle_oic/services/orchestration.py:108-123, src/flext_oracle_oic/ext_client.py:145-177
Key Components and Methods
Orchestration Service Methods
The following table summarizes the primary methods available for workload orchestration within the FlextOracleOicOrchestrationMixin.
| Method | Pattern | Purpose |
|---|---|---|
execute_app_driven_orchestration | App-Driven | Executes an integration via a POST request to a connection endpoint. |
execute_scheduled_orchestration | Scheduled | Triggers or configures a scheduled integration flow. |
execute_file_transfer | File Transfer | Initiates a file-based integration workload. |
Sources: src/flext_oracle_oic/services/orchestration.py:19-86
Data Models
Orchestration relies on entities defined in the domain namespace to represent integration status and identity.
| Field | Type | Description |
|---|---|---|
integration_id | str | Unique identifier for the OIC integration. |
status | str | Current state (e.g., ACTIVATED, DRAFT, RUNNING). |
integration_version | str | Semantic versioning of the integration flow. |
Sources: src/flext_oracle_oic/models.py:102-120, src/flext_oracle_oic/constants.py:113-125
Configuration and Implementation
The orchestration features are governed by runtime settings that control feature flags and timeouts.
# src/flext_oracle_oic/settings.py:38-40
enable_monitoring: Annotated[bool, u.Field(default=True)]
enable_enterprise_patterns: Annotated[bool, u.Field(default=True)]
enable_orchestration: Annotated[bool, u.Field(default=True)]
Request Normalization
Before sending payloads to OIC, the service performs normalization of values to ensure compatibility with the OIC REST API requirements, particularly for app-driven patterns where Python types must be converted to general JSON-serializable values.
Sources: src/flext_oracle_oic/services/orchestration.py:44-46, src/flext_oracle_oic/ext_client.py:277-287
Summary
Workload Orchestration in flext-oracle-oic provides a robust, type-safe mechanism for interacting with Oracle Integration Cloud. By abstracting the complexities of REST endpoint construction and authentication into a mixin-based service layer, it allows developers to execute app-driven, scheduled, and file-transfer workloads with consistent error handling and configuration management.