git clone https://github.com/vardan10/loan-Application-Cordapp.git
cd loan-Application-Cordapp
./gradlew deployNodes
- building may take upto a minute (it's much quicker if you already have the Corda binaries)../build/nodes/runnodes
- In a new terminal - run partyA API Server
./gradlew runPartyAServer
- In a new terminal - run partyB API Server
./gradlew runPartyBServer
- In a new terminal - run partyC API Server
./gradlew runPartyCServer
At this point you will have a notary node running as well as three other nodes. The nodes take about 20-30 seconds to finish booting up.There should be 4 console windows in total. (Plus 3 terminal for API)
- Start the Loan Application In PartyA Console type:
start LoanRequestFlow name: "Prasanna", amount: 30000, panCardNo: "FLFPK1672D", bank: "PartyB"
- Get Linear Id of Loan Application InParty B console type:
run vaultQuery contractStateType: com.template.State.LoanState
- Send loan application to credit rating Agency InParty B console type:
start verifyCheckEligibilityFlow loanID: "<LOAN_LINEAR_ID>", creditRatingAgency: "PartyC"
- Get Linear Id of Loan Eligibility InParty B console type:
run vaultQuery contractStateType: com.template.State.EligibilityState
- Create a CIBIL Rating InParty C console type:
start verifyEligibilityApprovalFlow eligibilityID: "<ELIGIBILITY_LINEAR_ID>"
- Approve/Reject Loan Application InParty B console type:
start verifyLoanApprovalFlow eligibilityID: "<ELIGIBILITY_LINEAR_ID>", loanstatus: true
- Start the Loan Application
curl -X POST \
http://localhost:8080/loan/LoanRequest \
-F panCardNo=FLFPK1672D \
-F name=Vardan \
-F amount=40000 \
-F bank=PartyB
- Get Linear Id of Loan Application
curl -X GET http://localhost:8080/loan/GetLoans
- Send loan application to credit rating Agency
curl -X POST \
http://localhost:8081/eligibility/CheckEligibility \
-F loanID=<LOAN_LINEAR_ID> \
-F creditRatingAgency=PartyC
- Get Linear Id of Loan Eligibility
curl -X GET http://localhost:8081/eligibility/GetEligibilities
- Create a CIBIL Rating InParty C console type:
curl -X POST \
http://localhost:8082/eligibility/VerifyEligibility \
-F eligibilityID=<ELIGIBILITY_LINEAR_ID>
- Approve/Reject Loan Application InParty B console type:
curl -X POST \
http://localhost:8081/loan/LoanApproval \
-F eligibilityID=<ELIGIBILITY_LINEAR_ID> \
-F loanstatus=true
- Get Approved Loans InParty A console type:
curl -X GET http://localhost:8080/loan/GetApprovedLoans