Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fujitsu.iflow.model.workflow
Interface TriggerDef

public interface TriggerDef

Triggers are a feature that allows a user to specify event-based triggers within the environment.

A trigger contains two components: the event that drives the trigger and the action that the trigger takes when it is fired.

Triggers are very versatile and can be associated with an activity node or a process definition. Each of these provides a different scope of behaviour.

- Activity-Node-Level triggers: Activity-Node-Level triggers operate on an activity node. They are used to make a choice.
- Process-Definition-Level triggers: Process-Definition-Level triggers operate on a process definition. These are used for creating a new process instance and starting it.

The functionality of the triggers can be extended at both process definition and activity level to do more than just make choices and start process instances. They would be used in future versions to suspend/resume a process instance, abort a process instance, suspend/resume an activity, add/remove attachments, etc.

### Controlling Triggers

The process definition designer controls the specifications of the process definition- and activity-level triggers. Triggers are controlled by the external event and the action.

### Event Specifications

The event parameters are specified as a set of control conditions on the event data, which describe the nature of the change that has occurred in the external system. The process definition designer sets the conditions that are required to fire the trigger. All the control conditions are combined by an implied logical AND operation during evaluation.

### Action Specifications

The action specifications define the operation that the trigger will perform. Since each trigger is defined to handle only one type of operation, all the actions defined in a trigger relate to the same operation. Thus a trigger defined to make a choice on an activity will not be able to start a process. When making a choice on an activity, it is required to specify the name of the arrow. This is referred to as the parameter to the operation of make choice in the context of the trigger. Each action thus comprises of all the parameter(s) for the operation and the conditions thereof. When there are multiple conditions to be evaluated, each condition is evaluated sequentially. This order is also specified by the process definition designer. The number and type of parameters for each parameter controls the paramter specification of the action. When the parameter can hove more than one value, each value of the parameter will have to be declared by the designer along with it's set of conditions.

### Correlation Specifications

Certain triggers may be designed to operate on process rather than process definition, like the make choice trigger. In these cases the process definition designer has to provide the means to facilitate the trigger to locate the right process to operate on when it (trigger) is fired. This information is referred to as correlation within the trigger context. The process definition designer specifies this as a set of conditions, operating on user-defined process attributes. For each process attribute used, the process definition designer specifies an element in the incoming event. When the trigger is fired, only those processes are selected in which the value of the specified attribute matches the value of the corresponding element in the incoming event.

### Data Transfer Specifications

Data transfer is an added feature of the triggers. This provides for transferring data from the external event into the process. The process definition designer specifies the process attributes that will receive data from the event. The data is transferred into the process by the trigger only if the conditions of the event meet the action's conditions. When more than one value of the parameter of the action has been specified, data transfer will be done when any of the value's conditions are met by the event data.

### Trigger State

A trigger will be allowed to be in one of three possible states. The three allowed states are :`Default`, `Active` and `Inactive`.

- "Default" state implies that the eligibility of the carrying out of operation(s) within its action component will be governed by the following rules:
  - For a "Start process" operation - the process definition should be in published state
  - For a "Make Choice" operation - the process definition from which the process was created should be in private, published or obsolete state.
- "Active" state implies that this trigger is eligible to carry out the operation(s) defined within its action component.
- "Inactive" state implies that this trigger is not eligible to carry out the operations(s) defined within its action component.

When a trigger is created it's state is "Default". When a user wants to change the state of a trigger, the state of the process definition will govern whether the state of a trigger can be changed and which state can the trigger be changed to:

1. For draft or published process definition, the triggers can have any state.
2. For obsolete process defintions, the Start Process trigger cannot be "Active".
3. The state of triggers for a process definition in deleted state is the same as its state prior delete. This state can not be changed by the user.
4. For private templates, the Start Process trigger cannot be "Active".
5. The state of Make Choice trigger for a private process definition with no active processes cannot be "Active".
6. The state of Make Choice trigger for a private process definition with no active processes cannot be changed.

This interface defines constants and operations for defining triggers. All the trigger operations are controlled through properties set at the process definition design time. The identifier of the trigger will be assigned by the server at the time of creation of the trigger.

See Also:
  `Plan.addTrigger(String, int)`, `Node.addTrigger(String, int)`

