How vanillabp/blueprint-workflowmodule-springboot-standalone works
Main Components
• Spring Boot Application Entry Point
– Represented by Application.java which bootstraps the application.
• Workflow Module for Loan Approval
– Contains packages such as “loanapproval” with components including the API Controller (ApiController.java), service layer (Service.java), configuration properties (LoanApprovalProperties.java), and domain model/repository (e.g., Aggregate.java and AggregateRepository.java).
• BPMN Process Integration & Configuration
– BPMN process definitions exist in the resources under “processes/camunda7” and “processes/camunda8”.
– Configuration files (application.yaml, application-camunda7.yaml, application-camunda8.yaml) determine which Camunda engine profile is activated at runtime.
• Build and Deployment Infrastructure
– Maven is used as the build tool (pom.xml, maven wrapper files) and profiles (like “camunda7”) activate specific runtime behaviors.
• External Dependencies
– Integration with Camunda through the Camunda adapter (for Camunda 7 specifically, and instructions for Camunda 8 provided in the separate CAMUNDA8.md file).
– Potential integration with a Camunda Cockpit (as recommended in the README).
Relationships and Data Flow
• REST API Layer
– The API Controller serves as the entry point for HTTP calls (e.g., requests to start a loan approval process or assess risk).
• Business Logic Layer
– The API Controller forwards requests to the Service layer, which encapsulates the core business logic.
– Indicate a connection from the controller to the service node.
• Domain Model & Persistence
– The Service layer accesses the Aggregate and AggregateRepository components to manage workflow state.
• BPM Engine Integration
– The Service layer interacts with the BPM engine by triggering BPMN processes (using the BPMN file from the processes directory).
– Connect the service node to a BPM Process (label it “BPMN Engine” or “Camunda Engine”) and annotate that this integration is dependent on the selected profile (Camunda 7 or Camunda 8).
• Configuration Management
– External configuration files (application.yaml and its profile-specific variants) provide necessary settings to wire up the Camunda adapter and Spring Boot components.
– Show a configuration block that feeds into the application at startup.
Architectural Patterns & Technologies
• Modularization by Business Use Case
– The loan approval workflow is self-contained within its package, making it easier to extend the application.
– Emphasize that replicating this structure for new business cases means each will have its own API Controller, service, config, and repository.
• Use of Profiles for Multi-Engine Support
– The system uses Maven and Spring profiles (camunda7 and camunda8) to allow switching between Camunda versions.
• Integration with BPMN and External Tools