Interface WorkflowInboundCallsInterceptor
- All Known Implementing Classes:
BaseRootWorkflowInboundCallsInterceptor,WorkflowInboundCallsInterceptorBase
An instance should be created in WorkerInterceptor.interceptWorkflow(WorkflowInboundCallsInterceptor).
The calls to this interceptor are executed under workflow context, all the rules and
restrictions on the workflow code apply. See io.temporal.workflow.
Prefer extending WorkflowInboundCallsInterceptorBase and overriding only the methods
you need instead of implementing this interface directly. WorkflowInboundCallsInterceptorBase provides correct default implementations to all the methods
of this interface.
The implementation must forward all the calls to next, but it may change the input
parameters.
See WorkerInterceptor.interceptWorkflow(WorkflowInboundCallsInterceptor) for a
definition of "next" WorkflowInboundCallsInterceptor.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic final classstatic final classstatic final classstatic final classstatic final classstatic final classstatic final class -
Method Summary
Modifier and TypeMethodDescriptionCalled when workflow main method is called.Called when update workflow execution request is delivered to a workflow execution, after passing the validator.Called when a workflow is queried.voidCalled when signal is delivered to a workflow execution.voidinit(WorkflowOutboundCallsInterceptor outboundCalls) Called when workflow class is instantiated.newCallbackThread(Runnable runnable, String name) Intercepts creation of a workflow callback threadnewWorkflowMethodThread(Runnable runnable, String name) Intercepts creation of the workflow main method threadvoidCalled when update workflow execution request is delivered to a workflow execution, before the update is executed.
-
Method Details
-
init
Called when workflow class is instantiated. May create aWorkflowOutboundCallsInterceptorinstance. The instance must forward all the calls tooutboundCalls, but it may change the input parameters.The instance should be passed into the {next.init(newWorkflowOutboundCallsInterceptor)}.
See
WorkerInterceptor.interceptWorkflow(io.temporal.common.interceptors.WorkflowInboundCallsInterceptor)for the definition of "next"WorkflowInboundCallsInterceptor.- Parameters:
outboundCalls- an existing interceptor instance to be proxied by the interceptor created inside this method
-
execute
WorkflowInboundCallsInterceptor.WorkflowOutput execute(WorkflowInboundCallsInterceptor.WorkflowInput input) Called when workflow main method is called.- Returns:
- result of the workflow execution.
-
handleSignal
Called when signal is delivered to a workflow execution. -
handleQuery
WorkflowInboundCallsInterceptor.QueryOutput handleQuery(WorkflowInboundCallsInterceptor.QueryInput input) Called when a workflow is queried. -
validateUpdate
Called when update workflow execution request is delivered to a workflow execution, before the update is executed. -
executeUpdate
WorkflowInboundCallsInterceptor.UpdateOutput executeUpdate(WorkflowInboundCallsInterceptor.UpdateInput input) Called when update workflow execution request is delivered to a workflow execution, after passing the validator. -
newWorkflowMethodThread
Intercepts creation of the workflow main method thread- Parameters:
runnable- thread function to runname- name of the thread, optional- Returns:
- created workflow thread. Should be treated as a pass-through object that shouldn't be manipulated in any way by the interceptor code.
-
newCallbackThread
Intercepts creation of a workflow callback thread- Parameters:
runnable- thread function to runname- name of the thread, optional- Returns:
- created workflow thread. Should be treated as a pass-through object that shouldn't be manipulated in any way by the interceptor code.
-