Package io.dapr.durabletask
Interface TaskActivityContext
public interface TaskActivityContext
Interface that provides
TaskActivity implementations with activity context, such as an activity's name and
its input.-
Method Summary
Modifier and TypeMethodDescription<T> TGets the deserialized activity input.getName()Gets the name of the current task activity.Gets the execution id of the current task activity.intGets the task id of the current task activity.Gets the trace parent id for the current workflow execution.
-
Method Details
-
getName
String getName()Gets the name of the current task activity.- Returns:
- the name of the current task activity
-
getInput
Gets the deserialized activity input.- Type Parameters:
T- the target type to deserialize the input into- Parameters:
targetType- theClassobject associated withT- Returns:
- the deserialized activity input value
-
getTaskExecutionId
String getTaskExecutionId()Gets the execution id of the current task activity.- Returns:
- the execution id of the current task activity
-
getTaskId
int getTaskId()Gets the task id of the current task activity.- Returns:
- the task id of the current task activity
-
getTraceParent
String getTraceParent()Gets the trace parent id for the current workflow execution.- Returns:
- trace parent id
-