Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
package org.mifos.connector.notification.sms.message;

import com.fasterxml.jackson.databind.ObjectMapper;
import io.camunda.zeebe.client.ZeebeClient;
import org.apache.camel.Exchange;
import org.apache.camel.LoggingLevel;
import org.apache.camel.builder.RouteBuilder;
import org.json.JSONArray;
import org.json.JSONObject;
import org.mifos.connector.notification.provider.config.ProviderConfig;
import org.mifos.connector.notification.zeebe.ZeebeVariables;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import org.mifos.connector.common.channel.dto.TransactionChannelCollectionRequestDTO;

import java.time.Duration;
import java.util.HashMap;
import java.util.Map;

import static org.mifos.connector.notification.camel.config.CamelProperties.*;
import static org.mifos.connector.notification.zeebe.ZeebeVariables.CALLBACK_MESSAGE;

@Component
public class SendMessageRoute extends RouteBuilder {
Expand All @@ -31,15 +22,6 @@ public class SendMessageRoute extends RouteBuilder {
@Autowired
private ProviderConfig providerConfig;

@Autowired
private ZeebeVariables zeebeVariables;

@Autowired
private ZeebeClient zeebeClient;

@Autowired
private ObjectMapper objectMapper;

@Value("${zeebe.client.ttl}")
private int timeToLive;

Expand All @@ -64,8 +46,6 @@ public class SendMessageRoute extends RouteBuilder {
@Value("${operationsconfig.tenantappvalue}")
private String tenantAppKeyValue;



@Override
public void configure() throws Exception {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,7 @@
package org.mifos.connector.notification.sms.utility;

import org.mifos.connector.common.channel.dto.TransactionChannelCollectionRequestDTO;
import org.mifos.connector.notification.sms.dto.MessageResponseDto;

public class NotificationUtility {


}

}


Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
package org.mifos.connector.notification.zeebe;

import com.fasterxml.jackson.databind.ObjectMapper;
import io.camunda.zeebe.client.ZeebeClient;

import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.ProducerTemplate;
import org.apache.camel.support.DefaultExchange;
import org.mifos.connector.common.channel.dto.TransactionChannelCollectionRequestDTO;
import org.mifos.connector.notification.sms.dto.MessageCreationDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -16,8 +14,6 @@
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import java.time.Duration;
import java.util.HashMap;
import java.util.Map;

import static org.mifos.connector.notification.camel.config.CamelProperties.*;
Expand All @@ -37,9 +33,6 @@ public class ZeebeWorkers {
@Autowired
private ZeebeClient zeebeClient;

@Autowired
private ObjectMapper objectMapper;

@Autowired
private MessageCreationDto messageCreationDto;

Expand Down Expand Up @@ -113,8 +106,7 @@ public void setupWorkers() {
.handler((client, job) -> {
logger.info("Job '{}' started from process '{}' with key {}", job.getType(), job.getBpmnProcessId(), job.getKey());
Map<String, Object> variables = job.getVariablesAsMap();
variables.put(CALLBACK_RETRY_COUNT, 1 + (Integer) variables.getOrDefault(CALLBACK_RETRY_COUNT, 0));
String transactionId = (String) variables.get(TRANSACTION_ID);
variables.put(CALLBACK_RETRY_COUNT, 1 + (Integer) variables.getOrDefault(CALLBACK_RETRY_COUNT, 0));
Exchange exchange = new DefaultExchange(camelContext);
exchange.setProperty(INTERNAL_ID,variables.get(MESSAGE_INTERNAL_ID));
exchange.setProperty(CORRELATION_ID, variables.get(TRANSACTION_ID));
Expand Down