Class ExecutionListenerAnswer

  • All Implemented Interfaces:
    org.camunda.bpm.engine.delegate.DelegateListener<org.camunda.bpm.engine.delegate.DelegateExecution>, org.camunda.bpm.engine.delegate.ExecutionListener, org.mockito.stubbing.Answer<Void>

    public class ExecutionListenerAnswer
    extends Object
    implements org.camunda.bpm.engine.delegate.ExecutionListener
    This is a specialized Answer that delegates to the given ExecutionListener. When using an ExecutionListener-Mock, this Answer can be used to implement internal behavior of the mock by delegating the method call to the given delegate instance.
    Author:
    Jan Galinski, Holisticon AG
    • Field Summary

      • Fields inherited from interface org.camunda.bpm.engine.delegate.ExecutionListener

        EVENTNAME_END, EVENTNAME_START, EVENTNAME_TAKE
    • Constructor Summary

      Constructors 
      Constructor Description
      ExecutionListenerAnswer​(org.camunda.bpm.engine.delegate.ExecutionListener executionListener)  
    • Constructor Detail

      • ExecutionListenerAnswer

        public ExecutionListenerAnswer​(org.camunda.bpm.engine.delegate.ExecutionListener executionListener)
    • Method Detail

      • notify

        public void notify​(org.camunda.bpm.engine.delegate.DelegateExecution execution)
                    throws Exception
        Specified by:
        notify in interface org.camunda.bpm.engine.delegate.DelegateListener<org.camunda.bpm.engine.delegate.DelegateExecution>
        Specified by:
        notify in interface org.camunda.bpm.engine.delegate.ExecutionListener
        Throws:
        Exception
      • answer

        protected void answer​(org.camunda.bpm.engine.delegate.DelegateExecution parameter)
                       throws Exception
        Every implementing class must define what "answer" should actually do.
        Parameters:
        parameter - either DelegateTask or DelegateExecution.
        Throws:
        Exception - when anything fails
      • answer

        public final Void answer​(org.mockito.invocation.InvocationOnMock invocation)
                          throws Throwable
        Specified by:
        answer in interface org.mockito.stubbing.Answer<T extends org.camunda.bpm.engine.delegate.VariableScope>
        Throws:
        Throwable