Architecture

Module Structure

The FS-CD Adapter uses a Maven multi-module structure to separate concerns, enable customization, and allow flexible deployment.

The following diagram illustrates the Maven modules of group de.faktorzehn.fscd-adapter along with their dependencies.

module structure

Bill of Material

The module de.faktorzehn.fscd-adapter:fscd-adapter-bom provides a Maven bill of materials (BOM) for importing into Maven project dependency management.

The BOM manages:

  • All library modules with consistent versions

  • Transitive dependencies with managed versions

This BOM ensures consistent versions across all FS-CD Adapter modules and their dependencies.

The BOM excludes the integration layer modules, which we deliver as source code for direct customization.

Core Modules

The core modules provide the fundamental functionality required to integrate with SAP FS-CD.

jco-library

de.faktorzehn.jco:jco-library

A library built on top of SAP Java Connector (JCo) to facilitate executing Remote Function Calls (RFC).

Key Components:

  • JcoConnection: Lazily connects to a JCoDestination that is configurable via JcoProperties (a Spring ConfigurationProperties) instead of JCo .destination files. This allows for credentials to be set externally, e.g., via environment variables, instead of being bundled into the application.

  • JcoFunctionExecutor and JCoFunctionExecutorFactory: Execute JCoFunctions in a consistent way

  • JcoTransactionManager: Implementation of Spring’s PlatformTransactionManager to make multiple RFCs in a single transaction in the SAP system.

  • DomainValueSource and PropertiesDomainValueSource: Resolve domain texts using resource bundles (.properties files)

  • JcoRecordReader and JcoRecordWriter: Read and write JCoRecords

  • JcoTableIterable: Iterate over JCoTables

  • JcoHelper: Various static utility methods

See chapter Faktor Zehn Jco Library for more.

jco-extapi

de.faktorzehn.jco:jco-extapi

Contains general domain objects that are not specific to FS-CD. These building blocks are used throughout the FS-CD Adapter to represent SAP concepts in a type-safe manner.

fscd-adapter-extapi

de.faktorzehn.fscd-adapter:fscd-adapter-extapi

Contains the FS-CD Adapter’s domain model that domain services use in module fscd-adapter-business.

The domain objects also serve as Data Transfer Objects (DTOs) in the REST API of the fscd-adapter-extservices module.

See chapter Domain Model for details.

Use IntelliJ’s diagram tool to visualize the domain model relationships.
fscd-adapter-business

de.faktorzehn.fscd-adapter:fscd-adapter-business

Contains the FS-CD Adapter’s business logic encapsulated in service interfaces and their JCo-based implementations.

Service Interfaces:

  • FscdAccountBalanceService / JcoAccountBalanceService

  • FscdDocumentService / JcoDocumentService

  • FscdDunningInfoService / JcoDunningInfoService

  • FscdPostingService / JcoPostingService

  • FscdInsuranceObjectService / JcoInsuranceObjectService

  • FscdBusinessLockService / JcoBusinessLockService

  • FscdSepaMandateService / JcoSepaMandateService

  • FscdChangePolicyholderService / JcoChangePolicyholderService

Each service provides operations that internally execute SAP RFC calls and handle error conditions.

fscd-adapter-extservices

de.faktorzehn.fscd-adapter:fscd-adapter-extservices

Implements the REST API with Spring Web in class FscdAdapterRestController.

For details, see the REST API section.

fscd-adapter-extapi-client

de.faktorzehn.fscd-adapter:fscd-adapter-extapi-client

Provides FscdAdapterClient, a Java client for the FS-CD Adapter’s REST API. See chapter REST API Client for details.

fscd-adapter-web

de.faktorzehn.fscd-adapter:fscd-adapter-web

Contains UI components for the web interface implemented using Linkki and Vaadin. See chapter Web Application for details.

Supporting Modules

fscd-adapter-autoconfigure

de.faktorzehn.fscd-adapter:fscd-adapter-autoconfigure

Spring Boot AutoConfiguration module that automatically configures the FS-CD Adapter application with sensible defaults based on the application’s classpath and configuration properties.

Provides auto-configuration for:

  • Faktor Zehn JCo Library and SAP Java Connector

  • Domain services

  • REST API client

All auto-configuration beans are annotated with @ConditionalOnMissingBean to allow them to be overridden by custom bean definitions.

See chapter AutoConfiguration Properties for details.

fscd-adapter-account-infotool

de.faktorzehn.fscd-adapter:fscd-adapter-account-infotool

Provides a Linkki InfoTool that can be used to display FS-CD account information in a Linkki web application, e.g., an IPM web application.

See Account Info Tool for details.

Reference Implementation Modules

Additionally, the FS-CD Adapter provides a separate multi-module Maven project named fscd-adapter-sample containing the reference implementation of the integration layer and the module bundling the application. These modules are delivered to projects as source code, because the event-driven processing logic is highly project-dependent demanding customizations that are best made through direct source code changes.

For details, see chapter Integration Layer.