public interface WorkflowExecutorListener
Same instance of WorkflowExecutorListener is used for all workflow
state executions: all state must be stored in ListenerContext.data.
| Modifier and Type | Interface and Description |
|---|---|
static class |
WorkflowExecutorListener.ListenerContext
ListenerContext instance is created at start of workflow state execution and passed to listener's
life-cycle methods.
|
| Modifier and Type | Method and Description |
|---|---|
default void |
afterFailure(WorkflowExecutorListener.ListenerContext listenerContext,
Throwable throwable)
Executed after state processing has failed and before persisting state.
|
default void |
afterProcessing(WorkflowExecutorListener.ListenerContext listenerContext)
Executed after state has been successfully processed and before persisting
state.
|
default void |
beforeProcessing(WorkflowExecutorListener.ListenerContext listenerContext)
Executed before state is processed.
|
default NextAction |
process(WorkflowExecutorListener.ListenerContext listenerContext,
ListenerChain chain)
Processing chain.
|
default void beforeProcessing(WorkflowExecutorListener.ListenerContext listenerContext)
listenerContext - The listener context.default NextAction process(WorkflowExecutorListener.ListenerContext listenerContext, ListenerChain chain)
Typical implementation:
public NextAction process(ListenerContext listenerContext, ListenerChain chain) {
return chain.next(listenerContext);
}
listenerContext - The listener context.chain - The listener chain.default void afterProcessing(WorkflowExecutorListener.ListenerContext listenerContext)
listenerContext - The listener context.default void afterFailure(WorkflowExecutorListener.ListenerContext listenerContext, Throwable throwable)
listenerContext - The listener context.throwable - The exception thrown by the state handler method.Copyright © 2014–2020 Nitor Creations. All rights reserved.