Spring-Boot-Starter project to integrate the ALW-System into DigiWF
Report Bug
·
Request Feature
The goal of this library is to enable async communication with the ALW System dispatched by an EventBus of your environment.
Features:
- Can be used to dispatch requests/responses of the ALW Personeninfo Feature asynchronously through an eventbus.
- Can inform the receiver through an eventbus if the request was successful or if there was a problem.
- Performs a functional ping to the ALW System to check connectivity.
The documentation project is built with technologies we use in our projects:
- Spring-Boot
- Spring-Cloud-Stream
- Apache Kafka
See the open issues for a full list of proposed features (and known issues).
Follow these steps to use the starter in your application:
- Use the spring initalizer and create a Spring Boot application with
Spring Web
dependencies https://start.spring.io - Add the digiwf-alw-integration-starter dependency.
With Maven:
<dependency>
<groupId>io.muenchendigital.digiwf</groupId>
<artifactId>digiwf-alw-integration-starter</artifactId>
<version>${digiwf.version}</version>
</dependency>
With Gradle:
implementation group: 'io.muenchendigital.digiwf', name: 'digiwf-alw-integration-starter', version: '${digiwf.version}'
- Add your preferred binder (see Spring Cloud Stream). In this example, we use kafka.
Maven:
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-stream-binder-kafka</artifactId>
</dependency>
Gradle:
implementation group: 'org.springframework.cloud', name: 'spring-cloud-stream-binder-kafka'
-
Configure your binder.
For an example on how to configure your binder, see DigiWF Spring Cloudstream Utils Note that you DO have to configurespring.cloud.function.definition=functionRouter;sendMessage;sendCorrelateMessage;
, but you don't need typeMappings. These are configured for you by the digiwf-alw-integration-starter. You also have to configure the topics you want to read / send messages from / to. -
Configure these items for your event bus:
spring.cloud.stream.bindings.sendMessage-out-0.destination: <YOUR CUSTOM REQUEST TOPIC>
spring.cloud.stream.bindings.sendCorrelateMessage-out-0.destination: <YOUR CUSTOM RESPONSE TOPIC>
spring.cloud.stream.bindings.functionRouter-in-0.group: <YOUR GROUP>
spring.cloud.stream.bindings.functionRouter-in-0.destination: <YOUR CUSTOM REQUEST TOPIC> # For a roundtrip use the same value as in "spring.cloud.stream.bindings.sendMessage-out-0.destination"
- Configure details of your ALW System:
digiwf.alw.personeninfo:
base-url: <YOUR ALW SYSTEM URL>
rest-endpoint: <YOUR PERSONENINFO ENDPOINT>
timeout: <YOUR CONNECTION TIMEOUT>
username: <YOUR BASIC AUTH USER>
password: <YOUR BASIC AUTH PASSWORD>
functional-ping:
enabled: true
azr-number: <YOUR SAMPLE AZR NUMBER>
- Define a map as a named resource bean (see BEAN_ALW_SACHBEARBEITUNG of SachbearbeitungMapperConfig ) to support mapping of the ALW System responses to directory-ous.
For an example, please refer to the example project. There you can:
- Configure the example application (see above)
- Start the example application
- Make a http request to the configured test endpoints from ExampleController on http://localhost:10006/testGetAlwZustaendigkeitEventBus
- Observe the output in the console
For a detailed documentation see docs
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please open an issue with the tag "enhancement", fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Open an issue with the tag "enhancement"
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
More about this in the CODE_OF_CONDUCT file.
Distributed under the MIT License. See LICENSE
file for more information.