{"record":{"id":"1de6a960cbedd673","repo":"flowable/flowable-engine","slug":"form-with-formkey-formkey-does-not-exist","errorCode":null,"errorMessage":"Form with formKey '\" + formKey + \"' does not exist","messagePattern":"Form with formKey '\" \\+ formKey \\+ \"' does not exist","errorType":"exception","errorClass":"FlowableObjectNotFoundException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/form/JuelFormEngine.java","lineNumber":79,"sourceCode":"        ExecutionEntity executionEntity = null;\n        if (task.getExecutionId() != null) {\n            executionEntity = CommandContextUtil.getExecutionEntityManager().findById(task.getExecutionId());\n        }\n\n        ScriptEngineRequest.Builder builder = ScriptEngineRequest.builder()\n                .script(formTemplateString)\n                .language(ScriptingEngines.DEFAULT_SCRIPTING_LANGUAGE)\n                .scopeContainer(executionEntity);\n        return scriptingEngines.evaluate(builder.build()).getResult();\n    }\n\n    protected String getFormTemplateString(FormData formInstance, String formKey) {\n        String deploymentId = formInstance.getDeploymentId();\n\n        ResourceEntity resourceStream = CommandContextUtil.getResourceEntityManager().findResourceByDeploymentIdAndResourceName(deploymentId, formKey);\n\n        if (resourceStream == null) {\n            throw new FlowableObjectNotFoundException(\"Form with formKey '\" + formKey + \"' does not exist\", String.class);\n        }\n\n        return new String(resourceStream.getBytes(), StandardCharsets.UTF_8);\n    }\n}\n","sourceCodeStart":61,"sourceCodeEnd":85,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/form/JuelFormEngine.java#L61-L85","documentation":"Thrown by JuelFormEngine.getFormTemplateString when the resource identified by the form key does not exist in the deployment that owns the form data. Flowable looks up the template file (e.g. a JUEL/HTML form) by deployment id + resource name and throws FlowableObjectNotFoundException when no resource row matches.","triggerScenarios":"Calling TaskService.getTaskFormModel / FormService.getRenderedForm with a formKey pointing to a template file not present in the process deployment.","commonSituations":"Form key typo, template file not packaged in the BAR/deployment, deploying the process without the form resource, or renaming the file after the key was authored.","solutions":["Ensure the form template file is included in the deployment (BAR) and matches the formKey exactly (case-sensitive path)","Fix the flowable:formKey / formKey reference to the actual resource name","Redeploy the application including the missing form resource"],"exampleFix":"// before\n<flowable:form flowable:key=\"approv-form\" /> // file is approval.form\n// after\n<flowable:form flowable:key=\"approval.form\" /> <!-- matches deployed resource -->","handlingStrategy":"validation","validationCode":"Resource r = repositoryService.getResourceAsStream(deploymentId, formKey); // or check DeploymentQuery/resource exists before rendering","typeGuard":null,"tryCatchPattern":"try { return formService.getRenderedTaskForm(taskId); } catch (FlowableObjectNotFoundException e) { if (String.class.equals(e.getObjectClass())) { /* fallback form or alert deployment packaging */ } else throw e; }","preventionTips":["Package form template files in the BAR and verify resource names match formKeys","Add a deployment test that renders every task form"],"tags":["flowable","form","not-found","deployment"],"backgroundTag":"resource-not-found","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"}