generated from pagopa/pagopa-functions-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[SELC-5642] feat: added new workflow executor for GPU
- Loading branch information
1 parent
9f28bec
commit 17ad2d2
Showing
5 changed files
with
122 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
...s/src/main/java/it/pagopa/selfcare/onboarding/workflow/WorkflowExecutorForApproveGpu.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package it.pagopa.selfcare.onboarding.workflow; | ||
|
||
import static it.pagopa.selfcare.onboarding.functions.utils.ActivityName.*; | ||
import static it.pagopa.selfcare.onboarding.utils.Utils.getOnboardingString; | ||
|
||
import com.fasterxml.jackson.databind.ObjectMapper; | ||
import com.microsoft.durabletask.TaskOptions; | ||
import com.microsoft.durabletask.TaskOrchestrationContext; | ||
import it.pagopa.selfcare.onboarding.common.OnboardingStatus; | ||
import it.pagopa.selfcare.onboarding.entity.OnboardingWorkflow; | ||
import java.util.Optional; | ||
|
||
public class WorkflowExecutorForApproveGpu extends WorkflowExecutorForApprove { | ||
|
||
public WorkflowExecutorForApproveGpu(ObjectMapper objectMapper, TaskOptions optionsRetry) { | ||
super(objectMapper, optionsRetry); | ||
} | ||
|
||
@Override | ||
public Optional<OnboardingStatus> executeRequestState(TaskOrchestrationContext ctx, OnboardingWorkflow onboardingWorkflow) { | ||
String onboardingString = getOnboardingString(super.objectMapper(), onboardingWorkflow.getOnboarding()); | ||
ctx.callSubOrchestrator(BUILD_ATTACHMENTS_SAVE_TOKENS_ACTIVITY, onboardingString, String.class); | ||
ctx.callActivity(SEND_MAIL_ONBOARDING_APPROVE_ACTIVITY, onboardingString, super.optionsRetry(), String.class).await(); | ||
return Optional.of(OnboardingStatus.TOBEVALIDATED); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters