-
Notifications
You must be signed in to change notification settings - Fork 2.2k
FINERACT-2180: Trigger (internal) business event when new datatable entry was added #4394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
a82b7c4 to
74d4fec
Compare
|
|
||
| @Override | ||
| public Long getAggregateRootId() { | ||
| throw new UnsupportedOperationException("Unimplemented method 'getAggregateRootId'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the entity id as aggregateRootId here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Updated
|
|
||
| @Override | ||
| public Long getAggregateRootId() { | ||
| throw new UnsupportedOperationException("Unimplemented method 'getAggregateRootId'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the entity id as aggregateRootId here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Updated
|
|
||
| @Override | ||
| public Long getAggregateRootId() { | ||
| throw new UnsupportedOperationException("Unimplemented method 'getAggregateRootId'"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use the entity id as aggregateRootId here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Updated
...rc/main/java/org/apache/fineract/portfolio/client/service/ClientReadPlatformServiceImpl.java
Show resolved
Hide resolved
.../org/apache/fineract/infrastructure/dataqueries/service/ReadWriteNonCoreDataServiceImpl.java
Show resolved
Hide resolved
adamsaghy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kindly see my review!
74d4fec to
263a97c
Compare
| + whereValue; | ||
|
|
||
| this.jdbcTemplate.update(sql); // NOSONAR | ||
| final Map<String, String> dataParams = null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@adamsaghy @alberto-art3ch Do we need to fetch the data from the datatable that we are trying to delete and include it in the event?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well.. good question...but i think it is fine..since this way we can make sure the downstream systems are notified and they have some extra information.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Map change as requested
| private final EntityTables entityType; | ||
| private final Long entityId; | ||
| private final Long appTableId; | ||
| private final Map<String, String> data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should have Map<String, Object> type instead of Map<String, String>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done! Map change as requested
a2b8a9a to
dcffa3a
Compare
dcffa3a to
d90d20b
Compare
adamsaghy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Trigger business event (internal only) when new datatable entry was added to a loan. By default we dont need any listener to be implemented. This logic will make easier to implement custom logic in case a new datatable entry got created, updated or deleted.
FINERACT-2180
Checklist
Please make sure these boxes are checked before submitting your pull request - thanks!
Write the commit message as per https://github.com/apache/fineract/#pull-requests
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 coding conventions at https://cwiki.apache.org/confluence/display/FINERACT/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
Submission is not a "code dump". (Large changes can be made "in repository" via a branch. Ask on the developer mailing list for guidance, if required.)
FYI our guidelines for code reviews are at https://cwiki.apache.org/confluence/display/FINERACT/Code+Review+Guide.