Class CustomMultiInstanceStrategy

All Implemented Interfaces:
GeneratorStrategy

public class CustomMultiInstanceStrategy extends DefaultHandlerStrategy
  • Constructor Details

    • CustomMultiInstanceStrategy

      public CustomMultiInstanceStrategy(GeneratorStrategy strategy)
  • Method Details

    • applyHandler

      public void applyHandler(com.squareup.javapoet.MethodSpec.Builder methodBuilder)
      Description copied from interface: GeneratorStrategy
      Adds code to the execute/apply method, if the element is handled by a handler - e.g.:
       instance.isWaitingAt(processInstanceEvent, "placeOrderExternalTask");
       instance.apply(processInstanceEvent, placeOrderExternalTask)
       

      or the previous element is an event based gateway.

      Specified by:
      applyHandler in interface GeneratorStrategy
      Overrides:
      applyHandler in class DefaultHandlerStrategy
      Parameters:
      methodBuilder - The method builder to use.
    • getHandlerType

      public com.squareup.javapoet.TypeName getHandlerType()
      Description copied from interface: GeneratorStrategy
      Returns the type name of the related handler or Void, if the activity is not handled by a specific handler.
      Specified by:
      getHandlerType in interface GeneratorStrategy
      Overrides:
      getHandlerType in class DefaultStrategy
      Returns:
      The handler type name e.g. TypeName.get(UserTaskHandler.class).
    • hasPassed

      public void hasPassed(com.squareup.javapoet.MethodSpec.Builder methodBuilder)
      Description copied from interface: GeneratorStrategy
      Adds code, which asserts that the process instance has passed a BPMN element.
      Specified by:
      hasPassed in interface GeneratorStrategy
      Overrides:
      hasPassed in class DefaultHandlerStrategy
      Parameters:
      methodBuilder - The method builder to use.
    • initHandlerElement

      public void initHandlerElement(com.squareup.javapoet.MethodSpec.Builder methodBuilder)
      Description copied from interface: GeneratorStrategy
      Adds code, which initializes the handler's element - e.g. TestCaseInstanceElement.UserTaskElement
      Specified by:
      initHandlerElement in interface GeneratorStrategy
      Overrides:
      initHandlerElement in class DefaultStrategy
      Parameters:
      methodBuilder - The method builder to use.