Class 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 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