{"record":{"id":"a7e52178c035c39e","repo":"flowable/flowable-engine","slug":"operation-is-not-supported","errorCode":null,"errorMessage":"Operation is not supported","messagePattern":"Operation is not supported","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/BaseHistoricTaskLogEntryBuilderImpl.java","lineNumber":201,"sourceCode":"    @Override\n    public String getSubScopeId() {\n        return subScopeId;\n    }\n\n    @Override\n    public String getScopeType() {\n        return scopeType;\n    }\n\n    @Override\n    public String getTenantId() {\n        return tenantId;\n    }\n\n    @Override\n    public void create() {\n        // add is not supported by default\n        throw new RuntimeException(\"Operation is not supported\");\n    }\n}\n","sourceCodeStart":183,"sourceCodeEnd":204,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-task-service/src/main/java/org/flowable/task/service/impl/BaseHistoricTaskLogEntryBuilderImpl.java#L183-L204","documentation":"BaseHistoricTaskLogEntryBuilderImpl is the base builder for historic task log entries; its create() method is intentionally unsupported — concrete subclasses are expected to implement persistence. Calling create() directly on the base builder (or a subclass that does not override it) always throws this RuntimeException with the message 'Operation is not supported'.","triggerScenarios":"Calling create() on a HistoricTaskLogEntryBuilder obtained as BaseHistoricTaskLogEntryImpl's default builder (e.g. taskService.getBaseHistoricTaskLogEntryBuilder() or a subclass that didn't override create()), instead of a concrete implementation wired to a CommandExecutor.","commonSituations":"Using an internal builder implementation directly because of an import/refactor to the impl package; custom subclass of BaseHistoricTaskLogEntryBuilderImpl that forgot to override create(); upgrading Flowable where the default create() changed to throw.","solutions":["Use the public API builder (taskService.createHistoricTaskLogEntryBuilder(taskId)) which returns a fully functional implementation, not the base impl class.","If you subclass BaseHistoricTaskLogEntryBuilderImpl, override create() to execute the persistence command via the CommandExecutor.","Check imports — reference the interface HistoricTaskLogEntryBuilder, not BaseHistoricTaskLogEntryBuilderImpl, so the right implementation is used."],"exampleFix":"// before\nBaseHistoricTaskLogEntryBuilderImpl builder = new BaseHistoricTaskLogEntryBuilderImpl();\nbuilder.create(); // RuntimeException: Operation is not supported\n\n// after\nHistoricTaskLogEntryBuilder builder =\n    taskService.createHistoricTaskLogEntryBuilder(taskId)\n        .type(HistoricTaskLogEntryType.USER_MODIFIED)\n        .data(\"field\", \"assignee\");\nbuilder.create(); // persists via the concrete implementation","handlingStrategy":"try-catch","validationCode":"if (builder instanceof BaseHistoricTaskLogEntryBuilderImpl) {\n    throw new IllegalStateException(\"Use taskService.createHistoricTaskLogEntryBuilder instead of the base impl class\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    builder.create();\n} catch (RuntimeException e) {\n    if (\"Operation is not supported\".equals(e.getMessage())) {\n        // switch to the concrete service-provided builder\n    }\n}","preventionTips":["Always obtain the builder from TaskService public API, not by instantiating impl classes","Program against the HistoricTaskLogEntryBuilder interface","When subclassing the base impl, always override create()"],"tags":["unsupported-operation","builder","task-history","api-misuse"],"backgroundTag":"method-not-implemented","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}