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 TriggerResult

All Superinterfaces:
  java.io.Serializable

public interface TriggerResult
extends java.io.Serializable

This interface defines the results of trigger handling applied to an incoming Event XML.

The process of trigger events is a user operation that can be started by calling the method `WFObjectFactory.processTriggerEvent`. The returned `TriggerResult` represents the result of that operation. As trigger handling is a batch job, so at the end of the operation, some or all triggers will be successfully processed.

User can iterate through a `TriggerResult` to see what trigger was successfully handled.

See Also:
  `WFObjectFactory`

Nested Class Summary
`static interface` | `TriggerResult.TriggerChoiceMade` This interface provides some basic information about triggers of the type `TriggerDef.MAKE_CHOICE`.

Method Summary
`TriggerResult.TriggerChoiceMade[]` | `getChoicesMade()` Returns an array of `TriggerChoiceMade` objects for all triggers of the type `TriggerDef.MAKE_CHOICE` that were invoked on this Event XML data.
`java.lang.Exception[]` | `getExceptions()` Returns a list of exceptions in case of failure.
`long[]` | `getStartedProcessInstanceIds()` Returns an array of process instance IDs for triggers of the type `TriggerDef.START_PROCESS` that were invoked on this Event XML data.
`boolean` | `succeeded()` Indicates whether the Event Data was successfully processed by the rigger handler.
`boolean` | `wasEventParseError()` Indicates if there was a parsing error on the Event XML data.
`boolean` | `wasTriggerEvaluationError()` Indicates whether the evaluation of the trigger ends with an error.

Method Detail

### succeeded

    public boolean succeeded()

  Indicates whether the Event Data was successfully processed by the rigger handler.

  The Event Data were only successfully processed if the parsing was successful and if there was no error within the evaluation. This means, the following combination is checked:

       successful = !TriggerResult.wasEventParseError() && !TriggerResult.wasTriggerEvaluationError();

  Returns:
    `true` if the Event Data were successfully processed. `false` otherwise.

### wasEventParseError

    public boolean wasEventParseError()

  Indicates if there was a parsing error on the Event XML data.

  Returns:
    `false` if the Event XML was parsed and validated successfully; `true` otherwise.

### wasTriggerEvaluationError

    public boolean wasTriggerEvaluationError()

  Indicates whether the evaluation of the trigger ends with an error.

  If there are a dozen triggers defined in the system, the trigger handler will apply the Event XML data to all of these. If the evaluation of any single trigger definition results in an error, then this will return `true`.

  Even if a trigger evaluation error occurs, the trigger handler will continue to apply the XML data to other trigger definitions in the system.

  Returns:
    `true` if evaluation of one or more trigger definitions failed on this Event XML data; `false` otherwise.

### getStartedProcessInstanceIds

    public long[] getStartedProcessInstanceIds()

  Returns an array of process instance IDs for triggers of the type `TriggerDef.START_PROCESS` that were invoked on this Event XML data.

  Returns:
    The unique identifiers process instances. If no process instances were started, an empty array is returned.

### getExceptions

    public java.lang.Exception[] getExceptions()

  Returns a list of exceptions in case of failure.

  Returns:
    The exceptions occurred. In case there were no exceptions, an empty array is returned.

### getChoicesMade

    public TriggerResult.TriggerChoiceMade[] getChoicesMade()

  Returns an array of `TriggerChoiceMade` objects for all triggers of the type `TriggerDef.MAKE_CHOICE` that were invoked on this Event XML data.

  Returns:
    The `TriggerChoiceMade` objects. If no choices were made, an empty array is returned.

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