Skip to content

FINERACT-2455: Add remaining wc loan business events - #6276

Open
Cocoa-Puffs wants to merge 1 commit into
apache:developfrom
openMF:FINERACT-2455-Add-wc-loan-business-events
Open

FINERACT-2455: Add remaining wc loan business events#6276
Cocoa-Puffs wants to merge 1 commit into
apache:developfrom
openMF:FINERACT-2455-Add-wc-loan-business-events

Conversation

@Cocoa-Puffs

Copy link
Copy Markdown
Contributor

Description

Describe the changes made and why they were made. (Ignore if these details are present on the associated Apache Fineract JIRA ticket.)

Checklist

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Write the commit message as per our guidelines
  • Acknowledge that we will not review PRs that are not passing the build ("green") - it is your responsibility to get a proposed PR to pass the build, not primarily the project's maintainers.
  • Create/update unit or integration tests for verifying the changes made.
  • Follow our coding conventions.
  • Add required Swagger annotation and update API documentation at fineract-provider/src/main/resources/static/legacy-docs/apiLive.htm with details of any API changes
  • This PR must not be a "code dump". Large changes can be made in a branch, with assistance. Ask for help on the developer mailing list.
  • If merging this PR resolves a JIRA issue, I will mark that issue as resolved and set "Fix Version/s" appropriately.

Your assigned reviewer(s) will follow our guidelines for code reviews.

@Cocoa-Puffs
Cocoa-Puffs force-pushed the FINERACT-2455-Add-wc-loan-business-events branch from a4a95af to 98bfd6c Compare August 17, 2026 11:25
@adamsaghy

Copy link
Copy Markdown
Contributor
fineract-1  | 2026-08-17T11:46:36.643878644Z 2026-08-17 11:46:36.643 - INFO 1  [        default] --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
fineract-1  | 2026-08-17T11:46:36.650023356Z 2026-08-17 11:46:36.649 - INFO 1  [        default] --- [           main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.
fineract-1  | 2026-08-17T11:46:36.667912130Z 2026-08-17 11:46:36.667 - INFO 1  [        default] --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
fineract-1  | 2026-08-17T11:46:36.689575892Z 2026-08-17 11:46:36.689 - INFO 1  [        default] --- [           main] .s.b.a.l.ConditionEvaluationReportLogger : 
fineract-1  | 2026-08-17T11:46:36.689598384Z 
fineract-1  | 2026-08-17T11:46:36.689602381Z Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
fineract-1  | 2026-08-17T11:46:36.710056259Z 2026-08-17 11:46:36.709 -ERROR 1  [        default] --- [           main] o.s.boot.SpringApplication               : Application run failed
fineract-1  | 2026-08-17T11:46:36.710076417Z 
fineract-1  | 2026-08-17T11:46:36.710116452Z org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'externalEventConfigurationValidationService' defined in URL [jar:file:/app/libs/fineract-core-1.16.0-SNAPSHOT.jar!/org/apache/fineract/infrastructure/event/external/service/ExternalEventConfigurationValidationService.class]: Configuration not found for external event WorkingCapitalLoanChargeAdjustmentBusinessEvent
fineract-1  | 2026-08-17T11:46:36.710121752Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1824)
fineract-1  | 2026-08-17T11:46:36.710125539Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:607)
fineract-1  | 2026-08-17T11:46:36.710128986Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:529)
fineract-1  | 2026-08-17T11:46:36.710132362Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:339)
fineract-1  | 2026-08-17T11:46:36.710135668Z 	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:373)
fineract-1  | 2026-08-17T11:46:36.710138874Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:337)
fineract-1  | 2026-08-17T11:46:36.710142050Z 	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
fineract-1  | 2026-08-17T11:46:36.710145216Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.instantiateSingleton(DefaultListableBeanFactory.java:1235)
fineract-1  | 2026-08-17T11:46:36.710148552Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingleton(DefaultListableBeanFactory.java:1201)
fineract-1  | 2026-08-17T11:46:36.710151889Z 	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:1130)
fineract-1  | 2026-08-17T11:46:36.710155275Z 	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:991)
fineract-1  | 2026-08-17T11:46:36.710165594Z 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:628)
fineract-1  | 2026-08-17T11:46:36.710169151Z 	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:146)
fineract-1  | 2026-08-17T11:46:36.710172457Z 	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752)
fineract-1  | 2026-08-17T11:46:36.710187515Z 	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:439)
fineract-1  | 2026-08-17T11:46:36.710190881Z 	at org.springframework.boot.SpringApplication.run(SpringApplication.java:318)
fineract-1  | 2026-08-17T11:46:36.710194067Z 	at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:149)
fineract-1  | 2026-08-17T11:46:36.710197314Z 	at org.apache.fineract.ServerApplication.main(ServerApplication.java:57)
fineract-1  | 2026-08-17T11:46:36.710200589Z Caused by: org.apache.fineract.infrastructure.event.external.exception.ExternalEventConfigurationNotFoundException: Configuration not found for external event WorkingCapitalLoanChargeAdjustmentBusinessEvent
fineract-1  | 2026-08-17T11:46:36.710204166Z 	at org.apache.fineract.infrastructure.event.external.service.ExternalEventConfigurationValidationService.validateEventConfigurationForIndividualTenant(ExternalEventConfigurationValidationService.java:83)
fineract-1  | 2026-08-17T11:46:36.710207763Z 	at org.apache.fineract.infrastructure.event.external.service.ExternalEventConfigurationValidationService.validateEventConfigurationForAllTenants(ExternalEventConfigurationValidationService.java:67)
fineract-1  | 2026-08-17T11:46:36.710211340Z 	at org.apache.fineract.infrastructure.event.external.service.ExternalEventConfigurationValidationService.afterPropertiesSet(ExternalEventConfigurationValidationService.java:57)
fineract-1  | 2026-08-17T11:46:36.710214947Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1871)
fineract-1  | 2026-08-17T11:46:36.710218393Z 	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1820)
fineract-1  | 2026-08-17T11:46:36.710221659Z 	... 17 common frames omitted
fineract-1  | 2026-08-17T11:46:36.710224665Z 

