Skip to content

Commit 96463f8

Browse files
GOV-255: Added configuration for programId/registeringInstituteId (#94)
* Added configuration for programId/registeringInstituteId * Added logic to support programId and registeringInstituteId header * Updated the config for n cross n mapping b/w registeringInstituteId and program * GOV-255.2 Publishing programName, payerIdentifierType and payerIdentifierValue as zeebe variable * Response code changed to 202
1 parent 733df2b commit 96463f8

3 files changed

Lines changed: 15 additions & 7 deletions

File tree

src/main/java/org/mifos/processor/bulk/camel/routes/ProcessorStartRoute.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,19 @@
3434
import static org.mifos.processor.bulk.zeebe.ZeebeVariables.PAYER_IDENTIFIER_TYPE;
3535
import static org.mifos.processor.bulk.zeebe.ZeebeVariables.PAYER_IDENTIFIER_VALUE;
3636
import static org.mifos.processor.bulk.zeebe.ZeebeVariables.NOTE;
37-
import java.io.*;
38-
import java.util.*;
37+
import java.io.BufferedReader;
38+
import java.io.File;
39+
import java.io.FileInputStream;
40+
import java.io.FileReader;
41+
import java.io.IOException;
42+
import java.io.InputStream;
43+
import java.io.InputStreamReader;
44+
import java.util.Arrays;
45+
import java.util.HashMap;
46+
import java.util.List;
47+
import java.util.Map;
48+
import java.util.UUID;
49+
import java.util.ArrayList;
3950
import com.fasterxml.jackson.core.JsonProcessingException;
4051
import org.apache.camel.Exchange;
4152
import org.apache.camel.LoggingLevel;
@@ -162,7 +173,6 @@ private void setup() {
162173
.setHeader("Content-Type", constant("application/json;charset=UTF-8"))
163174
.log("Completed route direct:validate-tenant");
164175

165-
166176
// this route is responsible for editing the incoming records based on configuration
167177
// this step is done to make sure the file format of CSV is not altered and only the data is updated based on config
168178
from("direct:update-incoming-data")
@@ -257,7 +267,7 @@ private void setup() {
257267

258268
String nm = fileTransferService.uploadFile(file, bucketName);
259269

260-
logger.info("File uploaded {}", nm);
270+
logger.debug("File uploaded {}", nm);
261271

262272
//extracting and setting callback Url
263273
String callbackUrl = exchange.getIn().getHeader("X-Callback-URL", String.class);
@@ -347,7 +357,7 @@ private void setup() {
347357
json.put("PollingPath", "/batch/Summary/" + exchange.getProperty(BATCH_ID));
348358
json.put("SuggestedCallbackSeconds", pollApiTimer);
349359
exchange.getIn().setBody(json.toString());
350-
360+
exchange.getIn().setHeader(Exchange.HTTP_RESPONSE_CODE, 202);
351361
});
352362

353363

src/main/java/org/mifos/processor/bulk/schema/Transaction.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package org.mifos.processor.bulk.schema;
22

3-
43
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
54
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
65
import com.fasterxml.jackson.annotation.JsonProperty;

src/main/resources/application.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ csv:
145145
columnNames: "id,request_id,payment_mode,payer_identifier_type,payer_identifier,payee_identifier_type,payee_identifier,amount,currency,note"
146146
size : 100000 # in bytes
147147

148-
149148
budget-account:
150149
registeringInstitutions:
151150
- id: "123"

0 commit comments

Comments
 (0)