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

feat: P4ADEV-1421-fdr-create-temporal-activity #19

Merged
merged 14 commits into from
Nov 22, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
14 commits
Select commit Hold shift + click to select a range
482dc18
feat: P4ADEV-1421-fdr-create-temporal-activity added FdR WF activitie…
marcomatteuccieng Nov 22, 2024
948bbe9
feat: P4ADEV-1421-fdr-create-temporal-activity added FdR WF activitie…
marcomatteuccieng Nov 22, 2024
f5b40db
Update src/main/java/it/gov/pagopa/payhub/activities/activity/fdr/FdR…
marcomatteuccieng Nov 22, 2024
6de9402
Update src/main/java/it/gov/pagopa/payhub/activities/activity/fdr/FdR…
marcomatteuccieng Nov 22, 2024
c37b509
Update src/main/java/it/gov/pagopa/payhub/activities/activity/fdr/FdR…
marcomatteuccieng Nov 22, 2024
1217bef
Update src/main/java/it/gov/pagopa/payhub/activities/activity/fdr/Sen…
marcomatteuccieng Nov 22, 2024
c4cf648
Update src/main/java/it/gov/pagopa/payhub/activities/activity/fdr/Upd…
marcomatteuccieng Nov 22, 2024
d737888
Update src/main/java/it/gov/pagopa/payhub/activities/activity/fdr/Upd…
marcomatteuccieng Nov 22, 2024
e79da5b
Update src/main/java/it/gov/pagopa/payhub/activities/dto/fdr/FdRInges…
marcomatteuccieng Nov 22, 2024
aa6d8d7
Update src/main/java/it/gov/pagopa/payhub/activities/dto/fdr/FdRInges…
marcomatteuccieng Nov 22, 2024
44b7e37
Update src/main/java/it/gov/pagopa/payhub/activities/dto/fdr/FdRInges…
marcomatteuccieng Nov 22, 2024
69ed5ae
feat:P4ADEV-1421-fdr-create-temporal-activity added FdR WF activities…
marcomatteuccieng Nov 22, 2024
1426422
Update src/main/java/it/gov/pagopa/payhub/activities/activity/fdr/Sen…
marcomatteuccieng Nov 22, 2024
87c697e
feat:P4ADEV-1421-fdr-create-temporal-activity added FdR WF activities…
marcomatteuccieng Nov 22, 2024
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
2 changes: 2 additions & 0 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ dependencies {

implementation("com.fasterxml.jackson.module:jackson-module-parameter-names:$jacksonModuleVersion")

// Temporal.io
implementation ("io.temporal:temporal-sdk:1.19.0")
marcomatteuccieng marked this conversation as resolved.
Show resolved Hide resolved
// Testing
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.junit.jupiter:junit-jupiter-api")
Expand Down
25 changes: 25 additions & 0 deletions gradle.lockfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,42 @@ com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.17.2=compileClasspath
com.fasterxml.jackson.module:jackson-module-parameter-names:2.18.1=compileClasspath
com.fasterxml.jackson:jackson-bom:2.18.1=compileClasspath
com.fasterxml:classmate:1.7.0=compileClasspath
com.google.api.grpc:proto-google-common-protos:2.9.0=compileClasspath
com.google.code.findbugs:jsr305:3.0.2=compileClasspath
com.google.code.gson:gson:2.10.1=compileClasspath
com.google.errorprone:error_prone_annotations:2.14.0=compileClasspath
com.google.guava:failureaccess:1.0.1=compileClasspath
com.google.guava:guava:31.1-jre=compileClasspath
com.google.guava:listenablefuture:9999.0-empty-to-avoid-conflict-with-guava=compileClasspath
com.google.j2objc:j2objc-annotations:1.3=compileClasspath
com.google.protobuf:protobuf-java-util:3.22.0=compileClasspath
com.google.protobuf:protobuf-java:3.21.7=compileClasspath
com.uber.m3:tally-core:0.13.0=compileClasspath
commons-codec:commons-codec:1.16.1=compileClasspath
commons-io:commons-io:2.16.1=compileClasspath
io.grpc:grpc-api:1.53.0=compileClasspath
io.grpc:grpc-bom:1.53.0=compileClasspath
io.grpc:grpc-context:1.53.0=compileClasspath
io.grpc:grpc-core:1.53.0=compileClasspath
io.grpc:grpc-netty-shaded:1.53.0=compileClasspath
io.grpc:grpc-protobuf-lite:1.53.0=compileClasspath
io.grpc:grpc-protobuf:1.53.0=compileClasspath
io.grpc:grpc-services:1.53.0=compileClasspath
io.grpc:grpc-stub:1.53.0=compileClasspath
io.micrometer:micrometer-bom:1.9.9=compileClasspath
io.micrometer:micrometer-commons:1.13.6=compileClasspath
io.micrometer:micrometer-core:1.13.6=compileClasspath
io.micrometer:micrometer-observation:1.13.6=compileClasspath
io.temporal:temporal-sdk:1.19.0=compileClasspath
io.temporal:temporal-serviceclient:1.19.0=compileClasspath
jakarta.annotation:jakarta.annotation-api:2.1.1=compileClasspath
jakarta.validation:jakarta.validation-api:3.0.2=compileClasspath
org.apache.commons:commons-compress:1.27.1=compileClasspath
org.apache.commons:commons-lang3:3.17.0=compileClasspath
org.apache.commons:commons-text:1.12.0=compileClasspath
org.apache.logging.log4j:log4j-api:2.23.1=compileClasspath
org.apache.logging.log4j:log4j-to-slf4j:2.23.1=compileClasspath
org.checkerframework:checker-qual:3.12.0=compileClasspath
org.codehaus.janino:commons-compiler:3.1.12=compileClasspath
org.codehaus.janino:janino:3.1.12=compileClasspath
org.hibernate.validator:hibernate-validator:8.0.1.Final=compileClasspath
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package it.gov.pagopa.payhub.activities.activity.fdr;

import io.temporal.activity.ActivityInterface;
import io.temporal.activity.ActivityMethod;
import it.gov.pagopa.payhub.activities.dto.fdr.FdRIngestionResponse;
import it.gov.pagopa.payhub.activities.dto.fdr.FdRIngestionResponse;

/**
* Interface for the FdRIngestionActivity.
* Defines methods for processing files based on an ID.
marcomatteuccieng marked this conversation as resolved.
Show resolved Hide resolved
*/
@ActivityInterface
public interface FdRIngestionActivity {

/**
* Processes a file based on the provided ID.
*
* @param fileId the unique identifier of the file to process.
* @return {@link FdRIngestionResponse} containing the list of IUFs and status.
marcomatteuccieng marked this conversation as resolved.
Show resolved Hide resolved
*/
@ActivityMethod
FdRIngestionResponse processFile(String fileId);
marcomatteuccieng marked this conversation as resolved.
Show resolved Hide resolved
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package it.gov.pagopa.payhub.activities.activity.fdr;

import io.temporal.activity.ActivityInterface;
import io.temporal.activity.ActivityMethod;

/**
* Interface for SendEmailIngestionFlowActivity.
* Sends an email based on the status of a processed file identified by its ID.
marcomatteuccieng marked this conversation as resolved.
Show resolved Hide resolved
*/
@ActivityInterface
public interface SendEmailIngestionFlowActivity {

/**
* Sends an email based on the process result of the given file ID.
*
* @param fileId the unique identifier of the imported file.
* @param success true if the process succeeded, false otherwise.
* @return true if the email was sent successfully, false otherwise.
*/
@ActivityMethod
boolean sendEmail(String fileId, boolean success);
marcomatteuccieng marked this conversation as resolved.
Show resolved Hide resolved
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package it.gov.pagopa.payhub.activities.activity.fdr;

import io.temporal.activity.ActivityInterface;
import io.temporal.activity.ActivityMethod;

/**
* Interface for the UpdateIngestionFlowStatusActivity.
* Updates the status of a database row identified by the provided ID.
marcomatteuccieng marked this conversation as resolved.
Show resolved Hide resolved
*/
@ActivityInterface
public interface UpdateIngestionFlowStatusActivity {

/**
* Updates the status of the row corresponding to the given ID.
*
* @param id the unique identifier of the row to update.
* @param newStatus the new status to set.
* @return true if the update was successful, false otherwise.
*/
@ActivityMethod
boolean updateStatus(String id, String newStatus);
marcomatteuccieng marked this conversation as resolved.
Show resolved Hide resolved
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package it.gov.pagopa.payhub.activities.dto.fdr;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
* DTO for the FdRIngestionResponse, representing the result of file processing.
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class FdRIngestionResponse {
marcomatteuccieng marked this conversation as resolved.
Show resolved Hide resolved
private List<String> iufList; // List of extracted IUFs
marcomatteuccieng marked this conversation as resolved.
Show resolved Hide resolved
private boolean success; // Success flag for the operation
marcomatteuccieng marked this conversation as resolved.
Show resolved Hide resolved
}
Loading