Class WorkflowSerializationContext

java.lang.Object
io.temporal.payload.context.WorkflowSerializationContext
All Implemented Interfaces:
HasWorkflowSerializationContext, SerializationContext

@Experimental public class WorkflowSerializationContext extends Object implements HasWorkflowSerializationContext
  • Constructor Details

    • WorkflowSerializationContext

      public WorkflowSerializationContext(@Nonnull String namespace, @Nonnull String workflowId)
  • Method Details

    • getNamespace

      @Nonnull public String getNamespace()
      Specified by:
      getNamespace in interface HasWorkflowSerializationContext
      Returns:
      namespace the workflow execution belongs to
    • getWorkflowId

      @Nonnull public String getWorkflowId()
      Specified by:
      getWorkflowId in interface HasWorkflowSerializationContext
      Returns:
      workflowId of the Workflow Execution the Serialization Target belongs to. If the Target is a Workflow itself, this method will return the Target's Workflow ID (not the ID of the parent workflow). Returns null for standalone activities (not associated with a workflow).

      WARNING: When used in the context of a schedule workflow the workflowId may differ on serialization and deserialization.