From 01e0decd0974ba114efbddf01e91803c1615b6fa Mon Sep 17 00:00:00 2001 From: manan164 <1897158+manan164@users.noreply.github.com> Date: Mon, 4 Dec 2023 15:09:51 +0530 Subject: [PATCH 1/3] Start workflow with idempotency --- .../core/execution/WorkflowExecutor.java | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java b/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java index 8e090f453f..60ebce0a65 100644 --- a/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java +++ b/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java @@ -2155,4 +2155,36 @@ public WorkflowModel jumpWorkflowExecutionToTask( public void upgradeRunningWorkflowToVersion( String workflowId, UpgradeWorkflowRequest upgradeWorkflowRequest) {} + + public String startWorkflow( + String name, + Integer version, + Map workflowInput, + String externalInputPayloadStoragePath, + String correlationId, + Integer priority, + String parentWorkflowId, + String parentWorkflowTaskId, + String event, + Map taskToDomain, + String createdBy, + String idempotencyKey, + IdempotencyStrategy idempotencyStrategy) { + return null; + } + + public String startWorkflow(WorkflowDef workflowDefinition, + Map workflowInput, + String externalInputPayloadStoragePath, + String correlationId, + Integer priority, + String parentWorkflowId, + String parentWorkflowTaskId, + String event, + Map taskToDomain, + String createdBy, + String idempotencyKey, + IdempotencyStrategy idempotencyStrategy) { + return null; + } } From 09d10c0cd4c3d2c6a4ef09d953bc92bfba22a280 Mon Sep 17 00:00:00 2001 From: manan164 <1897158+manan164@users.noreply.github.com> Date: Mon, 4 Dec 2023 18:36:00 +0530 Subject: [PATCH 2/3] spotless --- .../metadata/workflow/SubWorkflowParams.java | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/common/src/main/java/com/netflix/conductor/common/metadata/workflow/SubWorkflowParams.java b/common/src/main/java/com/netflix/conductor/common/metadata/workflow/SubWorkflowParams.java index 1006b37687..8c18156d7e 100644 --- a/common/src/main/java/com/netflix/conductor/common/metadata/workflow/SubWorkflowParams.java +++ b/common/src/main/java/com/netflix/conductor/common/metadata/workflow/SubWorkflowParams.java @@ -41,6 +41,26 @@ public class SubWorkflowParams { @ProtoField(id = 4) private Object workflowDefinition; + private String idempotencyKey; + + private IdempotencyStrategy idempotencyStrategy; + + public String getIdempotencyKey() { + return idempotencyKey; + } + + public void setIdempotencyKey(String idempotencyKey) { + this.idempotencyKey = idempotencyKey; + } + + public IdempotencyStrategy getIdempotencyStrategy() { + return idempotencyStrategy; + } + + public void setIdempotencyStrategy(IdempotencyStrategy idempotencyStrategy) { + this.idempotencyStrategy = idempotencyStrategy; + } + /** * @return the name */ From e80ac08bc88e5020cba4fc0ea8da1ce6b952c810 Mon Sep 17 00:00:00 2001 From: manan164 <1897158+manan164@users.noreply.github.com> Date: Mon, 4 Dec 2023 18:36:18 +0530 Subject: [PATCH 3/3] spotless --- .../core/execution/WorkflowExecutor.java | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java b/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java index 60ebce0a65..16d7668e56 100644 --- a/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java +++ b/core/src/main/java/com/netflix/conductor/core/execution/WorkflowExecutor.java @@ -2173,18 +2173,19 @@ public String startWorkflow( return null; } - public String startWorkflow(WorkflowDef workflowDefinition, - Map workflowInput, - String externalInputPayloadStoragePath, - String correlationId, - Integer priority, - String parentWorkflowId, - String parentWorkflowTaskId, - String event, - Map taskToDomain, - String createdBy, - String idempotencyKey, - IdempotencyStrategy idempotencyStrategy) { + public String startWorkflow( + WorkflowDef workflowDefinition, + Map workflowInput, + String externalInputPayloadStoragePath, + String correlationId, + Integer priority, + String parentWorkflowId, + String parentWorkflowTaskId, + String event, + Map taskToDomain, + String createdBy, + String idempotencyKey, + IdempotencyStrategy idempotencyStrategy) { return null; } }