# WorkflowActivityContext (dapr-sdk-parent 1.10.0 API)

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 Framework `TaskActivityContext`.

### Constructor Summary

Constructors
`WorkflowActivityContext​(com.microsoft.durabletask.TaskActivityContext context)` Constructor for WorkflowActivityContext.

### Method Summary

All Methods Instance Methods Concrete Methods
`<T> T` `getInput​(Class<T> targetType)` Gets the input of the current activity.
`String` `getName()` Gets the name of the current activity.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### 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 interface `com.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 interface `com.microsoft.durabletask.TaskActivityContext`
Type Parameters:
  `T` - the type of the input
Parameters:
  `targetType` - targetType of the input
Returns:
  the input of the current activity