Package io.dapr.workflows.runtime
Class WorkflowActivityContext
- java.lang.Object
-
- io.dapr.workflows.runtime.WorkflowActivityContext
-
- All Implemented Interfaces:
com.microsoft.durabletask.TaskActivityContext
public class WorkflowActivityContext extends Object implements com.microsoft.durabletask.TaskActivityContext
Wrapper for Durable Task FrameworkTaskActivityContext
.
-
-
Constructor Summary
Constructors Constructor Description WorkflowActivityContext(com.microsoft.durabletask.TaskActivityContext context)
Constructor for WorkflowActivityContext.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
getInput(Class<T> targetType)
Gets the input of the current activity.String
getName()
Gets the name of the current activity.
-
-
-
Constructor Detail
-
WorkflowActivityContext
public WorkflowActivityContext(com.microsoft.durabletask.TaskActivityContext context) throws IllegalArgumentException
Constructor for WorkflowActivityContext.- Parameters:
context
- TaskActivityContext- Throws:
IllegalArgumentException
- if context is null
-
-
Method Detail
-
getName
public String getName()
Gets the name of the current activity.- Specified by:
getName
in interfacecom.microsoft.durabletask.TaskActivityContext
- Returns:
- the name of the current activity
-
getInput
public <T> T getInput(Class<T> targetType)
Gets the input of the current activity.- Specified by:
getInput
in interfacecom.microsoft.durabletask.TaskActivityContext
- Type Parameters:
T
- the type of the input- Parameters:
targetType
- targetType of the input- Returns:
- the input of the current activity
-
-