Class OperationTokenUtil
java.lang.Object
io.temporal.internal.nexus.OperationTokenUtil
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenerateWorkflowRunOperationToken(String workflowId, String namespace) Generate a workflow run operation token from a workflow ID and namespace.static OperationTokenloadOperationToken(String operationToken) Load and validate an operation token without asserting the token type.static StringloadWorkflowIdFromOperationToken(String operationToken) Extract the workflow ID from a workflow run operation token.static OperationTokenloadWorkflowRunOperationToken(String operationToken) Load a workflow run operation token, asserting that the token type isOperationTokenType.WORKFLOW_RUN.
-
Method Details
-
loadOperationToken
Load and validate an operation token without asserting the token type. Use this for cancel dispatch where the token type determines the cancel behavior.- Throws:
IllegalArgumentException- if the operation token is malformed or has invalid structure
-
loadWorkflowRunOperationToken
Load a workflow run operation token, asserting that the token type isOperationTokenType.WORKFLOW_RUN.- Throws:
IllegalArgumentException- if the operation token is invalid or not a workflow run token
-
loadWorkflowIdFromOperationToken
Extract the workflow ID from a workflow run operation token.- Throws:
IllegalArgumentException- if the operation token is invalid
-
generateWorkflowRunOperationToken
-