Skip to content

Issue/594 websocket connection status in bpe status webservice - #595

Open
hhund wants to merge 9 commits into
developfrom
issue/594_Websocket_Connection_Status_in_BPE_Status_Webservice
Open

hhund wants to merge 9 commits into
developfrom
issue/594_Websocket_Connection_Status_in_BPE_Status_Webservice

Conversation

@hhund

@hhund hhund commented Oct 19, 2026 •

Copy link
Copy Markdown
Member
  • New health check abstraction with implementation for database connection check and websocket connection open check.

  • Breaking change: Renamed config parameters / environment variables. Needs to be mentioned in the release notes.

    • dev.dsf.bpe.fhir.task.subscription.search.parameter -> dev.dsf.bpe.fhir.subscription.task.search.parameter
    • dev.dsf.bpe.fhir.questionnaire.response.subscription.search.parameter -> dev.dsf.bpe.fhir.subscription.questionnaireresponse.search.parameter
    • dev.dsf.bpe.fhir.task.subscription.retry.max -> dev.dsf.bpe.fhir.subscription.retry.max
    • dev.dsf.bpe.fhir.task.subscription.retry.sleep -> dev.dsf.bpe.fhir.subscription.retry.sleep
  • Websocket connection open check can be disabled via config property: dev.dsf.bpe.fhir.subscription.health.check

  • Modified LocalFhirConnectorImpl to except an Executor (connectExecutor) as constructor parameter in order to reuse the (single thread) executor across websocket reconnects. The old implementation had a thread resource leak, creating new single thread pools every time the a websocket connection failed.

  • Moved checks from InitializingBean.afterPropertiesSet methods to constructors and removed InitializingBean implementation declarations where possible. Doing simple parameter checks in afterPropertiesSet was a bad design. Distance to parameter declaration too large and not usable for parameters that need to be accessed in the constructor.

  • Improved config parameter documentation.

closes #594

hhund added 5 commits October 19, 2026 16:39
- PostStartupConfig log message no reflects that only the process engine
JobExecutor is started and not the entire (already running) process
engine.
- Level of JettyServer ErrorHandler generateResponse log message reduced
from info to debug. Some 5xx status codes are not implementation errors.
This breaking change to the config parameters needs to be mentioned in
the release notes.
- New health check abstraction with implementation for database
connection check and websocket connection open check.
- Websocket connection open check can be disabled via config property.
- Modified LocalFhirConnectorImpl to except an Executor
(connectExecutor) as constructor parameter in order to reuse the (single
thread) executor for websocket reconnects. The old implementation had a
thread resource leak, creating new single thread pools every time the
websocket connection failed.
- Moved checks from InitializingBean.afterPropertiesSet methods to
constructors and removed InitializingBean implementation declarations
where possible.
- Removed some not needed class fields and related constructor
parameters.
- Refactored some thread executor related code.
- Added constructor parameter documentation (JavaDoc).
- Improved config parameter documentation.
- Changes to some tests to reflect removed InitializingBean
implementations.
@hhund hhund added this to the 2.2.0 milestone Oct 19, 2026
@hhund
hhund requested a review from schwzr October 19, 2026 21:36
@hhund hhund self-assigned this Oct 19, 2026
@hhund hhund linked an issue Oct 19, 2026 that may be closed by this pull request
hhund added 4 commits October 20, 2026 13:02
issue/594_Websocket_Connection_Status_in_BPE_Status_Webservice
issue/594_Websocket_Connection_Status_in_BPE_Status_Webservice
* @see ProcessPluginDefinition#getSpringConfigurations()
*/
public abstract class AbstractServiceDelegate implements JavaDelegate, InitializingBean
public abstract class AbstractServiceDelegate implements JavaDelegate

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of removing the afterPropertiesSet methods in the DSF. However, we might get some regression errors on APIv1 (maybe even APIv2), when PP devs used it in their PP? E.g., they might have an override on afterPropertiesSet with a super.afterPropertiesSet() call that might break with the new DSF version?

So we might only remove the method content, not the method itself, escpecially for classes in the PP API?

@Override
public boolean isConnected()
{
return connection != null && connection.isOpen();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This connection might not the the "current" connection. In https://github.com/datasharingframework/dsf/pull/595/changes#diff-a4798d4e0a1e2908c34ed52e0ec23c8ae8390ff344b37233c9b93fd5ffc558b3L96 we request a new connection attempt, but in

public void onOpen(Session session, EndpointConfig config)
we don't store it as a new connection. So we might restart the application through a healthcheck while it is healthy, just because we stored the old connection and not the updated one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include Websocket Connection Status in BPE Status Webservice

2 participants