@ Override public TriggerInstance getTriggerInstanceByFlowExecId ( final int flowExecId ) { if ( flowExecId == Constants . FAILED_EXEC_ID || flowExecId == Constants . UNASSIGNED_EXEC_ID ) { return null ; } TriggerInstance triggerInstance = null ; try { final Collection < TriggerInstance > res = this . dbOperator . query ( SELECT_EXECUTIONS_BY_EXEC_ID , new TriggerInstanceHandler ( SORT_MODE . SORT_ON_START_TIME_ASC ) , flowExecId ) ; triggerInstance = ! res . isEmpty ( ) ? res . iterator ( ) . next ( ) : null ; } catch ( final SQLException ex ) { handleSQLException ( ex ) ; } populateFlowTriggerProperties ( triggerInstance ) ; return triggerInstance ; }
Retrieve a trigger instance given a flow execution id . Flow trigger properties will also be populated into the returned trigger instance . If flow exec id is - 1 or - 2 then null will be returned .