diff --git a/core/src/main/java/com/netflix/conductor/service/WorkflowBulkService.java b/core/src/main/java/com/netflix/conductor/service/WorkflowBulkService.java index 3be0ffe89..a82a8d5f2 100644 --- a/core/src/main/java/com/netflix/conductor/service/WorkflowBulkService.java +++ b/core/src/main/java/com/netflix/conductor/service/WorkflowBulkService.java @@ -14,10 +14,10 @@ import java.util.List; -import com.netflix.conductor.model.WorkflowModel; import org.springframework.validation.annotation.Validated; import com.netflix.conductor.common.model.BulkResponse; +import com.netflix.conductor.model.WorkflowModel; import jakarta.validation.constraints.NotEmpty; import jakarta.validation.constraints.Size; diff --git a/core/src/main/java/com/netflix/conductor/service/WorkflowBulkServiceImpl.java b/core/src/main/java/com/netflix/conductor/service/WorkflowBulkServiceImpl.java index 715c77b4c..aadacf9a1 100644 --- a/core/src/main/java/com/netflix/conductor/service/WorkflowBulkServiceImpl.java +++ b/core/src/main/java/com/netflix/conductor/service/WorkflowBulkServiceImpl.java @@ -14,7 +14,6 @@ import java.util.List; -import com.netflix.conductor.model.WorkflowModel; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.stereotype.Service; @@ -23,6 +22,7 @@ import com.netflix.conductor.annotations.Trace; import com.netflix.conductor.common.model.BulkResponse; import com.netflix.conductor.core.execution.WorkflowExecutor; +import com.netflix.conductor.model.WorkflowModel; @Audit @Trace @@ -44,7 +44,7 @@ public WorkflowBulkServiceImpl( * * @param workflowIds - list of workflow Ids to perform pause operation on * @return bulk response object containing a list of succeeded workflows and a list of failed - * ones with errors + * ones with errors */ public BulkResponse pauseWorkflow(List workflowIds) { @@ -71,7 +71,7 @@ public BulkResponse pauseWorkflow(List workflowIds) { * * @param workflowIds - list of workflow Ids to perform resume operation on * @return bulk response object containing a list of succeeded workflows and a list of failed - * ones with errors + * ones with errors */ public BulkResponse resumeWorkflow(List workflowIds) { BulkResponse bulkResponse = new BulkResponse<>(); @@ -94,10 +94,10 @@ public BulkResponse resumeWorkflow(List workflowIds) { /** * Restart the list of workflows. * - * @param workflowIds - list of workflow Ids to perform restart operation on + * @param workflowIds - list of workflow Ids to perform restart operation on * @param useLatestDefinitions if true, use latest workflow and task definitions upon restart * @return bulk response object containing a list of succeeded workflows and a list of failed - * ones with errors + * ones with errors */ public BulkResponse restart(List workflowIds, boolean useLatestDefinitions) { BulkResponse bulkResponse = new BulkResponse<>(); @@ -122,7 +122,7 @@ public BulkResponse restart(List workflowIds, boolean useLatestD * * @param workflowIds - list of workflow Ids to perform retry operation on * @return bulk response object containing a list of succeeded workflows and a list of failed - * ones with errors + * ones with errors */ public BulkResponse retry(List workflowIds) { BulkResponse bulkResponse = new BulkResponse<>(); @@ -146,10 +146,10 @@ public BulkResponse retry(List workflowIds) { * Terminate workflows execution. * * @param workflowIds - list of workflow Ids to perform terminate operation on - * @param reason - description to be specified for the terminated workflow for future - * references. + * @param reason - description to be specified for the terminated workflow for future + * references. * @return bulk response object containing a list of succeeded workflows and a list of failed - * ones with errors + * ones with errors */ public BulkResponse terminate(List workflowIds, String reason) { BulkResponse bulkResponse = new BulkResponse<>(); @@ -172,7 +172,7 @@ public BulkResponse terminate(List workflowIds, String reason) { /** * Removes a list of workflows from the system. * - * @param workflowIds List of WorkflowIDs of the workflows you want to remove from system. + * @param workflowIds List of WorkflowIDs of the workflows you want to remove from system. * @param archiveWorkflow Archives the workflow and associated tasks instead of removing them. */ public BulkResponse deleteWorkflow(List workflowIds, boolean archiveWorkflow) { @@ -198,11 +198,11 @@ public BulkResponse deleteWorkflow(List workflowIds, boolean arc /** * Terminates execution for workflows in a list, then removes each workflow. * - * @param workflowIds List of workflow IDs to terminate and delete. - * @param reason Reason for terminating the workflow. + * @param workflowIds List of workflow IDs to terminate and delete. + * @param reason Reason for terminating the workflow. * @param archiveWorkflow Archives the workflow and associated tasks instead of removing them. * @return bulk response object containing a list of succeeded workflows and a list of failed - * ones with errors + * ones with errors */ public BulkResponse terminateRemove( List workflowIds, String reason, boolean archiveWorkflow) { @@ -238,16 +238,18 @@ public BulkResponse terminateRemove( /** * Fetch workflow details for given workflowIds. * - * @param workflowIds List of workflow IDs to terminate and delete. + * @param workflowIds List of workflow IDs to terminate and delete. * @param includeTasks includes tasks from workflow * @return bulk response object containing a list of workflow details */ @Override - public BulkResponse searchWorkflow(List workflowIds, boolean includeTasks) { + public BulkResponse searchWorkflow( + List workflowIds, boolean includeTasks) { BulkResponse bulkResponse = new BulkResponse<>(); for (String workflowId : workflowIds) { try { - WorkflowModel workflowModel = workflowExecutor.getWorkflow(workflowId, includeTasks); + WorkflowModel workflowModel = + workflowExecutor.getWorkflow(workflowId, includeTasks); bulkResponse.appendSuccessResponse(workflowModel); } catch (Exception e) { LOGGER.error( @@ -260,6 +262,4 @@ public BulkResponse searchWorkflow(List workflowIds, bool } return bulkResponse; } - - }