public void cancel(String msg, Throwable cause) {
    LOG.error(msg, cause);
    complete = true;
    if (cause instanceof ForeignException) {
      monitor.receive((ForeignException) cause);
    } else {
      monitor.receive(new ForeignException(getMemberName(), cause));
    }
  }
Method to cancel the Subprocedure by injecting an exception from and external source.
hbase-server/src/main/java/org/apache/hadoop/hbase/procedure/Subprocedure.java