@Cocoa-Puffs
Cocoa-Puffs force-pushed the FINERACT-2455-Add-wc-loan-business-events branch 4 times, most recently from c4824bb to e98a115 Compare August 18, 2026 08:55
@Cocoa-Puffs
Cocoa-Puffs force-pushed the FINERACT-2455-Add-wc-loan-business-events branch from e98a115 to 13d0594 Compare August 19, 2026 10:55

@galovics galovics left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The Liquibase changeset shape itself is fine - new file, correct preConditions guard, matches the module's established pattern. The problem is scope collision and one migration-correctness issue.

1. This collides directly with #6300. Both PRs delete WorkingCapitalLoanChargeAdjustmentPreBusinessEvent and rename the Post event, on the same JIRA ticket - but they pick two different names for the successor (WorkingCapitalLoanChargeAdjustmentBusinessEvent here vs. WorkingCapitalLoanChargeAdjustmentTransactionBusinessEvent in #6300). Whichever lands second either conflicts outright or leaves a stale, unbacked config row plus a double rename visible to anyone consuming the event type externally. #6300's name is also the one that matches the local convention - every sibling in this package is WorkingCapitalLoan<X>TransactionBusinessEvent. Can you two sync on this and let one PR own the rename?

2. The migration loses the enabled flag for existing tenants. wcl-0070-1 does a plain INSERT for the renamed event with enabled=false, rather than an UPDATE that renames the row in place. Any tenant that had WorkingCapitalLoanChargeAdjustmentPostBusinessEvent turned on silently stops receiving it after upgrade, with no signal. #6300 handles the identical rename correctly with an in-place UPDATE ... WHERE type = '...Post...'. Please use that pattern here too.

Smaller: no test covers the one actual behavioral change in this PR (the rename) - the four new tests all cover events that already existed on develop before this PR. And the removal of the pre-event notification call isn't mentioned in the PR description, though I confirmed there's no registered listener for it so it's safe.

Recommendation: CHANGES_REQUESTED

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.

3 participants