Class AbstractThrowEventBuilder<B extends AbstractThrowEventBuilder<B,E>,E extends ThrowEvent>

All Implemented Interfaces:
ZeebeJobWorkerElementBuilder<B>, ZeebeJobWorkerPropertiesBuilder<B>, ZeebeVariablesMappingBuilder<B>
Direct Known Subclasses:
AbstractEndEventBuilder, AbstractIntermediateThrowEventBuilder

public abstract class AbstractThrowEventBuilder<B extends AbstractThrowEventBuilder<B,E>,E extends ThrowEvent> extends AbstractEventBuilder<B,E> implements ZeebeJobWorkerElementBuilder<B>
Author:
Sebastian Menski
  • Constructor Details

    • AbstractThrowEventBuilder

      protected AbstractThrowEventBuilder(BpmnModelInstance modelInstance, E element, Class<?> selfType)
  • Method Details

    • message

      public B message(String messageName)
      Sets an event definition for the given message name. If already a message with this name exists it will be used, otherwise a new message is created.
      Parameters:
      messageName - the name of the message
      Returns:
      the builder object
    • messageEventDefinition

      public MessageEventDefinitionBuilder messageEventDefinition()
      Creates an empty message event definition with an unique id and returns a builder for the message event definition.
      Returns:
      the message event definition builder object
    • messageEventDefinition

      public MessageEventDefinitionBuilder messageEventDefinition(String id)
      Creates an empty message event definition with the given id and returns a builder for the message event definition.
      Parameters:
      id - the id of the message event definition
      Returns:
      the message event definition builder object
    • signal

      public B signal(String signalName)
      Sets an event definition for the given signal name. If already a signal with this name exists it will be used, otherwise a new signal is created.
      Parameters:
      signalName - the name of the signal
      Returns:
      the builder object
    • signalEventDefinition

      public SignalEventDefinitionBuilder signalEventDefinition()
      Creates an empty signal event definition with an unique id and returns a builder for the signal event definition.
      Returns:
      the signal event definition builder object
    • signalEventDefinition

      public SignalEventDefinitionBuilder signalEventDefinition(String signalName)
      Sets an event definition for the given Signal name. If a signal with this name already exists it will be used, otherwise a new signal is created. It returns a builder for the Signal Event Definition.
      Parameters:
      signalName - the name of the signal
      Returns:
      the signal event definition builder object
    • escalationExpression

      public B escalationExpression(String escalationCodeExpression)
      Sets a dynamic escalation code for the escalation that is retrieved from the given expression
      Parameters:
      escalationCodeExpression - the expression for the escalation
      Returns:
      the builder object
    • escalation

      public B escalation(String escalationCode)
      Sets an escalation definition for the given escalation code. If already an escalation with this code exists it will be used, otherwise a new escalation is created.
      Parameters:
      escalationCode - the code of the escalation
      Returns:
      the builder object
    • escalationEventDefinition

      public EscalationEventDefinitionBuilder escalationEventDefinition(String id)
      Creates an escalation event definition with an unique id and returns a builder for the escalation event definition.
      Returns:
      the escalation event definition builder object
    • escalationEventDefinition

      public EscalationEventDefinitionBuilder escalationEventDefinition()
      Creates an escalation event definition and returns a builder for the escalation event definition.
      Returns:
      the escalation event definition builder object
    • compensateEventDefinition

      public CompensateEventDefinitionBuilder compensateEventDefinition()
    • compensateEventDefinition

      public CompensateEventDefinitionBuilder compensateEventDefinition(String id)
    • link

      public B link(String linkName)
      Sets a link event definition for the given link name.
      Parameters:
      linkName - the name of the link
      Returns:
      the builder object
    • linkEventDefinition

      public LinkEventDefinitionBuilder linkEventDefinition()
      Creates an empty link event definition with a unique id and returns a builder for the link event definition.
      Returns:
      the link event definition builder object
    • linkEventDefinition

      public LinkEventDefinitionBuilder linkEventDefinition(String id)
      Creates an empty link event definition with the given id and returns a builder for the link event definition.
      Parameters:
      id - the id of the link event definition
      Returns:
      the link event definition builder object
    • zeebeJobType

      public B zeebeJobType(String type)
      Description copied from interface: ZeebeJobWorkerPropertiesBuilder
      Sets a static type for the job.
      Specified by:
      zeebeJobType in interface ZeebeJobWorkerPropertiesBuilder<B extends AbstractThrowEventBuilder<B,E>>
      Parameters:
      type - the type of the job
      Returns:
      the builder instance
    • zeebeJobTypeExpression

      public B zeebeJobTypeExpression(String expression)
      Description copied from interface: ZeebeJobWorkerPropertiesBuilder
      Sets a dynamic type for the job that is retrieved from the given expression.
      Specified by:
      zeebeJobTypeExpression in interface ZeebeJobWorkerPropertiesBuilder<B extends AbstractThrowEventBuilder<B,E>>
      Parameters:
      expression - the expression for the type of the job
      Returns:
      the builder instance
    • zeebeJobRetries

      public B zeebeJobRetries(String retries)
      Description copied from interface: ZeebeJobWorkerPropertiesBuilder
      Sets a static number of retries for the job.
      Specified by:
      zeebeJobRetries in interface ZeebeJobWorkerPropertiesBuilder<B extends AbstractThrowEventBuilder<B,E>>
      Parameters:
      retries - the number of job retries
      Returns:
      the builder instance
    • zeebeJobRetriesExpression

      public B zeebeJobRetriesExpression(String expression)
      Description copied from interface: ZeebeJobWorkerPropertiesBuilder
      Sets a dynamic number of retries for the job that is retrieved from the given expression
      Specified by:
      zeebeJobRetriesExpression in interface ZeebeJobWorkerPropertiesBuilder<B extends AbstractThrowEventBuilder<B,E>>
      Parameters:
      expression - the expression for the number of job retries
      Returns:
      the builder instance
    • zeebeTaskHeader

      public B zeebeTaskHeader(String key, String value)
      Description copied from interface: ZeebeJobWorkerPropertiesBuilder
      Adds a custom task header for the job. Can be called multiple times.
      Specified by:
      zeebeTaskHeader in interface ZeebeJobWorkerPropertiesBuilder<B extends AbstractThrowEventBuilder<B,E>>
      Parameters:
      key - the key of the custom header
      value - the value of the custom header
      Returns:
      the builder instance
    • zeebeInputExpression

      public B zeebeInputExpression(String sourceExpression, String target)
      Specified by:
      zeebeInputExpression in interface ZeebeVariablesMappingBuilder<B extends AbstractThrowEventBuilder<B,E>>
    • zeebeOutputExpression

      public B zeebeOutputExpression(String sourceExpression, String target)
      Specified by:
      zeebeOutputExpression in interface ZeebeVariablesMappingBuilder<B extends AbstractThrowEventBuilder<B,E>>
    • zeebeInput

      public B zeebeInput(String source, String target)
      Specified by:
      zeebeInput in interface ZeebeVariablesMappingBuilder<B extends AbstractThrowEventBuilder<B,E>>
    • zeebeOutput

      public B zeebeOutput(String source, String target)
      Specified by:
      zeebeOutput in interface ZeebeVariablesMappingBuilder<B extends AbstractThrowEventBuilder<B,E>>