Field Summary
`static int` | `MAKE_CHOICE` Denotes a trigger to make a choice.
`static int` | `MAX_TRIGGER_DESCRIPTION_LENGTH` The maximum length of the description of a trigger; currently set to 256 characters.
`static int` | `MAX_TRIGGER_HINT_LENGTH` The maximum length of the hint of a trigger.
`static int` | `MAX_TRIGGER_NAME_LENGTH` The maximum length of the name of a trigger.
`static int` | `START_PROCESS` Denotes a trigger to start a process instance.
`static int` | `STATE_ACTIVE` Denotes an active trigger.
`static int` | `STATE_DEFAULT` Denotes a trigger in default state.
`static int` | `STATE_INACTIVE` Denotes an inactive trigger.
`static int` | `STRING_TYPE` Denotes a parameter of type "String".

Method Summary
`int` | `addAction(java.lang.String param, java.lang.String condition)` Appends the condition and its parameter for the action, returning the index of its evaluation order.
`int` | `addControlCondition(java.lang.String condition)` Appends the control condition and returns the index of it's evaluation order.
`java.lang.String` | `addCorrelationMap(java.lang.String dataElementName, java.lang.String eventDataIdentifier)` Sets the relationship between the data element and the event's data element for correlation, overriding, if any, the previous mapping for the same data element.
`java.lang.String` | `addDataMap(java.lang.String dataElementName, java.lang.String eventDataIdentifier)` Specifies the data element to receive the value from the specified event data identifier.
`void` | `clearCorrelationMap()` Removes all correlation relationships set up between data elements and event data identifiers.
`void` | `clearDataMap()` Removes all of the data transfer relations for the trigger.
`void` | `deleteAction(int index)` Deletes for the action, the condition and its parameters located at the specified evaluation order index.
`void` | `deleteControlCondition(int index)` Deletes the control condition at the specified evaluation order index, moving down the latter conditions index by one.
`void` | `deleteCorrelationMap(java.lang.String dataElementName)` Deletes the correlation relationship for the specified data element.
`void` | `deleteDataMap(java.lang.String dataElementName)` Deletes the data transfer relationship for the specified event data identifier.
`java.lang.String` | `getActionCondition(int index)` Retrieves the conditions specified for the action of the trigger.
`int` | `getActionCount()` Returns the number of actions (condition-parameter pairs) set for this trigger.
`int` | `getActionParamCount()` Retrieves the number of parameters required by the operation associated with the trigger.
`java.lang.String[]` | `getActionParams(int index)` Retrieves the parameters specified for the action of the trigger.
`int` | `getActionParamType()` Retrieves the type of the parameter required by the operation.
`long` | `getActivityId()` Retrieves the identifier of the activity node for which this trigger is defined.
`java.lang.String` | `getControlCondition(int index)` Retrieves the control condition associated with the trigger at the specified evaluation order index.
`java.lang.String[]` | `getControlConditions()` Retrieves the control conditions associated with the trigger.
`java.lang.String` | `getCorrelationDataElement(java.lang.String eventDataIdentifier)` Retrieves the data element associated, through a correlation relationship, with the specified event data identifier.
`java.lang.String` | `getCorrelationEventElement(java.lang.String dataElementName)` Retrieves the event data identifier associated, through a correlation relationship, with the specified data element.
`java.util.Hashtable` | `getCorrelationMap()` Retrieves the correlation relationships set up between data elements and event data identifiers.
`java.lang.String` | `getDataElement(java.lang.String eventDataIdentifier)` Retrieves the data element, associated through a data transfer relationship, with the specified event data identifier.
`java.util.Hashtable` | `getDataMap()` Retrieves all of the data transfer relations for the trigger.
`java.lang.String` | `getDescription()` Retrieves the description of the trigger.
`java.lang.String` | `getEventElement(java.lang.String dataElementName)` Retrieves the event data identifier, associated through a data transfer relationship, with the specified data element.
`java.lang.String` | `getHint()` Retrieves the user specified hint of the trigger.
`long` | `getId()` Retrieves the unique system-assigned identifier of this trigger.
`java.lang.String` | `getName()` Retrieves the name of the trigger.
`long` | `getPlanId()` Retrieves the identifier of the process definition for which this trigger is defined.
`int` | `getState()` Returns the current state of this trigger.
`int` | `getType()` Retrieves the type of this trigger.
`void` | `insertAction(int index, java.lang.String param, java.lang.String condition)` Inserts, at the specified evaluation order index, the condition associated with the action and its parameters.
`void` | `insertControlCondition(int index, java.lang.String condition)` Sets the control condition at the specified evaluation order index, moving up the latter conditions index by one.
`boolean` | `isActive()` Determines if the trigger will be invoked for incoming events.
`boolean` | `isActivityTrigger()` Determines if this trigger is defined for an activity node or a process definition.
`void` | `setControlConditions(java.lang.String[] condition)` Sets all the conditions associated with the event data.
`void` | `setDescription(java.lang.String description)` Sets the description of the trigger.
`void` | `setHint(java.lang.String hint)` Sets the hint of the trigger.
`void` | `setName(java.lang.String name)` Sets the name of the trigger.
`int` | `setState(int newState)` Changes the state of this trigger.

