Introduction to Adaptive Process Architecture
Adaptive Process Architecture represents a paradigm shift in business process automation design. Moving beyond traditional deployment models, this architecture delivers cloud-native orchestration capabilities while solving the fundamental challenges organizations face with modern process automation. Rather than forcing a choice between monolithic simplicity and microservice flexibility, Adaptive Process Architecture creates a third path forward. By strategically co-locating process components within unified deployments while maintaining clean service boundaries, this architecture delivers enterprise-grade reliability with dramatically reduced operational overhead.Strategic Advantages of Adaptive Process Architecture
1. Optimal Balance of Scalability and Operational Simplicity
While fully distributed architectures may offer theoretical maximum scalability, they introduce exponential complexity in deployment, monitoring, and troubleshooting. Adaptive Process Architecture strikes an optimal balance by intelligently co-locating related services while maintaining clean service boundaries. This approach delivers near-linear scalability with significantly reduced operational overhead.2. Drastically Reduced Operational Complexity
By carefully packaging contextually related services together, the operational overhead is drastically reduced. This makes sophisticated process orchestration accessible to organizations without requiring specialized microservice expertise, while still preserving the cloud-native benefits that modern enterprises demand.3. Perfect Alignment with Domain-Driven Design (DDD)
The architecture naturally supports bounded contexts where each business service encapsulates its complete functionality. This alignment with DDD principles ensures that your technical architecture mirrors your business domains, creating a unified language between technical and business stakeholders.4. Intelligent Context Management
Modern business processes require sophisticated context management across multiple components. Co-location dramatically reduces the challenges of distributed context coordination, allowing your processes to maintain rich contextual information without the complexity of distributed state synchronization.5. Optimized Performance for Critical Paths
Critical process operations execute through in-memory or local service calls rather than network calls, delivering significant performance improvements. This architecture ensures consistent response times at cloud speeds for critical operations while maintaining the flexibility of distributed communications where appropriate.Core Components of Adaptive Process Architecture
The following diagram illustrates the key components of Adaptive Process Architecture:
The table below details the different components, indicating whether they are mandatory or optional:
Process Definition Models
The Business Process Model and Notation (BPMN) artifacts serve as the digital blueprint of your business processes. These models transcend traditional software specifications by providing a visual representation that both business and technical stakeholders can understand and refine. During compilation, the Kogito build chain transforms these models into highly optimized executable code, generating specialized components tailored to your specific process requirements. This bridge between business design and technical implementation enables true collaborative development where domain experts and engineers work with a unified understanding. The resulting executable models capture business intent with exceptional fidelity while leveraging modern software engineering principles. This separation of concerns allows business experts to focus on process design while technical teams optimize deployment and integration aspects.Orchestration Engine
The intelligent core of your process applications, powered by the battle-tested jBPM engine reimagined for cloud-native environments. This sophisticated engine coordinates the flow of activities across your entire process landscape, making intelligent routing decisions and dynamically delegating specialized capabilities to purpose-built subsystems. The engine handles complex orchestration patterns including parallel execution paths, conditional branching logic, event-driven flow control, and compensation handling - all while maintaining transactional integrity across distributed components. Its modular architecture allows seamless interaction with other specialized subsystems like the Human Collaboration Framework for human-in-the-loop scenarios and the Temporal Event Coordinator for time-based orchestration. This next-generation engine combines the reliability of traditional BPM systems with the agility and scalability demands of modern cloud architectures, delivering a foundation that adapts to changing business requirements without sacrificing operational stability.Cloud-Native Runtime
The Kogito-powered foundation provides essential enterprise capabilities required for mission-critical deployments. This runtime layer elegantly handles cross-cutting concerns including transaction management, API exposure, resource pooling, security controls, and component lifecycle management. Starting with its original built on Quarkus platform, the runtime delivers exceptional startup performance and memory efficiency, whether deployed in containers, Kubernetes clusters, or serverless environments. The cloud-native design ensures your process applications can scale elastically to meet demand spikes while maintaining consistent performance characteristics. The runtime’s modular design allows selective inclusion of capabilities based on your specific requirements, avoiding the bloat of traditional application servers while delivering enhanced resilience through simplified deployment topologies.Real-Time Process Intelligence (Data-Index)
The Real-Time Process Intelligence layer provides an always-current view of process execution across your enterprise. Through its event-driven architecture, this component captures incremental state changes from active processes and intelligently computes the current operational state through sophisticated aggregation algorithms. By exposing rich GraphQL interfaces, this layer enables both technical and business users to query process data through intuitive, domain-specific queries - unlocking real-time visibility without impacting performance. This capability powers executive dashboards, operational monitoring systems, and advanced analytics while maintaining complete separation from the core execution engine.
- Intelligent Process Runtime:
- Functions as the core execution environment within the Adaptive Process Architecture
- Can scale to multiple replicas to handle varying workloads
- Processes business workflows and generates workflow events
- Workflow Event Flow:
- When a workflow milestone is reached, the Intelligent Process Runtime generates workflow events
- These events carry contextual data about the workflow state and execution
- Events flow directly to the Data Index component for processing
- Data Index:
- Acts as the central event processing hub
- Captures and indexes all workflow events for efficient querying
- Provides real-time visibility into process execution
- Data Store:
- External persistent storage that maintains historical workflow data
- Receives synchronized data from the Data Index
- Enables advanced analytics and reporting on process performance
Querying with Data-Index
Data-Index supports queries through GraphQL. For using the endpoint you just need to explore in your deployment the URI:kogito-addons-quarkus-data-index-jpa:
Process History Service (Data-Audit)
A comprehensive temporal view of process execution that captures the complete evolution of process instances throughout their lifecycle. This component maintains an immutable record of every significant event, creating a trusted audit trail for compliance, analysis, and process improvement initiatives. The rich historical data enables authorized users to replay processes from any point in time, understand decision paths, and identify optimization opportunities. Through its flexible GraphQL interface, the Process History Service supports complex historical queries that can reveal insights for performance analysis and business intelligence.
- Data-Audit Common: Provides the common framework to create implementations.
- Data-Audit: Provides the wiring to use Data-Audit with Quarkus as colocated service in a deployment.
- Data-Audit JPA Common: Provides the common extension that doesn’t depend on the runtime.
- Data-Audit JPA: Provides the wiring between the specific implementation and Quarkus System.
Querying with Data-Audit
The way to retrieve information from the Data-Audit is using GraphQL. This way we can abstract how the information is retrieved and allow different needs depending on the user. The Path is${HOST}/data-audit/q for sending GraphQL queries.
Example 1
Execute a registered query, e.g. GetAllProcessInstancesState with a definition of data fields that should be returned:
${HOST}/data-audit/r endpoint. This endpoint can also be used to register new queries.
Example 2
Register a new query with a complex data type:
${HOST}/data-audit/q endpoint:
- Runs as a colocated service within your Quarkus application
- Includes extension points for customization and integration
- Provides GraphQL querying capabilities for flexible data access
- Supports multiple storage implementations through extension points
Temporal Intelligence Coordinator (Jobs Service)
For Intelligent Process Orchestrations, Aletyx is the only offering focused on the Apache KIE ecosystem on the market capable of scaling multiple pods for your Intelligent Process Orchestrations, not just decisions!
Definitions
- transport: the medium used to transfer a message between client component and Temporal Intelligence Coordinator.
- sink: is the callback endpoint that the client uses.
- storage: is the persistence layer for the jobs being scheduled by the Temporal Intelligence Coordinator.
- Temporal Intelligence Coordinator: the main component containing the logic for scheduling a job and storing that data.
Human Collaboration Framework (User Tasks)
A sophisticated system for seamlessly integrating human judgment and expertise into automated processes. This framework implements a comprehensive lifecycle for tasks requiring human input, approval, or decision-making. The Human Collaboration Framework manages task assignment strategies, permission controls, and state transitions using a well-defined task lifecycle. It supports rich interaction patterns including attachments, comments, forms, and notifications - creating an intuitive collaboration experience that connects human expertise with automated process execution. When a process instance reaches a User Task, the framework creates a new task in the Created state, which then moves through various states including Ready, Reserved, and ultimately Completed (or alternative terminal states like Failed or Obsolete). With the Default life cycle, when a User Task is initiated in the User Task Subsystem it starts in a Created state. At that moment, it automatically passes through theActivate phase that will set the task in Ready state, making the task available to the users that are allowed to work with it.
The task will then remain in Ready state until a user claims it, which will make the task pass through the Claim phase making the move into a Reserved state and the user will become the owner of the task.
With the task Reserved, the owner will be able to complete the task (Complete phase) that will finally move the task to a Completed that will successfully finalize the task allowing the process instance to continue.
By default, the User Tasks are persisted in memory, but this can be changed to persistent storage by incorporating the following dependency:
Persistent Context Store (Storage)
The resilient foundation that maintains process context across all components. This storage layer ensures process consistency and durability, protecting against data loss even during system failures or maintenance windows. Using a relational database, it maintains a consistent view of process state that can be accessed by all components within the architecture. This shared storage approach dramatically simplifies deployment while providing strong data consistency guarantees. The Temporal Event Coordinator and Data Intelligence layer work seamlessly with the Persistent Context Store to provide realtime process updates and interactions. The storage layer is optimized for both transactional integrity and query performance, supporting both operational needs and analytical workloads from a single data store. This unified approach eliminates the complexity of data synchronization while providing a single source of truth for all process-related information.Getting Started with Adaptive Process Architecture
Implementing this architecture has been streamlined to allow teams to quickly build sophisticated process applications. The following steps will get you started:1. Create a new Quarkus project with the required dependencies
2. Configure your application in application.properties
3. Create your BPMN process models
Create your BPMN process models in thesrc/main/resources directory. You can design these using our provided sandbox environment or import existing BPMN processes.
4. Launch your application
Best Practices for Adaptive Process Architecture
Database Management
- Use Database Migration Tools for Schema Evolution
- Leverage Flyway as shown in the configuration for controlled schema upgrades
- Keep migration scripts in version control alongside application code
- Use separate migration scripts for different subsystems
- Configure Proper Connection Pooling
- Set appropriate maximum pool size based on expected workload
- Configure statement timeouts to prevent resource exhaustion
- Enable metrics collection to monitor pool utilization
Performance Optimization
- Implement Strategic Process Fragmentation
- Design long-running processes as orchestrated fragments
- Use compensation handlers for long-running transactions
- Leverage asynchronous continuation for I/O-intensive steps
- Configure Database Access Patterns
- Use read-only transactions for query operations
- Implement optimistic locking for high-concurrency scenarios
- Consider database partitioning for high-volume process instances
- Optimize Message Flow Patterns
- Batch process events where appropriate
- Implement idempotent message handlers
- Use correlation keys for related message sequences
Testing Strategy
- Create Unit Tests for Process Fragments
- Test individual subprocesses in isolation
- Mock external service interactions
- Validate process paths using test-specific process variable sets
- Implement Integration Tests with Test Containers
- Use testcontainers for database integration testing
- Test complete process flows with realistic data
- Verify transaction boundaries and rollback scenarios
- Use Event Recording for Complex Process Testing
- Capture process events for test verification
- Implement assertion helpers for common verification patterns
- Test timer-based scenarios with clock manipulation
Monitoring and Observability
- Use Data-Index for Process State Queries
- Implement dashboard queries using GraphQL
- Create custom process state visualizations
- Set up alerts for stalled processes or SLA violations
- Configure Proper Logging
- Use structured logging format (JSON) in production
- Implement correlation IDs across process instances
- Set appropriate log levels for different environments
- Set Up Metrics Collection
- Monitor process throughput and completion times
- Track resource utilization across all subsystems
- Implement custom metrics for business KPIs
Scaling Considerations
- Plan for Horizontal Scaling
- Implement stateless request handling where possible
- Use sticky sessions for active process instances
- Configure proper load balancing with health checks
- Implement Process Affinity
- Route related process operations to the same node
- Use consistent hashing for request distribution
- Implement backpressure mechanisms to prevent overload
- Manage Database Connections Efficiently
- Size connection pools appropriately for expected load
- Monitor database connection usage
- Implement circuit breakers for database interaction