flowable/flowable-engine · error · FlowableObjectNotFoundException
Form with formKey '" + formKey + "' does not exist
Error message
Form with formKey '" + formKey + "' does not exist
What it means
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.
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
Example fix
// before <flowable:form flowable:key="approv-form" /> // file is approval.form // after <flowable:form flowable:key="approval.form" /> <!-- matches deployed resource -->
Defensive patterns
Strategy: validation
Validate before calling
Resource r = repositoryService.getResourceAsStream(deploymentId, formKey); // or check DeploymentQuery/resource exists before rendering
Try / catch
try { return formService.getRenderedTaskForm(taskId); } catch (FlowableObjectNotFoundException e) { if (String.class.equals(e.getObjectClass())) { /* fallback form or alert deployment packaging */ } else throw e; } Prevention
- Package form template files in the BAR and verify resource names match formKeys
- Add a deployment test that renders every task form
When it happens
Trigger: Calling TaskService.getTaskFormModel / FormService.getRenderedForm with a formKey pointing to a template file not present in the process deployment.
Common situations: 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.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- Could not find a deployment with id ''.
- Could not find a deployment with id '" + deploymentId + "'.
- Could not find a resource with id
- Could not find an app deployment with id
- Could not find deployment with id
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/1de6a960cbedd673.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/form/JuelFormEngine.java:79
ExecutionEntity executionEntity = null;
if (task.getExecutionId() != null) {
executionEntity = CommandContextUtil.getExecutionEntityManager().findById(task.getExecutionId());
}
ScriptEngineRequest.Builder builder = ScriptEngineRequest.builder()
.script(formTemplateString)
.language(ScriptingEngines.DEFAULT_SCRIPTING_LANGUAGE)
.scopeContainer(executionEntity);
return scriptingEngines.evaluate(builder.build()).getResult();
}
protected String getFormTemplateString(FormData formInstance, String formKey) {
String deploymentId = formInstance.getDeploymentId();
ResourceEntity resourceStream = CommandContextUtil.getResourceEntityManager().findResourceByDeploymentIdAndResourceName(deploymentId, formKey);
if (resourceStream == null) {
throw new FlowableObjectNotFoundException("Form with formKey '" + formKey + "' does not exist", String.class);
}
return new String(resourceStream.getBytes(), StandardCharsets.UTF_8);
}
}
View on GitHub (pinned to d6d39ce1c6)