Skip to content
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

[FEAT] Fineract Integration #7

Merged

Conversation

SubhamPramanik
Copy link
Contributor

This PR consists of:

  • Updated BPMN diagram
  • Refactored code for Fineract Integration
  • Channel DTO transformation

@@ -0,0 +1,190 @@
<?xml version="1.0" encoding="UTF-8"?>
Copy link

Choose a reason for hiding this comment

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

if this is not a test rename the file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is a test BPMN

Copy link

@fynmanoj fynmanoj left a comment

Choose a reason for hiding this comment

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

merge all commit to single commit

@@ -30,6 +31,17 @@

</properties>

<repositories>
Copy link

Choose a reason for hiding this comment

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

is this repository necessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Might be important. It was put by DPC.

Copy link

Choose a reason for hiding this comment

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

why is this shown in your changes

@@ -39,27 +50,58 @@ public void configure() throws Exception {
logger.info("Access token: " + accessTokenStore.getAccessToken());
});

from("rest:GET:/deploy")
.to("direct:test-bpmn")
from("rest:POST:/account/{accountAction}")
Copy link

Choose a reason for hiding this comment

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

move these actions from the Health Check

Map<String, Object> variables = new HashMap<>();
variables.put("transactionId", generateUUID());
variables.put("channelRequest", exchange.getIn().getBody(String.class));
variables.put("tenantId", "tn05");
Copy link

Choose a reason for hiding this comment

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

do not hardcode tenantId

variables.put("transactionId", generateUUID());
variables.put("channelRequest", exchange.getIn().getBody(String.class));
variables.put("tenantId", "tn05");
zeebeProcessStarter.startZeebeWorkflow("fineract-test", variables);
Copy link

Choose a reason for hiding this comment

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

remove hardcode

variables.put("tenantId", "tn05");

@@ -51,10 +51,10 @@ public void setErrorParameters(List<ErrorParameter> errorParameters) {

@Override
public String toString() {
return "AccountStatusError{" +
return "ErrorDTO{" +
"errorCategory='" + errorCategory + '\'' +
Copy link

Choose a reason for hiding this comment

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

use StringBuilder

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is auto-generated by Intellij. How do you want it to be?

Copy link

Choose a reason for hiding this comment

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

if you dont find it useful or not using it anywhere remove it.. else rewrite the method with string builder to concatenate large number of strings

.setHeader("Content-Type", constant("application/json"))
.setBody(exchange -> exchange.getProperty(TRANSACTION_BODY))
.marshal().json(JsonLibrary.Jackson)
.toD(BaseURL + "/transactions" + "?bridgeEndpoint=true&throwExceptionOnFailure=false");
Copy link

Choose a reason for hiding this comment

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

remove hardcode ; also concat is unnecessary

Copy link
Contributor Author

Choose a reason for hiding this comment

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

So, the query part is for Camel to make the http call, it is not actually from GSMA API so I kept it separate.

Copy link

Choose a reason for hiding this comment

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

define it as a constant

@fynmanoj
Copy link

fynmanoj commented Jul 7, 2020

merge all the commits to single commit

refactor: balance comment

feat: basic implementation of transaction route

feat: transaction error handling and correlation mapping

feat: added checkAccountStatus worker and refactored account route

feat: account message publisher

dev: transfer workers

dev: transfer workers -  TBT

transaction failing, generic error

feat: end to end transaction on Zeebe

added bpmns

dev:common channel request DTO transform

fix: fixed transaction issues

changed deployment settings

refactor: removed hardcoded values

refactor: removed test APIs
@avikganguly01
Copy link
Owner

@SubhamPramanik - LGTM. Rebase and resolve conflicts please.

@avikganguly01 avikganguly01 merged commit 170cecf into avikganguly01:master Jul 17, 2020
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.

None yet

3 participants