diff --git a/src/main/java/org/opensearch/flowframework/workflow/WorkflowData.java b/src/main/java/org/opensearch/flowframework/workflow/WorkflowData.java new file mode 100644 index 000000000..3e8dc81b2 --- /dev/null +++ b/src/main/java/org/opensearch/flowframework/workflow/WorkflowData.java @@ -0,0 +1,14 @@ +/* + * Copyright OpenSearch Contributors + * SPDX-License-Identifier: Apache-2.0 + * + * The OpenSearch Contributors require contributions made to + * this file be licensed under the Apache-2.0 license or a + * compatible open source license. + */ +package org.opensearch.flowframework.workflow; + +/** + * Interface for handling the input/output of the building blocks. + */ +public interface WorkflowData {} diff --git a/src/main/java/org/opensearch/flowframework/workflow/Workflow.java b/src/main/java/org/opensearch/flowframework/workflow/WorkflowStep.java similarity index 64% rename from src/main/java/org/opensearch/flowframework/workflow/Workflow.java rename to src/main/java/org/opensearch/flowframework/workflow/WorkflowStep.java index 634877bec..6a65ce6e3 100644 --- a/src/main/java/org/opensearch/flowframework/workflow/Workflow.java +++ b/src/main/java/org/opensearch/flowframework/workflow/WorkflowStep.java @@ -8,19 +8,26 @@ */ package org.opensearch.flowframework.workflow; +import org.opensearch.common.Nullable; + import java.util.concurrent.CompletableFuture; /** * Interface for the workflow setup of different building blocks. */ -public interface Workflow { +public interface WorkflowStep { /** * Triggers the processing of the building block. - * + * @param data for input/output params of the building blocks. * @return CompletableFuture of the building block. - * @throws Exception if execution fails */ - CompletableFuture execute() throws Exception; + CompletableFuture execute(@Nullable WorkflowData data); + + /** + * + * @return the name of this workflow step. + */ + String getName(); }