camunda / camunda-bpm-platform

Flexible framework for workflow and decision automation with BPMN and DMN. Integration with Quarkus, Spring, Spring Boot, CDI.
https://camunda.com/
Apache License 2.0
4.11k stars 1.55k forks source link

Update deprecated Camunda subsystem code usages #3589

Closed danielkelemen closed 7 months ago

danielkelemen commented 1 year ago

Acceptance Criteria (Required on creation)

Hints

Out of scope

Links

Breakdown

### Pull requests
- [ ] https://github.com/camunda/camunda-bpm-platform/pull/4111
yanavasileva commented 1 year ago

Removing potential label as the ticket will not be tackled in 7.20

yanavasileva commented 1 year ago

When working on this please watch out for this issue: https://github.com/camunda/camunda-bpm-platform/issues/3584#issuecomment-1723338290 More input: https://github.com/camunda/camunda-bpm-platform/issues/3584#issuecomment-1727604281

yanavasileva commented 1 year ago

Thoughts on this task: We might need to consider not only moving away from deprecated API. But first check how subsystems are written these days and learn from it.

yanavasileva commented 8 months ago

when adjusting the code in ProcessApplicationStartService#start to register the process application service:

      MscManagedProcessApplication managedProcessApplication = new MscManagedProcessApplication(processApplicationInfo, processApplication.getReference());
      ServiceBuilder<?> serviceBuilder = context.getChildTarget().addService();
      serviceBuilder.provides(serviceName);
      serviceBuilder.setInstance(managedProcessApplication);
      serviceBuilder.install();

doesn't pass the name correctly and can't be use in the tracking service ServiceTracker#handleEvent.

When ServiceTarget#addService() API is used the service name (link) is not populated correctly so it ends up with a new value. That leads to the above error but also to failure when container.dumpServices(); (link) is used. Therefore, that seems as a potential bug in JBoss MSC API.

Decision: Use ServiceTarget#addService(serviceName) for the time being to ensure correct name resolving.