Integration Lifecycle Management
Relevant source files
The following files were used as context for generating this wiki page:
Integration Lifecycle Management in flext-oracle-oic encompasses the full set of operations required to create, update, deploy, and control the operational state of integrations within the Oracle Integration Cloud (OIC) environment. This system leverages a mixin-based service architecture to provide structured transitions between integration states such as DRAFT, ACTIVATED, and DEACTIVATED.
The module ensures that all lifecycle transitions are validated against enterprise standards, utilizing a unified client for authenticated communication with the OIC REST API. It handles everything from initial data validation to final state verification and connection health testing.
Sources: src/flext_oracle_oic/services/integration_lifecycle.py, src/flext_oracle_oic/services/integration_crud.py, src/flext_oracle_oic/api.py
State Management and Transitions
The lifecycle of an integration is defined by a specific set of statuses. Management operations allow for transitioning an integration through its functional stages, primarily focused on activation and deactivation.
Valid Integration Statuses
The system recognizes a fixed set of statuses that an integration can occupy:
- ACTIVATED: The integration is live and capable of processing requests.
- DEACTIVATED: The integration is offline.
- DRAFT: Initial state during creation.
- RUNNING / STOPPED: Operational states for scheduled or app-driven flows.
- ERROR: Indicates a failure in the integration state or deployment.
Sources: src/flext_oracle_oic/constants.py:104-111, src/flext_oracle_oic/constants.py:179-187
Lifecycle Operation Flow
The FlextOracleOicIntegrationLifecycleMixin provides the logic for state transitions. Each operation involves initializing an authenticated client, performing a REST call to a specific OIC sub-resource, and returning a Result object.
The diagram shows the logic flow for changing the operational state of an integration via the lifecycle mixin.
Sources: src/flext_oracle_oic/services/integration_lifecycle.py:20-65
CRUD and Deployment Operations
The CRUD operations form the foundation of lifecycle management, allowing integrations to be provisioned and modified before they are activated.
Deployment Process
Deployment is handled by the deploy_integration method, which wraps the creation logic. It ensures that the integration configuration is sent to OIC and verifies that a unique integration_id is returned.
| Operation | Method | API Endpoint | Purpose |
|---|---|---|---|
| Create | create_integration | POST /integrations | Registers a new integration in OIC. |
| Fetch | fetch_integration | GET /integrations | Retrieves details for a specific integration ID. |
| Update | update_integration | PUT /integrations/{id} | Modifies an existing integration configuration. |
| Delete | delete_integration | DELETE /integrations/{id} | Removes an integration from the OIC instance. |
Sources: src/flext_oracle_oic/services/integration_crud.py:27-142, src/flext_oracle_oic/ext_client.py:61-70
Integration Data Validation
Before deployment or update, integration data is subjected to validation via FlextOracleOicUtilitiesOracleOic. This ensures that required fields like name meet length requirements and that the version follows the XX.XX.XXXX pattern.
Sources: src/flext_oracle_oic/_utilities/oracle_oic.py:44-78
Service Architecture
Lifecycle management is implemented using a Thin Facade pattern, where the FlextOracleOicApi delegates work to specialized service mixins.
The class hierarchy illustrates how lifecycle and CRUD capabilities are composed into the main API surface.
Sources: src/flext_oracle_oic/api.py:32-60, src/flext_oracle_oic/services/integration_lifecycle.py:17-19
Connectivity and Health
A critical part of the lifecycle is ensuring the OIC instance is reachable. The test_connection method probes the OIC health endpoint.
- Endpoint:
/ic/api/integration/v1/health - Success Condition: Response status must equal
healthy(defined inc.HealthStatus.HEALTHY). - Model: Health data includes a status and a list of components (database, messaging, integration engine).
Sources: src/flext_oracle_oic/services/integration_lifecycle.py:67-97, src/flext_oracle_oic/constants.py:148-154
Data Models
The following Pydantic models represent the core entities managed during the lifecycle:
OICIntegrationInfo
Used to represent the state and metadata of an integration.
| Field | Type | Description |
|---|---|---|
integration_id | str | Unique identifier in OIC. |
name | str | Human-readable name. |
status | str | Current operational state. |
integration_version | str | Version string (e.g., 01.00.0000). |
last_updated | str | Timestamp of the last modification. |
Sources: src/flext_oracle_oic/models.py:84-105
Implementation Example: Activation
def activate_integration(self, integration_id: str) -> p.Result[bool]:
try:
client_result = self._get_client()
if client_result.failure:
return r[bool].fail(client_result.error)
client = client_result.value
activate_result = client.make_request(
"POST",
f"/integrations/{integration_id}/activate",
)
return r[bool].ok(value=True) if activate_result.success else r[bool].fail(activate_result.error)
except c.EXC_NETWORK_TYPE as e:
return r[bool].fail_op("Integration activation", e)
Sources: src/flext_oracle_oic/services/integration_lifecycle.py:20-43
Conclusion
Integration Lifecycle Management provides a robust framework for controlling Oracle Integration Cloud flows. By enforcing strict status validation, standardized CRUD patterns, and health-checked connectivity, the module ensures that integrations move through their lifecycle stages (from Draft to Activated) in a predictable and enterprise-ready manner.