Field Detail

### START_PROCESS

    public static final int START_PROCESS

  Denotes a trigger to start a process instance.

  See Also:
    Constant Field Values

### MAKE_CHOICE

    public static final int MAKE_CHOICE

  Denotes a trigger to make a choice.

  See Also:
    Constant Field Values

### STATE_DEFAULT

    public static final int STATE_DEFAULT

  Denotes a trigger in default state.

  See Also:
    Constant Field Values

### STATE_ACTIVE

    public static final int STATE_ACTIVE

  Denotes an active trigger.

  See Also:
    Constant Field Values

### MAX_TRIGGER_NAME_LENGTH

    public static final int MAX_TRIGGER_NAME_LENGTH

  The maximum length of the name of a trigger.

  See Also:
    Constant Field Values

### MAX_TRIGGER_HINT_LENGTH

    public static final int MAX_TRIGGER_HINT_LENGTH

  The maximum length of the hint of a trigger.

  See Also:
    Constant Field Values

### MAX_TRIGGER_DESCRIPTION_LENGTH

    public static final int MAX_TRIGGER_DESCRIPTION_LENGTH

  The maximum length of the description of a trigger; currently set to 256 characters.

  See Also:
    Constant Field Values

### STATE_INACTIVE

    public static final int STATE_INACTIVE

  Denotes an inactive trigger.

  See Also:
    Constant Field Values

### STRING_TYPE

    public static final int STRING_TYPE

  Denotes a parameter of type "String".

  See Also:
    Constant Field Values

Method Detail

### getType

    public int getType()
                throws ModelException

  Retrieves the type of this trigger. The returned values matches to one of the types specified within this class, like `START_PROCESS`.

  Returns:
    The type of the trigger.
  Throws:
    `ModelException`

### isActivityTrigger

    public boolean isActivityTrigger()
                              throws ModelException

  Determines if this trigger is defined for an activity node or a process definition.

  Returns:
    `true` if the trigger is defined for an activity node, `false` otherwise.
  Throws:
    `ModelException`

### getId

    public long getId()
               throws ModelException

  Retrieves the unique system-assigned identifier of this trigger.

  Returns:
    The identifier of the trigger.
  Throws:
    `ModelException`

### setState

    public int setState(int newState)
                 throws ModelException

  Changes the state of this trigger.

  Parameters:
    `newState` - The state to be set for the trigger as defined by the constants `STATE_`... within this class.
  Returns:
    The previous state of the trigger.
  Throws:
    `ModelException`

### getState

    public int getState()
                 throws ModelException

  Returns the current state of this trigger.

  The state can be one of the `STATE_`... constants defined in this class.

  Returns:
    The state of the trigger.
  Throws:
    `ModelException`
  See Also:
    `setState(int)`

### isActive

    public boolean isActive()
                     throws ModelException

  Determines if the trigger will be invoked for incoming events.

  Returns:
    `true` if the state of this trigger is in state `STATE_ACTIVE`. Also returns true if this trigger is in state `STATE_DEFAULT` which are considered "active" based on the state of the process definition.
  Throws:
    `ModelException`
  See Also:
    `getState()`

### setName

    public void setName(java.lang.String name)
                 throws ModelException

  Sets the name of the trigger.

  The name is limited to `MAX_TRIGGER_NAME_LENGTH` characters..

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Parameters:
    `name` - The name to be set for the trigger.
  Throws:
    `ModelException` - Thrown when the related process definition or process instance is not in edit-mode. Furthermore this exception is thrown when the supplied name is invalid (e.g. the length without blanks is 0) or `null`.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### getName

    public java.lang.String getName()
                             throws ModelException

  Retrieves the name of the trigger.

  Returns:
    The name of the trigger.
  Throws:
    `ModelException`
  See Also:
    `setName(String)`

