{"record":{"id":"93199937ae050cd4","repo":"kestra-io/kestra","slug":"triggerexecutionid-is-not-defined","errorCode":null,"errorMessage":"triggerExecutionId is not defined","messagePattern":"triggerExecutionId is not defined","errorType":"exception","errorClass":"IllegalStateException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/io/kestra/core/runners/DefaultRunContext.java","lineNumber":99,"sourceCode":"\n    private volatile AssetEmitter assetEmitter;\n\n    private final AtomicBoolean isInitialized = new AtomicBoolean(false);\n\n    /**\n     * Creates a new {@link DefaultRunContext} instance.\n     */\n    public DefaultRunContext() {\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    @JsonIgnore\n    public String getTriggerExecutionId() {\n        if (this.triggerExecutionId == null) {\n            throw new IllegalStateException(\"triggerExecutionId is not defined\");\n        }\n        return triggerExecutionId;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    @JsonInclude\n    public Map<String, Object> getVariables() {\n        return variables;\n    }\n\n    /**\n     * {@inheritDoc}\n     */\n    @Override\n    @JsonInclude","sourceCodeStart":81,"sourceCodeEnd":117,"githubUrl":"https://github.com/kestra-io/kestra/blob/823fada9274c4f9c251ea0a516460a4f7d958032/core/src/main/java/io/kestra/core/runners/DefaultRunContext.java#L81-L117","documentation":"Error \"triggerExecutionId is not defined\" thrown in kestra-io/kestra.","triggerScenarios":"Thrown at core/src/main/java/io/kestra/core/runners/DefaultRunContext.java:99 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["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."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"823fada9274c4f9c251ea0a516460a4f7d958032","analyzedAt":"2026-08-14T06:15:17.947Z","schemaVersion":2},"datasetVersion":"2026-08-14T10:17:34.591Z"}