JobInterruptOptions: {
    code?: number;
    descend?: boolean;
    expire?: number;
    onEscalationsCancelled?: ((entries: any[]) => void);
    reason?: string;
    stack?: string;
    suppress?: boolean;
    throw?: boolean;
}

Type declaration

  • Optionalcode?: number

    Optional Error Code; will be used as the error code when thrown

    410
    
  • Optionaldescend?: boolean

    Reserved for future use: interrupt child/descendant jobs. This flag is parsed and threaded through the engine call chain but is not yet implemented — child workflows are not interrupted when this is set. Do not rely on it.

    false
    
  • Optionalexpire?: number

    how long to wait in seconds before fully softdeleting the job; the job is inactive, but can remain in the cache indefinitely;

    1 second.
    
  • OptionalonEscalationsCancelled?: ((entries: any[]) => void)

    Fires synchronously inside store.interrupt() after the single transaction that decrements the job semaphore AND cancels pending escalations commits. Only used by WorkflowHandleService.terminate() to emit local events without a second transaction or a separate query.

      • (entries): void
      • Parameters

        • entries: any[]

        Returns void

  • Optionalreason?: string

    optional Reason; will be used as the error message when thrown

    'Job Interrupted'
    
  • Optionalstack?: string

    Optional stack trace

  • Optionalsuppress?: boolean

    if true, errors related to inactivation (like overage...already inactive) are suppressed/ignored

    false
    
  • Optionalthrow?: boolean

    throw JobInterrupted error upon interrupting

    true