Package io.dapr.workflows.runtime
Class DefaultWorkflowActivityContext
java.lang.Object
io.dapr.workflows.runtime.DefaultWorkflowActivityContext
- All Implemented Interfaces:
WorkflowActivityContext
Wrapper for Durable Task Framework
TaskActivityContext.-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for WorkflowActivityContext.DefaultWorkflowActivityContext(TaskActivityContext context, Class<?> clazz) Constructor for WorkflowActivityContext.DefaultWorkflowActivityContext(TaskActivityContext context, org.slf4j.Logger logger) Constructor for WorkflowActivityContext. -
Method Summary
Modifier and TypeMethodDescription<T> TGets the input of the current activity.org.slf4j.LoggerGets the logger for the current activity.getName()Gets the name of the current activity.
-
Constructor Details
-
DefaultWorkflowActivityContext
Constructor for WorkflowActivityContext.- Parameters:
context- TaskActivityContext- Throws:
IllegalArgumentException- if context is null
-
DefaultWorkflowActivityContext
public DefaultWorkflowActivityContext(TaskActivityContext context, Class<?> clazz) throws IllegalArgumentException Constructor for WorkflowActivityContext.- Parameters:
context- TaskActivityContextclazz- Class to use for logger- Throws:
IllegalArgumentException- if context is null
-
DefaultWorkflowActivityContext
public DefaultWorkflowActivityContext(TaskActivityContext context, org.slf4j.Logger logger) throws IllegalArgumentException Constructor for WorkflowActivityContext.- Parameters:
context- TaskActivityContextlogger- org.slf4j.Logger instance- Throws:
IllegalArgumentException- if context is null
-
-
Method Details
-
getLogger
public org.slf4j.Logger getLogger()Gets the logger for the current activity.- Specified by:
getLoggerin interfaceWorkflowActivityContext- Returns:
- the logger for the current activity
-
getName
Gets the name of the current activity.- Specified by:
getNamein interfaceWorkflowActivityContext- Returns:
- the name of the current activity
-
getInput
Gets the input of the current activity.- Specified by:
getInputin interfaceWorkflowActivityContext- Type Parameters:
T- the type of the input- Parameters:
targetType- targetType of the input- Returns:
- the input of the current activity
-
getTraceParent
- Specified by:
getTraceParentin interfaceWorkflowActivityContext
-
getTaskExecutionId
- Specified by:
getTaskExecutionIdin interfaceWorkflowActivityContext
-