Adding the ability to batch requests similar to the one at https://developers.facebook.com/docs/graph-api/making-multiple-requests/ would greatly improve the performance and ease of consumption of MifosX Api's in apps that require bulk processing, syncing of offline data etc
Some of the simplest use cases would involve
a) Disbursing Multiple JLG loans in a center on a given meeting day
b) A flexible collection sheet, where we could query for all loans that have a scheduled repayment on a particular day, update the actual repayments and post the data back to the platform
c) Batch operations like approving multiple checker requests at a time
Batching allows you to pass instructions for several operations in a single HTTP request.
The Batch API takes in an array of logical HTTP requests represented as JSON arrays - each request has a requestId (the id of a request used to specify the sequence and as a dependency between requests), a method (corresponding to HTTP method GET/PUT/POST/DELETE etc.), a relativeUrl (the portion of the URL after https://DomainName/api/v1), optional headers array (corresponding to HTTP headers) and an optional body (for POST and PUT requests).
The Batch API returns an array of logical HTTP responses represented as JSON arrays - each response has a requestId, a status code, an optional headers array and an optional body (which is a JSON encoded string).
- Batch API to process multiple http requests
- Update integration and unit tests
- Update documentation/javadoc
- Community App UI amendments for collection sheets based on Batch API
The workflow of an agent acting in the field will be used.
For the first step we should focus on the following use stories:
|1||Create Client||As an agent, I want to create a new client for an existing office.||Must Have|| |
|2||Update Client Information||As an agent, I want to update client specific information for an existing office.||Must Have|| |
|3||Apply Loan||As an agent, I want to apply a loan to an existing client.||Must Have|| |
|4||Apply Savings||As an agent, I want to apply a savings to an existing client.||Must Have|| |
|5||Collect Charges||As an agent, I want to collect client charges for a loan.||Must Have|| |
It should be feasible to implement all this by using existing commands. This solution will include dependency resolution, e.g. adding a new client and apply a new loan.