kestra-io/kestra · error · IllegalStateException

triggerExecutionId is not defined

Error message

triggerExecutionId is not defined

What it means

Error "triggerExecutionId is not defined" thrown in kestra-io/kestra.

Source

Thrown at core/src/main/java/io/kestra/core/runners/DefaultRunContext.java:99

    private volatile AssetEmitter assetEmitter;

    private final AtomicBoolean isInitialized = new AtomicBoolean(false);

    /**
     * Creates a new {@link DefaultRunContext} instance.
     */
    public DefaultRunContext() {
    }

    /**
     * {@inheritDoc}
     */
    @Override
    @JsonIgnore
    public String getTriggerExecutionId() {
        if (this.triggerExecutionId == null) {
            throw new IllegalStateException("triggerExecutionId is not defined");
        }
        return triggerExecutionId;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    @JsonInclude
    public Map<String, Object> getVariables() {
        return variables;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    @JsonInclude

View on GitHub (pinned to 823fada927)

Solutions

  1. Only call this in a context where a trigger execution exists (a flow started by a Flow trigger); otherwise guard the usage or provide the execution id explicitly.

When it happens

Trigger: Thrown at core/src/main/java/io/kestra/core/runners/DefaultRunContext.java:99 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of kestra-io/kestra@823fada927 (2026-08-14). Data as JSON: /api/errors/93199937ae050cd4. Report an issue: GitHub.