Skip to content

Commit d2680a7

Browse files
authored
Publishing Payee DfspId (#70)
1 parent ff7de69 commit d2680a7

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/main/java/org/mifos/processor/bulk/camel/processor/AccountLookupCallbackProcessor.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ public void process(Exchange exchange) throws Exception {
3939
variables.put(ACCOUNT_LOOKUP_FAILED, false);
4040
variables.put(PAYEE_PARTY_ID, accountLookupResponseDTO.getPaymentModalityList().get(0).getFinancialAddress());
4141
variables.put(PAYEE_PARTY_ID_TYPE, accountLookupResponseDTO.getPaymentModalityList().get(0).getPaymentModality());
42+
variables.put(PARTY_LOOKUP_FSP_ID, accountLookupResponseDTO.getPaymentModalityList().get(0).getBankingInstitutionCode());
4243
exchange.setProperty(CACHED_TRANSACTION_ID, accountLookupResponseDTO.getRequestId());
4344
}catch(IOException e){
4445
variables.put(ACCOUNT_LOOKUP_FAILED, true);

src/main/java/org/mifos/processor/bulk/zeebe/ZeebeVariables.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,5 +128,6 @@ private ZeebeVariables() {
128128
public static final String FILE_VALIDITY = "isFileValid";
129129

130130
public static final String NOTE = "note";
131+
public static final String PARTY_LOOKUP_FSP_ID = "partyLookupFspId";
131132

132133
}

src/main/java/org/mifos/processor/bulk/zeebe/worker/AccountLookupCallbackWorker.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,14 @@ public void setup(){
3838
PartyIdInfo partyIdInfo = new PartyIdInfo(transactionChannelRequestDTO.getPayee().getPartyIdInfo().getPartyIdType(), payeeId);
3939
Party payee =new Party(partyIdInfo);
4040
transactionChannelRequestDTO.setPayee(payee);
41-
existingVariables.put(CHANNEL_REQUEST, transactionChannelRequestDTO);
41+
existingVariables.put(CHANNEL_REQUEST, objectMapper.writeValueAsString(transactionChannelRequestDTO));
4242
client.newCompleteCommand(job.getKey())
4343
.variables(existingVariables)
4444
.send()
45+
.join()
4546
;
4647
})
47-
.name(String.valueOf(ACCOUNT_LOOKUP_CALLBACK))
48+
.name(ACCOUNT_LOOKUP_CALLBACK.getValue())
4849
.open();
4950
}
5051
}

0 commit comments

Comments
 (0)