### setDescription

    public void setDescription(java.lang.String description)
                        throws ModelException

  Sets the description of the trigger.

  Typically, the description is used to describe the tasks of this trigger. The description is limited to `MAX_TRIGGER_DESCRIPTION_LENGTH` characters.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Parameters:
    `description` - The description to be set for the trigger.
  Throws:
    `ModelException` - Thrown when the related process definition or process instance is not in edit-mode. Furthermore this exception is thrown when the supplied description is invalid or null.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### getDescription

    public java.lang.String getDescription()
                                    throws ModelException

  Retrieves the description of the trigger.

  Returns:
    The description of the trigger.
  Throws:
    `ModelException`
  See Also:
    `setDescription(String)`

### addControlCondition

    public int addControlCondition(java.lang.String condition)
                            throws ModelException

  Appends the control condition and returns the index of it's evaluation order. The first control condition's index is "0".

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Parameters:
    `condition` - One more control condition for the trigger.
  Returns:
    The index of the condition's evaluation order.
  Throws:
    `ModelException` - Thrown when the related process definition or process instance is not in edit-mode when this method is called or if the supplied condition is invalid (e.g. length without blanks is 0) or `null`.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### insertControlCondition

    public void insertControlCondition(int index,
                                       java.lang.String condition)
                                throws ModelException

  Sets the control condition at the specified evaluation order index, moving up the latter conditions index by one.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Parameters:
    `index` - The evaluation order for the control condition.
    `condition` - One more control condition for the trigger.
  Throws:
    `ModelException` - Thrown when the regarding process definition or process instance is not in edit-mode when this method is called or the supplied index is invalid. Furthermore this exception is thrown when the supplied condition is invalid (e.g. the length without blanks is 0) or `null`.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### setControlConditions

    public void setControlConditions(java.lang.String[] condition)
                              throws ModelException

  Sets all the conditions associated with the event data.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Parameters:
    `condition` - All the control conditions for the trigger.
  Throws:
    `ModelException` - Thrown when the related process definition or process instance is not in edit-mode or when the supplied list of confiditions is `null` or empty. Furthermore this exception is thrown when one of the supplied conditions is invalid (e.g. length without blanks is 0) or `null`.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### deleteControlCondition

    public void deleteControlCondition(int index)
                                throws ModelException

  Deletes the control condition at the specified evaluation order index, moving down the latter conditions index by one.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Parameters:
    `index` - The evaluation order index of the control condition (>=0).
  Throws:
    `ModelException` - Thrown when the related process definition or process instance is not in edit-mode or the supplied index is invalid.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### getControlConditions

    public java.lang.String[] getControlConditions()
                                            throws ModelException

  Retrieves the control conditions associated with the trigger.

  Returns:
    All the conditions associated with the event data.
  Throws:
    `ModelException`
  See Also:
    `setControlConditions(String[])`

### getControlCondition

    public java.lang.String getControlCondition(int index)
                                         throws ModelException

  Retrieves the control condition associated with the trigger at the specified evaluation order index.

  Parameters:
    `index` - The evaluation order index of the control condition(>=0).
  Returns:
    The conditions associated with the event data.
  Throws:
    `ModelException`

### addCorrelationMap

    public java.lang.String addCorrelationMap(java.lang.String dataElementName,
                                              java.lang.String eventDataIdentifier)
                                       throws ModelException

  Sets the relationship between the data element and the event's data element for correlation, overriding, if any, the previous mapping for the same data element.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`.

  Parameters:
    `dataElementName` - The name of the data element.
    `eventDataIdentifier` - The name of the data identifier from the event.
  Returns:
    The name of event data element previously associated with this data element or null.
  Throws:
    `ModelException` - Thrown when the related process definition is not in edit-mode. Furthermore this exception is thrown when the dataElementName or eventDataIndentifier is invalid (e.g. length of value without blanks is 0) or `null`.
  See Also:
    `Plan.startEdit()`

