Class ScriptingErrorUtils

java.lang.Object
com.flowable.platform.engine.impl.scripting.ScriptingErrorUtils

public class ScriptingErrorUtils extends Object
Author:
Filip Hrisafov
  • Field Details

  • Constructor Details

    • ScriptingErrorUtils

      public ScriptingErrorUtils()
  • Method Details

    • throwForbidden

      public void throwForbidden(String message)
      Throws a forbidden exception with the given message. This will be mapped to a 403 HTTP status code.
      Parameters:
      message - the message to display
    • throwIllegalArgument

      public void throwIllegalArgument(String message)
      Throws an illegal argument exception with the given message. This will be mapped to a 400 HTTP status code.
      Parameters:
      message - the message to display
    • throwNotFound

      public void throwNotFound(String message)
      Throws a not found exception with the given message. This will be mapped to a 404 HTTP status code.
      Parameters:
      message - the message to display
    • throwBusinessError

      public void throwBusinessError(String errorCode)
      Throws an engine-neutral business error, caught by BPMN error boundary events and CMMN fault sentries with a matching error code. Prefer this over flw.bpmn.throwError when the script may run in either BPMN or CMMN contexts.
      Parameters:
      errorCode - the error code used to match boundary events / fault sentries.
    • throwBusinessError

      public void throwBusinessError(String errorCode, String message)
      Throws an engine-neutral business error with an additional message.
      Parameters:
      errorCode - the error code used to match boundary events / fault sentries.
      message - additional message carried on the error.