Process Version Transition in Aletyx Enterprise Build of Kogito and Drools 10.1.0-aletyx
Overview
This document outlines the recommended approach for managing process versioning in Aletyx Enterprise Build of Kogito and Drools 10.1.0-aletyx. Unlike some workflow engines that support direct process instance migration between different process versions, Aletyx Enterprise Build of Kogito and Drools 10.1.0-aletyx follows a parallel deployment pattern where different versions of a process coexist until older instances complete their lifecycle.
Process Instance Migration is not a part of Aletyx Enterprise Build of Kogito and Drools 10.1.0-aletyxAletyx Enterprise Build of Kogito and Drools 10.1.0-aletyx does not support direct Process Instance Migration from one version to another while processes are running. The strategy outlined below is the recommended approach for process evolution in the current release of 10.1.0-aletyx
Versioning Strategy
Parallel Deployment Pattern
The recommended versioning approach follows these principles:
- Immutable Process Definitions : Once a process is deployed and instances are running, its definition should remain unchanged.
- Parallel Version Deployment : New process versions are deployed alongside existing versions with unique identifiers.
- Instance Isolation : Each process instance operates according to the version under which it was created.
- Lifecycle Management : After all instances of an old version complete, that version can be safely removed.
Version Transition Walkthrough
This diagram illustrates the lifecycle of a process from initial deployment through version updates to cleanup:
Initial Deployment (Version 1)
- Deploy a process definition file named
StatefulProcess.bpmn with process ID statefulProcess in version 1.0.0 of your container.
- Applications create and interact with process instances using this definition.
Updating Your Process (Version 2)
When business requirements change and you need to update your process:
- Create a new file named
StatefulProcessV2.bpmn with a new process ID statefulProcessV2 .
- Deploy this alongside the existing process definition.
- The container now contains both process definitions.
Routing Logic
Applications must be updated to use the appropriate process version:
- Existing process instances continue using
statefulProcess
- New process instances should be created using
statefulProcessV2
Cleanup Phase
Once all instances of the original version complete:
- Deploy a new container version that removes
StatefulProcess.bpmn
- Retain
StatefulProcessV2.bpmn as the active definition
- Future deployments would follow the same pattern: create
StatefulProcessV3.bpmn , etc.
Implementation Best Practices
Process ID Versioning Convention
We recommend adopting a consistent versioning strategy for process IDs:
- Base name + version suffix:
processName → processNameV2 → processNameV3
- Version in the process ID must match the file name for clarity
Client Application Adaptation
To handle multiple versions, clients have several options:
Option 1: Version-specific Endpoints
Applications explicitly choose which version to call:
Option 2: API Gateway Pattern
Implement an API gateway that routes to the appropriate process version:
The gateway pattern requires additional implementation but provides a cleaner abstraction for clients.
Option 3: Process Client Facade
Create a client-side wrapper that handles version selection logic:
Containerization Strategy
When using containers, consider the following approaches:
Approach 1: Single Container with Multiple Versions
Deploy both process versions in the same container:
Pros: Simplified deployment, single service endpoint
Cons: Larger container size, less clear separation of versions
Approach 2: Multiple Containers with Version-specific Routing
Deploy each version in its own container and use service routing:
Pros: Clean separation of versions, independent scaling, handles underlying model changes beyond process better
Cons: More complex routing logic needed, more containers deployed
Cleanup Approach: Regardless of Strategy
After there are no more active instances, then cleanup can be performed to remove the V1.0.0 from the deployed container.
Practical Example
Initial Deployment
- Create and deploy
StatefulProcess.bpmn with ID statefulProcess
- Clients call
/statefulProcess to create instances
Version Update
- Business requirements change, requiring process updates
- Create and deploy
StatefulProcessV2.bpmn with ID statefulProcessV2
- Update client applications to use the new version for new instances
- Monitor completion of existing instances running under the original version
Final Cleanup
- Once all original instances complete, deploy a new version that removes
StatefulProcess.bpmn
- Simplify client applications to only use the latest version
Future Considerations
While Aletyx Enterprise Build of Kogito and Drools 10.1.0-aletyx does not directly support process instance migration, future versions may add this capability. Until then, the parallel deployment pattern described in this document is the recommended approach for managing process evolution.
Implementation Example High Level
Process Client Facade
API Gateway
Docker Compose
Below is an example of how the multiple container strategy could be setup and shown, just note this is a scaffolded code and not meant to replace an actual strategy.
Troubleshooting
Common Issues and Solutions
- Version Confusion : Ensure clear naming conventions and documentation of which version is active.
- Endpoint Conflicts : If using a service mesh or API gateway, verify routing rules are correctly configured.
- Resource Overhead : If running many versions in parallel causes resource issues, consider implementing a monitoring system to track when older versions can be safely removed.
Summary
The parallel deployment pattern supports process evolution in Aletyx Enterprise Build of Kogito and Drools 10.1.0-aletyx without direct instance migration. By creating new versioned process definitions alongside existing ones, you can evolve your processes while ensuring running instances complete successfully under their original definitions.