public void cancelTriggerInstance(final TriggerInstance triggerInst,
      final CancellationCause cause) {
    if (triggerInst.getStatus() == Status.RUNNING) {
      this.flowTriggerExecutorService.submit(() -> cancel(triggerInst, cause));
    }
  }
public void cancelTriggerInstance ( final TriggerInstance triggerInst , final CancellationCause cause ) { if ( triggerInst . getStatus ( ) == Status . RUNNING ) { this . flowTriggerExecutorService . submit ( ( ) -> cancel ( triggerInst , cause ) ) ; } }
Cancel a trigger instance

@param triggerInst trigger instance to be cancelled
@param cause cause of cancelling