public interface DecisionContext extends ReplayAware
Modifier and Type | Method and Description |
---|---|
void |
continueAsNewOnCompletion(ContinueAsNewWorkflowExecutionParameters parameters) |
java.util.function.Consumer<java.lang.Exception> |
createTimer(long delaySeconds,
java.util.function.Consumer<java.lang.Exception> callback)
Create a Value that becomes ready after the specified delay.
|
long |
currentTimeMillis() |
java.lang.String |
generateUniqueId()
Deterministic unique Id generator
|
ContinueAsNewWorkflowExecutionParameters |
getContinueAsNewOnCompletion() |
java.time.Duration |
getDecisionTaskTimeout() |
java.lang.String |
getDomain() |
boolean |
getEnableLoggingInReplay() |
java.time.Duration |
getExecutionStartToCloseTimeout() |
int |
getExecutionStartToCloseTimeoutSeconds() |
com.uber.m3.tally.Scope |
getMetricsScope() |
java.lang.String |
getRunId() |
java.lang.String |
getTaskList() |
WorkflowExecution |
getWorkflowExecution() |
java.lang.String |
getWorkflowId() |
WorkflowType |
getWorkflowType() |
boolean |
isCancelRequested() |
Promise<java.lang.Void> |
requestCancelWorkflowExecution(WorkflowExecution execution) |
java.util.function.Consumer<java.lang.Exception> |
scheduleActivityTask(ExecuteActivityParameters parameters,
java.util.function.BiConsumer<byte[],java.lang.Exception> callback)
Used to dynamically schedule an activity for execution
|
void |
setContinueAsNewOnCompletion(ContinueAsNewWorkflowExecutionParameters continueParameters) |
java.util.function.Consumer<java.lang.Exception> |
signalWorkflowExecution(SignalExternalWorkflowParameters signalParameters,
java.util.function.BiConsumer<java.lang.Void,java.lang.Exception> callback) |
java.util.function.Consumer<java.lang.Exception> |
startChildWorkflow(StartChildWorkflowExecutionParameters parameters,
java.util.function.Consumer<WorkflowExecution> executionCallback,
java.util.function.BiConsumer<byte[],java.lang.Exception> callback)
Start child workflow.
|
isReplaying
WorkflowExecution getWorkflowExecution()
WorkflowType getWorkflowType()
boolean isCancelRequested()
ContinueAsNewWorkflowExecutionParameters getContinueAsNewOnCompletion()
void setContinueAsNewOnCompletion(ContinueAsNewWorkflowExecutionParameters continueParameters)
int getExecutionStartToCloseTimeoutSeconds()
java.lang.String getTaskList()
java.lang.String getDomain()
java.lang.String getWorkflowId()
java.lang.String getRunId()
java.time.Duration getExecutionStartToCloseTimeout()
java.time.Duration getDecisionTaskTimeout()
java.util.function.Consumer<java.lang.Exception> scheduleActivityTask(ExecuteActivityParameters parameters, java.util.function.BiConsumer<byte[],java.lang.Exception> callback)
parameters
- An object which encapsulates all the information required to schedule an
activity for executioncallback
- Callback that is called upon activity completion or failure.Consumer.accept(Object)
to cancel activity task.java.util.function.Consumer<java.lang.Exception> startChildWorkflow(StartChildWorkflowExecutionParameters parameters, java.util.function.Consumer<WorkflowExecution> executionCallback, java.util.function.BiConsumer<byte[],java.lang.Exception> callback)
parameters
- An object which encapsulates all the information required to schedule a child
workflow for executioncallback
- Callback that is called upon child workflow completion or failure.Consumer.accept(Object)
to cancel activity task.java.util.function.Consumer<java.lang.Exception> signalWorkflowExecution(SignalExternalWorkflowParameters signalParameters, java.util.function.BiConsumer<java.lang.Void,java.lang.Exception> callback)
Promise<java.lang.Void> requestCancelWorkflowExecution(WorkflowExecution execution)
void continueAsNewOnCompletion(ContinueAsNewWorkflowExecutionParameters parameters)
java.lang.String generateUniqueId()
long currentTimeMillis()
PollForDecisionTaskResponse
start event of the
decision being processed or replayed.java.util.function.Consumer<java.lang.Exception> createTimer(long delaySeconds, java.util.function.Consumer<java.lang.Exception> callback)
delaySeconds
- time-interval after which the Value becomes ready in seconds.callback
- Callback that is called with null parameter after the specified delay.
CancellationException is passed as a parameter in case of a cancellation.Consumer.accept(Object)
to cancel timer.com.uber.m3.tally.Scope getMetricsScope()
boolean getEnableLoggingInReplay()