mariiaKraievska commented on code in PR #3555:
URL: https://github.com/apache/fineract/pull/3555#discussion_r1386768487
##########
fineract-core/src/main/java/org/apache/fineract/batch/service/BatchApiServiceImpl.java:
##########
@@ -116,7 +116,7 @@ public List<BatchResponse>
handleBatchRequestsWithoutEnclosingTransaction(final
*/
@Override
public List<BatchResponse>
handleBatchRequestsWithEnclosingTransaction(final List<BatchRequest>
requestList, final UriInfo uriInfo) {
- return callInTransaction(Function.identity()::apply, () ->
handleBatchRequests(true, requestList, uriInfo));
+ return callInTransaction(Function.identity()::apply, () ->
handleBatchRequests(true, requestList, uriInfo), true);
Review Comment:
I did this so that when calling the withoutEnclosingTransaction method, the
'sameTransaction' flag in the executeCommand method of the
SynchronousCommandProcessingService was false and then
saveInitialNewTransaction was called, because this guarantees that unsuccessful
sub-requests are recorded in the trail audit logs. As for the use-case `when
the parent request fails then all the child requests should also fail, in
method parentRequestFailedRecursive we should mark the child transactions to be
rolled back`, after my changes nothing seems to be broken. I tested it again
today.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]