|Constructor and Description|
|Modifier and Type||Method and Description|
Access the context the task ran (and crashed) on, if it could be recovered.
asError, getData, getDescription, getId, getMessage, getReason, toString
public FailedTask(String id, String message, Optional<String> description, Optional<Throwable> cause, Optional<byte> data, Optional<ActiveContext> context)
id- Identifier of the entity that produced the error. Cannot be null.
message- One-line error message. Cannot be null.
description- Long error description. Can be null.
cause- Java Exception that caused the error. Can be null.
data- byte array that contains serialized version of the error. Can be null.
context- the Context the Task failed on.
public Optional<ActiveContext> getActiveContext()
An ActiveContext is given when the task fails but the context remains alive. On context failure, the context also fails and is surfaced via the FailedContext event.
Note that receiving an ActiveContext here is no guarantee that the context (and evaluator) are in a consistent state. Application developers need to investigate the reason available via getCause() to make that call.
Copyright © 2017 The Apache Software Foundation. All rights reserved.