### deleteCorrelationMap

    public void deleteCorrelationMap(java.lang.String dataElementName)
                              throws ModelException

  Deletes the correlation relationship for the specified data element.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`.

  Parameters:
    `dataElementName` - The name of the data element.
  Throws:
    `ModelException` - Thrown when the related process definition is not in edit-mode.
  See Also:
    `Plan.startEdit()`

### getCorrelationEventElement

    public java.lang.String getCorrelationEventElement(java.lang.String dataElementName)
                                                throws ModelException

  Retrieves the event data identifier associated, through a correlation relationship, with the specified data element.

  Parameters:
    `dataElementName` - The name of the data element.
  Returns:
    The event data identifier associated with the specified data element for correlation. Returns `null` if no event data exist for the supplied `dataElementName`.
  Throws:
    `ModelException`

### getCorrelationDataElement

    public java.lang.String getCorrelationDataElement(java.lang.String eventDataIdentifier)
                                               throws ModelException

  Retrieves the data element associated, through a correlation relationship, with the specified event data identifier.

  Parameters:
    `eventDataIdentifier` - The name of the data identifier from the event.
  Returns:
    The data element associated with the specified event data identifier for correlation or `null` in case of an invalid `eventDataIndentifier`.
  Throws:
    `ModelException`

### getCorrelationMap

    public java.util.Hashtable getCorrelationMap()
                                          throws ModelException

  Retrieves the correlation relationships set up between data elements and event data identifiers. The map is keyed by names of the data elements. Manipulating this map does not affect the correlation relationships already setup.

  Returns:
    The map of all correlation relationships.
  Throws:
    `ModelException`

### clearCorrelationMap

    public void clearCorrelationMap()
                             throws ModelException

  Removes all correlation relationships set up between data elements and event data identifiers.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, a structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Throws:
    `ModelException` - Thrown when the related process definition or process instance is not in edit-mode.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### getActionParamCount

    public int getActionParamCount()
                            throws ModelException

  Retrieves the number of parameters required by the operation associated with the trigger.

  Returns:
    The number of parameters (0 means no parameters are required by the operation).
  Throws:
    `ModelException`

### getActionParamType

    public int getActionParamType()
                           throws ModelException

  Retrieves the type of the parameter required by the operation. The type returned is one of the types defined in `TriggerDef`.

  Returns:
    The type of the parameter required by the operation.
  Throws:
    `ModelException`

### insertAction

    public void insertAction(int index,
                             java.lang.String param,
                             java.lang.String condition)
                      throws ModelException

  Inserts, at the specified evaluation order index, the condition associated with the action and its parameters. Later conditions and parameter pairs, if any, moved down in the evaluation order.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Parameters:
    `index` - The evaluation order for the condition-parameter pair associated with the action.
    `param` - The parameter for the operation.
    `condition` - The condition for executing the operation with the associated parameter.
  Throws:
    `ModelException` - Thrown when the related process definition or process instance is not in edit-mode or the supplied index is invalid. Furthermore this exception is thrown when the supplied param or condition is invalid (e.g. the length without blanks is 0) or `null`.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### addAction

    public int addAction(java.lang.String param,
                         java.lang.String condition)
                  throws ModelException

  Appends the condition and its parameter for the action, returning the index of its evaluation order. The index of the first condition and parameter pair is "0".

  After adding action to a `START_PROCESS` trigger, `TriggerDef.getActionCount` always returns 0.

  The param value represents the name of an arrow so it must not be longer than specified by `Arrow.MAX_ARROW_NAME_LENGTH`.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Parameters:
    `param` - The parameter for the operation.
    `condition` - The condition for executing the operation with the associated parameter.
  Returns:
    The index of the evaluation order of the added condition and parameter pair.
  Throws:
    `ModelException` - Thrown when the related process definition or process instance is not in edit-mode when calling this method. Furthermore this exception is thrown when the supplied param or condition is invalid (e.g. length of value is 0) or `null`.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### getActionCount

    public int getActionCount()
                       throws ModelException

  Returns the number of actions (condition-parameter pairs) set for this trigger.

  Note: After adding a action to a trigger of type `START_PROCESS`, this method always returns 0.

  Returns:
    The number of actions specified for the trigger.
  Throws:
    `ModelException`

### deleteAction

    public void deleteAction(int index)
                      throws ModelException

  Deletes for the action, the condition and its parameters located at the specified evaluation order index. Later conditions and parameter pairs, if any, moved up in the evalution order.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Parameters:
    `index` - The evaluation order for the condition-parameter pair associated with the action.
  Throws:
    `ModelException` - Thrown when the related process definition or process instance is not in edit-mode or if the index is invalid.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### getActionParams

    public java.lang.String[] getActionParams(int index)
                                       throws ModelException

  Retrieves the parameters specified for the action of the trigger. The order of retrieved parameters matches the evaluation order of the condition-parameter pair.

  Parameters:
    `index` - The evaluation order for the condition-parameter pair associated with the action.
  Returns:
    All the parameters of the action for the trigger.
  Throws:
    `ModelException`

### getActionCondition

    public java.lang.String getActionCondition(int index)
                                        throws ModelException

  Retrieves the conditions specified for the action of the trigger. The order of retrieved conditions matches the evaluation order of the condition-parameter pair.

  Parameters:
    `index` - The evaluation order for the condition-parameter pair associated with the action.
  Returns:
    All the conditions of the action for the trigger.
  Throws:
    `ModelException`

### getHint

    public java.lang.String getHint()
                             throws ModelException

  Retrieves the user specified hint of the trigger.

  Returns:
    The hint associated with the trigger.
  Throws:
    `ModelException`

### setHint

    public void setHint(java.lang.String hint)
                 throws ModelException

  Sets the hint of the trigger.

  The length of the hint value is limited by `MAX_TRIGGER_HINT_LENGTH`.

  If the supplied hint is invalid, it will be ignored at runtime.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Parameters:
    `hint` - The hint to be associated with the trigger.
  Throws:
    `ModelException` - Thrown when the related process definition or process instance is not in edit-mode or if the supplied hint is `null` or the length exceeds the maximum limitation.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### addDataMap

    public java.lang.String addDataMap(java.lang.String dataElementName,
                                       java.lang.String eventDataIdentifier)
                                throws ModelException

  Specifies the data element to receive the value from the specified event data identifier.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Parameters:
    `dataElementName` - The name of the data element.
    `eventDataIdentifier` - The name of the data identifier from the event.
  Returns:
    The name of the data identifier previously associated with the event data identifier or null.
  Throws:
    `ModelException` - Thrown when the regarding process definition or process instance is not in edit-mode. Furthermore this exception is thrown when the dataElementName or eventDataIndentifier is invalid (e.g. length of value without blanks is 0) or `null`.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### deleteDataMap

    public void deleteDataMap(java.lang.String dataElementName)
                       throws ModelException

  Deletes the data transfer relationship for the specified event data identifier.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Parameters:
    `dataElementName` - The name of the data element.
  Throws:
    `ModelException` - Thrown when the related process definition or process instance is not in edit-mode.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### getEventElement

    public java.lang.String getEventElement(java.lang.String dataElementName)
                                     throws ModelException

  Retrieves the event data identifier, associated through a data transfer relationship, with the specified data element.

  Parameters:
    `dataElementName` - The name of the data element.
  Returns:
    The name of the associated event data identifier or null if no event element exist for the supplied name.
  Throws:
    `ModelException`

### getDataElement

    public java.lang.String getDataElement(java.lang.String eventDataIdentifier)
                                    throws ModelException

  Retrieves the data element, associated through a data transfer relationship, with the specified event data identifier.

  Parameters:
    `eventDataIdentifier` - The name of the data identifier from the event.
  Returns:
    The name of the associated data element or `null` if no data element exist for the supplied identifier.
  Throws:
    `ModelException`

### getDataMap

    public java.util.Hashtable getDataMap()
                                   throws ModelException

  Retrieves all of the data transfer relations for the trigger. The returned map is keyed by data element names. Manipulating this map does not affect the data transfer relationships that have already been set for this trigger.

  Returns:
    All the data transfer relationships defined for the trigger.
  Throws:
    `ModelException`

### clearDataMap

    public void clearDataMap()
                      throws ModelException

  Removes all of the data transfer relations for the trigger.

  The process definition, this trigger definition belongs to, must be in edit-mode. Edit-mode is entered by calling `Plan.startEdit()`. If this trigger definition belongs to a process instance, structural edit-mode of that process instance is required. Structural edit-mode is entered by calling `ProcessInstance.startStructuralEdit`.

  Throws:
    `ModelException` - Thrown when the related process definition or process instance is not in edit-mode.
  See Also:
    `Plan.startEdit()`, `ProcessInstance.startStructuralEdit()`

### getPlanId

    public long getPlanId()
                   throws ModelException

  Retrieves the identifier of the process definition for which this trigger is defined.

  Returns:
    The unique identifier of process definition this trigger belongs to.
  Throws:
    `ModelException`

### getActivityId

    public long getActivityId()
                       throws ModelException

  Retrieves the identifier of the activity node for which this trigger is defined.

  Returns:
    The unique identifier of the activity node this trigger belongs to or -1 if this trigger is not defined for an activity node.
  Throws:
    `ModelException`

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD