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

fix: IoNotification will receive the map of the iuds correctly synchr… #120

Merged
merged 1 commit into from
Feb 12, 2025
Merged
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
Expand Up @@ -3,6 +3,9 @@
import io.temporal.activity.ActivityInterface;
import io.temporal.activity.ActivityMethod;
import it.gov.pagopa.pu.debtposition.dto.generated.DebtPositionDTO;
import it.gov.pagopa.pu.debtposition.dto.generated.IupdSyncStatusUpdateDTO;

import java.util.Map;


/**
Expand All @@ -15,10 +18,11 @@ public interface SendDebtPositionIONotificationActivity {
/**
* Sends a notification message for the specified debt position to the IO Notification service.
*
* @param debtPosition the {@link DebtPositionDTO} containing the details of the debt position to be notified.
* @param requestedDebtPosition the {@link DebtPositionDTO} containing the details of the debt position to be notified (as given to the WF).
* @param iupdSyncStatusUpdateDTOMap the map of the correctly synchronized IUD
*/
@ActivityMethod
void sendMessage(DebtPositionDTO debtPosition);
void sendMessage(DebtPositionDTO requestedDebtPosition, Map<String, IupdSyncStatusUpdateDTO> iupdSyncStatusUpdateDTOMap);
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

import it.gov.pagopa.payhub.activities.connector.ionotification.IONotificationService;
import it.gov.pagopa.pu.debtposition.dto.generated.DebtPositionDTO;
import it.gov.pagopa.pu.debtposition.dto.generated.IupdSyncStatusUpdateDTO;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.Lazy;
import org.springframework.stereotype.Service;

import java.util.Map;

@Lazy
@Service
@Slf4j
Expand All @@ -18,7 +21,7 @@ public SendDebtPositionIONotificationActivityImpl(IONotificationService ioNotifi
}

@Override
public void sendMessage(DebtPositionDTO debtPosition) {
public void sendMessage(DebtPositionDTO debtPosition, Map<String, IupdSyncStatusUpdateDTO> iupdSyncStatusUpdateDTOMap) {
log.info("Sending message to IONotification for debt position type org id {}", debtPosition.getDebtPositionTypeOrgId());
ioNotificationService.sendMessage(debtPosition);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ void givenSendMessageThenSuccess(){
DebtPositionDTO debtPosition = buildDebtPositionDTO();

// When
activity.sendMessage(debtPosition);
activity.sendMessage(debtPosition, null);

// Then
Mockito.verify(ioNotificationServiceMock, Mockito.times(1))
Expand Down
Loading