Architecture Overview

This section provides a high-level overview of the application’s architecture by delineating its key components and outlining how they interact to implement business processes. The architecture is divided into two main areas:

  • Internal Architecture This includes core components such as the business logic, Flowable system (comprising BPMN processes, the Flowable Engine, and delegate components), and data flows that ensure smooth internal operations and dynamic process management.

  • External Integrations External interfaces such as the TR-069 NBI and the MySQL Database are covered. These integrations enable the application to communicate with external systems for device management and persistent data storage.

The design emphasizes dynamic workflow execution, robust error handling using custom exception classes (e.g., ProvisionPortalBpmnException for BPMN errors and ProvisionPortalException for unexpected failures), and performance optimizations through technologies like virtual threads. This comprehensive approach ensures the application remains modular, scalable, and resilient in managing both internal operations and external interactions.

1. Component Diagrams

1.1. High Level Diagram

high-level-diagram

1.2. Low Level Diagram

low-level-diagram

1.3. System Components

The main components of the system, their roles, and interactions are outlined below:

  1. Spring Boot Application

    • Description: The core container of the application, built with Spring Boot, providing a modular and scalable foundation.

    • Role: Integrates various layers of the system, including business logic and external integrations.

  2. Flowable System

    • BPMN Processes: Business processes stored in the classpath:/processes/ directory. They define the workflow and process logic of the application.

    • Flowable Engine: Responsible for executing and managing the BPMN processes.

    • Delegate Components: Implement the bulk of the business logic invoked by the BPMN processes.

  3. Business Logic Layer

    • Service Layer: Contains services that implement specific business operations required by the application.

    • REST API Endpoints: Expose functionalities for both internal and external interactions. For instance, the createSpUser method is implemented with a simplified workflow involving direct mapping and subsequent communication with the TR069 NBI.

  4. External Systems

    • TR069 NBI: An external interface used for managing devices by retrieving, updating, or creating device data, as well as for user creation. The majority of the device management logic resides in NBI, while the application primarily acts as a data mapper.

    • MySQL Database: The persistent data store, organized into a common schema along with a dedicated Flowable schema.

Interactions: - Internal Communication: BPMN processes initiate workflows through the Flowable Engine, which delegates tasks to the Delegate Components. The Service Layer processes operations and exposes them via REST API Endpoints. - External Communication: REST API Endpoints are utilized to communicate with the TR069 NBI for operations such as createSpUser and to interface with the MySQL Database for read/write data operations.

1.4. Data Flow

This section describes the pathways that data follows throughout the system, detailing the key processes and communication channels involved in handling and transforming information.

  • Internal Data Flow: BPMN processes, triggered by system events, initiate workflows in the Flowable Engine. The engine then delegates tasks to the Delegate Components, which execute the necessary business logic. This flow continues through the Service Layer that exposes functionality via REST API Endpoints, ensuring efficient internal data processing.

  • External Data Exchange: REST API Endpoints are used to communicate with external systems such as TR-069 NBI for device management and the MySQL Database for persistent storage. For instance, operations like the createSpUser method are handled through direct mapping and subsequent communication with NBI.

  • Database Integration: All critical data processed internally is stored in or retrieved from the MySQL Database, ensuring data consistency and integrity across the system.

  • Dynamic Process Adaptation: With BPMN processes stored in classpath:/processes/ and modifiable at runtime, the system supports dynamic adaptation of business workflows without needing a restart.

2. Integration with Flowable and TR069 NBI

This section covers the integration with external systems in the application, providing detailed insights into how Flowable and TR-069 NBI are leveraged to manage business workflows and device data.

2.1. Flowable Integration

Flowable is a lightweight Business Process Management (BPM) engine that facilitates the definition, execution, and management of business processes using BPMN (Business Process Model and Notation). In this project, Flowable is integrated to drive dynamic workflows and adapt business logic at runtime.

Key Aspects of Flowable Integration:

  • Process Storage: All BPMN process definitions are stored in the classpath:/processes/ directory. This centralized location simplifies the management and updating of workflow definitions.

  • Dynamic Process Updates: Developers can modify BPMN XML files (e.g., acsEventFlow, inputFlow, replaceCPEFlow, and deactivateServiceFlow) directly in the classpath:/processes/ directory. Once updated, these files can be reloaded into the application to immediately reflect changes without requiring a full restart.

  • Process Execution: The embedded Flowable Engine within the Spring Boot application is responsible for executing BPMN processes. It triggers workflows, manages events, and delegates tasks to designated components via delegate classes.

  • Business Logic Distribution: The primary business logic is implemented within delegate components, with supplementary logic present in the service layer and in lightweight Groovy script tasks. This distribution promotes modularity and flexibility in process management.

  • Rationale for Choosing Flowable: Flowable was selected for its ease of integration with Spring Boot, support for dynamic workflow updates, and the robust features offered by its Flowable Free Trial Cloud Design. These advantages allow the system to quickly adapt to evolving business requirements while keeping a clear separation between process definitions and business logic.

For more detailed information, please refer to the official Flowable Documentation.

To access additional features and manage workflows, please log in to your Flowable account at Flowable Login.

Modifying and Updating Flows: Developers can update workflows by editing the respective BPMN XML files located in the classpath:/processes/ directory. Once changes are made, redeploy or reload the processes to immediately apply the modifications.

2.2. TR-069 NBI Integration

The TR-069 Network Based Interface (NBI) is an external system responsible for managing device data and user operations, playing a crucial role in device administration.

Key Aspects of TR-069 NBI Integration:

  • Device Data Management: The NBI is used to retrieve, update, and create device-related data. This allows the application to act primarily as a data mapper, offloading the complexities of device management.

  • User Management: Specific operations, such as the createSpUser method, are managed via direct API calls to TR-069 NBI. This approach simplifies user creation by mapping data directly from the application to the NBI.

  • Communication: Interactions with TR-069 NBI occur through REST API calls. While most API interactions are triggered within BPMN processes, certain operations are executed directly in the code when a simplified workflow is sufficient.

  • Separation of Responsibilities: Delegating core device management to TR-069 NBI ensures that the application remains focused on data transformation and workflow orchestration, thereby minimizing internal complexity.

Advice: Regularly review and update your BPMN process definitions to ensure workflows remain aligned with evolving business needs. Utilize Flowable’s dynamic updating capabilities to minimize downtime during process changes.

In summary, the integration of Flowable and TR-069 NBI provides robust workflow management and a scalable solution for external device administration. Flowable enables dynamic and adaptable business processes, while TR-069 NBI efficiently handles device data and user operations.