Interface WaitHook

  • All Known Implementing Classes:
    AbstractWaitHook

    public interface WaitHook
    Callback interface used by COPPER to enable execution of custom code in the context of a workflow instance' wait invocation.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void onWait​(Workflow<?> wf, java.sql.Connection con)
      Called for one single wait invocation of the corresponding workflow instance.
    • Method Detail

      • onWait

        void onWait​(Workflow<?> wf,
                    java.sql.Connection con)
             throws java.lang.Exception
        Called for one single wait invocation of the corresponding workflow instance. This method may be called multiple times, e.g. in case of a rollback with subsequent retry. Attention! You may not commit or rollback the transaction currently hold by the specified connection (if not null). This will be done by COPPER. You may just use this to hook custom code into the transaction context.
        Parameters:
        wf - Workflow instance
        con - DB connection or null, in case there is no DB connection in the scope
        Throws:
        java.lang.Exception - Any exception which can happen inside of the code of this WaitHook.