Skip to content

Commit 8a4d0d1

Browse files
mcruzdevCopilot
andauthored
Update experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 11c1e69 commit 8a4d0d1

1 file changed

Lines changed: 9 additions & 10 deletions

File tree

  • experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl

experimental/fluent/func/src/main/java/io/serverlessworkflow/fluent/func/dsl/FuncDSL.java

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1351,27 +1351,26 @@ public static <T> T input(WorkflowContextData context, Class<T> inputClass) {
13511351
}
13521352

13531353
/**
1354-
* Extracts and deserializes the workflow input data into the specified type from a task context.
1354+
* Extracts and deserializes the task input data into the specified type from a task context.
13551355
*
1356-
* <p>This utility method provides type-safe access to the workflow's initial input.
1356+
* <p>This utility method provides type-safe access to a task's input.
13571357
*
1358-
* <p>Use this method when you only have access to the {@link TaskContextData} but need to
1359-
* retrieve the original workflow input (not the task's input). This is useful when a task needs
1360-
* to reference the initial workflow input data.
1358+
* <p>Use this method when you have access to the {@link TaskContextData} and need to retrieve
1359+
* the input provided to that task.
13611360
*
13621361
* <p><b>Usage Example:</b>
13631362
*
13641363
* <pre>{@code
13651364
* inputFrom((Object obj, TaskContextData taskContextData) -> {
1366-
* OrderRequest order = taskInput(taskContextData, OrderRequest.class);
1367-
* return new Input(order);
1368-
* }
1365+
* OrderRequest order = input(taskContextData, OrderRequest.class);
1366+
* return order;
1367+
* });
13691368
* }</pre>
13701369
*
13711370
* @param <T> the type to deserialize the input into
1372-
* @param taskContextData the task context from which to retrieve the workflow input
1371+
* @param taskContextData the task context from which to retrieve the task input
13731372
* @param inputClass the class object representing the target type for deserialization
1374-
* @return the deserialized workflow input object of type T
1373+
* @return the deserialized task input object of type T
13751374
*/
13761375
public static <T> T input(TaskContextData taskContextData, Class<T> inputClass) {
13771376
return taskContextData.input().as(inputClass).orElseThrow();

0 commit comments

Comments
 (0)