Skip to main content

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:
  1. Immutable Process Definitions : Once a process is deployed and instances are running, its definition should remain unchanged.
  2. Parallel Version Deployment : New process versions are deployed alongside existing versions with unique identifiers.
  3. Instance Isolation : Each process instance operates according to the version under which it was created.
  4. 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: Process SVG Transition Process SVG Transition

Initial Deployment (Version 1)

  1. Deploy a process definition file named StatefulProcess.bpmn with process ID statefulProcess in version 1.0.0 of your container.
  2. 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:
  1. Create a new file named StatefulProcessV2.bpmn with a new process ID statefulProcessV2 .
  2. Deploy this alongside the existing process definition.
  3. 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:
  1. Deploy a new container version that removes StatefulProcess.bpmn
  2. Retain StatefulProcessV2.bpmn as the active definition
  3. 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: processNameprocessNameV2processNameV3
  • 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 Single Container with Multiple Versions Single Container with Multiple 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 Multiple Containers with Version-specific Routing Multiple Containers with Version-specific Routing

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. Single Container with Multiple Versions Single Container with Multiple Versions

Practical Example

Initial Deployment

  1. Create and deploy StatefulProcess.bpmn with ID statefulProcess
  2. Clients call /statefulProcess to create instances

Version Update

  1. Business requirements change, requiring process updates
  2. Create and deploy StatefulProcessV2.bpmn with ID statefulProcessV2
  3. Update client applications to use the new version for new instances
  4. Monitor completion of existing instances running under the original version

Final Cleanup

  1. Once all original instances complete, deploy a new version that removes StatefulProcess.bpmn
  2. 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

Troubleshooting

Common Issues and Solutions

  1. Version Confusion : Ensure clear naming conventions and documentation of which version is active.
  2. Endpoint Conflicts : If using a service mesh or API gateway, verify routing rules are correctly configured.
  3. 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.