com.jscape.inet.mft.workflow

## Class Trigger

- java.lang.Object
- - com.jscape.inet.mft.workflow.Trigger

- All Implemented Interfaces:
    com.jscape.util.db.IntVersioned, java.io.Serializable

      public class Trigger
      extends java.lang.Object
      implements java.io.Serializable, com.jscape.util.db.IntVersioned

  Event trigger.
  Author:
    Alex
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Trigger()` Creates a new trigger instance.
    `Trigger(java.lang.String name, java.lang.String description, java.lang.Class eventClass, java.lang.String expressionString, ActionContext[] contexts, boolean allowErrorEvent, boolean enabled, boolean asynchronous, boolean asynchronousActions, boolean singleInstanceRequired, com.jscape.inet.mft.workflow.IgnoredDomainState ignoredDomainState, java.lang.String... tags)`
    `Trigger(Trigger that)` Copy constructor.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `getAllowErrorEvent()` Returns firing error event flag.
    `ActionContext[]` | `getContexts()` Returns actions contexts.
    `java.lang.String` | `getDescription()` Returns trigger description.
    `java.lang.Class` | `getEventClass()` Returns binded event class.
    `java.lang.String` | `getExpressionString()` Returns expression string as entered by user.
    `com.jscape.inet.mft.workflow.IgnoredDomainState` | `getIgnoredDomainState()` Returns the domain state in which this trigger will be ignored.
    `java.lang.String` | `getName()` Returns trigger name.
    `java.lang.String[]` | `getTags()`
    `int` | `getVersion()`
    `boolean` | `hasActions()`
    `boolean` | `isAsynchronous()` Returns trigger asynchronous flag.
    `boolean` | `isAsynchronousActions()`
    `boolean` | `isEnabled()` Returns trigger enabled flag.
    `boolean` | `isSingleInstanceRequired()`
    `void` | `setAllowErrorEvent(boolean value)` Sets firing error event flag.
    `void` | `setAsynchronous(boolean value)` Sets trigger asynchronous flag.
    `void` | `setAsynchronousActions(boolean value)`
    `void` | `setContexts(ActionContext[] value)` Sets action contexts.
    `void` | `setDescription(java.lang.String value)` Sets trigger description.
    `void` | `setEnabled(boolean value)` Sets trigger enabled flag.
    `void` | `setEventClass(java.lang.Class value)` Sets binded event class.
    `void` | `setExpression(com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> value)` Sets trigger expression.
    `void` | `setExpressionString(java.lang.String value)` Sets expression string as entered by user.
    `void` | `setIgnoredDomainState(com.jscape.inet.mft.workflow.IgnoredDomainState value)` Sets a domain state in which this trigger will be ignored.
    `void` | `setName(java.lang.String value)` Sets trigger name.
    `void` | `setSingleInstanceRequired(boolean value)`
    `void` | `setTags(java.lang.String[] value)`
    `void` | `setVersion(int value)`
    `java.lang.String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Constructor Detail

    - #### Trigger

          public Trigger(java.lang.String name,
                         java.lang.String description,
                         java.lang.Class eventClass,
                         java.lang.String expressionString,
                         ActionContext[] contexts,
                         boolean allowErrorEvent,
                         boolean enabled,
                         boolean asynchronous,
                         boolean asynchronousActions,
                         boolean singleInstanceRequired,
                         com.jscape.inet.mft.workflow.IgnoredDomainState ignoredDomainState,
                         java.lang.String... tags)

    - #### Trigger

          public Trigger()

      Creates a new trigger instance.

    - #### Trigger

          public Trigger(Trigger that)

      Copy constructor.
      Parameters:
        `that` - instance to copy

  - ### Method Detail

    - #### getName

          public java.lang.String getName()

      Returns trigger name.
      Returns:
        trigger name

    - #### setName

          public void setName(java.lang.String value)

      Sets trigger name.
      Parameters:
        `value` - the trigger name

    - #### getDescription

          public java.lang.String getDescription()

      Returns trigger description.
      Returns:
        trigger description

    - #### setDescription

          public void setDescription(java.lang.String value)

      Sets trigger description.
      Parameters:
        `value` - the trigger description

    - #### getEventClass

          public java.lang.Class getEventClass()

      Returns binded event class.
      Returns:
        binded event class

    - #### setEventClass

          public void setEventClass(java.lang.Class value)

      Sets binded event class.
      Parameters:
        `value` - the event class

    - #### setExpression

          public void setExpression(com.jscape.util.functor.UnaryFunction<ExpressionContext,java.lang.Object> value)

      Sets trigger expression.
      Parameters:
        `value` - trigger expression

    - #### getExpressionString

          public java.lang.String getExpressionString()

      Returns expression string as entered by user.
      Returns:
        an expression string

    - #### setExpressionString

          public void setExpressionString(java.lang.String value)

      Sets expression string as entered by user.
      Parameters:
        `value` - an expression string value

    - #### getContexts

          public ActionContext[] getContexts()

      Returns actions contexts.
      Returns:
        actions contexts

    - #### setContexts

          public void setContexts(ActionContext[] value)

      Sets action contexts.
      Parameters:
        `value` - action contexts

    - #### getAllowErrorEvent

          public boolean getAllowErrorEvent()

      Returns firing error event flag.
      Returns:
        `true` if error event firing allowed; `false` otherwise

    - #### setAllowErrorEvent

          public void setAllowErrorEvent(boolean value)

      Sets firing error event flag.
      Parameters:
        `value` - if `true` trigger will fire error event if error appears while trigger run

    - #### isEnabled

          public boolean isEnabled()

      Returns trigger enabled flag.
      Returns:
        `true` if trigger is enabled; `false` otherwise

    - #### setEnabled

          public void setEnabled(boolean value)

      Sets trigger enabled flag.
      Parameters:
        `value` - if `true` trigger will be enabled

    - #### isAsynchronous

          public boolean isAsynchronous()

      Returns trigger asynchronous flag.
      Returns:
        `true` if trigger must be run asynchronously; `false` otherwise

    - #### setAsynchronous

          public void setAsynchronous(boolean value)

      Sets trigger asynchronous flag.
      Parameters:
        `value` - if `true` trigger will be run asynchronously

    - #### isAsynchronousActions

          public boolean isAsynchronousActions()

    - #### setAsynchronousActions

          public void setAsynchronousActions(boolean value)

    - #### isSingleInstanceRequired

          public boolean isSingleInstanceRequired()

    - #### setSingleInstanceRequired

          public void setSingleInstanceRequired(boolean value)

    - #### getIgnoredDomainState

          public com.jscape.inet.mft.workflow.IgnoredDomainState getIgnoredDomainState()

      Returns the domain state in which this trigger will be ignored.
      Returns:
        a domain stated

    - #### setIgnoredDomainState

          public void setIgnoredDomainState(com.jscape.inet.mft.workflow.IgnoredDomainState value)

      Sets a domain state in which this trigger will be ignored.
      Parameters:
        `value` - a domain stated

    - #### getTags

          public java.lang.String[] getTags()

    - #### setTags

          public void setTags(java.lang.String[] value)

    - #### getVersion

          public int getVersion()

      Specified by:
        `getVersion` in interface `com.jscape.util.db.IntVersioned`

    - #### setVersion

          public void setVersion(int value)

      Specified by:
        `setVersion` in interface `com.jscape.util.db.IntVersioned`

    - #### hasActions

          public boolean hasActions()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © JSCAPE LLC. 1999-2019. All Rights Reserved