Class ContextAwareRuntimeException

java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.broadleafcommerce.orchestration.client.ContextAwareRuntimeException
All Implemented Interfaces:
Serializable

public class ContextAwareRuntimeException extends RuntimeException
A specialized RuntimeException that incorporates additional context information related to the exception.

This exception is designed to store a map of contextual data. This can be used to contribute context to the workflow as part of the execution of the failed activity. This is similar in function to ActivityResponse.getResultingContext(), but in this case can supply additional context for a failed activity.

To use, activity implementations should catch RuntimeException instances, wrap with this exception, and throw this exception to bubble out of the activity. The net effect will be a failed workflow, but with relevant context added.

See Also:
  • Constructor Details

  • Method Details

    • getResultingContext

      public Map<String,Object> getResultingContext()
      Any context information the activity wants to add to the main context