{"record":{"id":"6d5e89752bbb71a2","repo":"flowable/flowable-engine","slug":"no-taskformhandler-specified-for","errorCode":null,"errorMessage":"No taskFormHandler specified for '","messagePattern":"No taskFormHandler specified for '","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/GetTaskFormCmd.java","lineNumber":61,"sourceCode":"    }\n\n    @Override\n    public TaskFormData execute(CommandContext commandContext) {\n        ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);\n        TaskEntity task = processEngineConfiguration.getTaskServiceConfiguration().getTaskService().getTask(taskId);\n        if (task == null) {\n            throw new FlowableObjectNotFoundException(\"No task found for taskId '\" + taskId + \"'\", Task.class);\n        }\n        \n        if (task.getProcessDefinitionId() != null && Flowable5Util.isFlowable5ProcessDefinitionId(commandContext, task.getProcessDefinitionId())) {\n            Flowable5CompatibilityHandler compatibilityHandler = Flowable5Util.getFlowable5CompatibilityHandler();\n            return compatibilityHandler.getTaskFormData(taskId);\n        }\n\n        FormHandlerHelper formHandlerHelper = processEngineConfiguration.getFormHandlerHelper();\n        TaskFormHandler taskFormHandler = formHandlerHelper.getTaskFormHandlder(task);\n        if (taskFormHandler == null) {\n            throw new FlowableException(\"No taskFormHandler specified for '\" + task + \"'\");\n        }\n\n        return taskFormHandler.createTaskForm(task);\n    }\n\n}\n","sourceCodeStart":43,"sourceCodeEnd":68,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/GetTaskFormCmd.java#L43-L68","documentation":"After locating the task, GetTaskFormCmd asks FormHandlerHelper for the task's TaskFormHandler (derived from the process definition's StartFormHandler/FormHandler wiring). If the resolved handler is null it throws FlowableException, meaning the underlying process definition has no task form handler configured for this task.","triggerScenarios":"Calling taskService.getTaskForm(taskId) where the task's process definition (BPMN XML) defines no form key/form handler for the user task, so getTaskFormHandlder(task) returns null.","commonSituations":"BPMN model deployed without flowable:formKey (or formHandlerClass) on the user task; custom FormHandler misconfigured or not registered; process definition deployed by an older model version lacking form metadata.","solutions":["Add a form definition to the user task in the BPMN XML (flowable:formKey / formField / formHandlerClass) and redeploy the process definition","Verify FormHandlerHelper / custom form handler configuration in the process engine config","Re-fetch the form only for tasks whose process definition actually declares a form; check task.getFormKey() first","Deploy a corrected version of the model if the existing definition is missing form metadata"],"exampleFix":"<!-- before -->\n<userTask id=\"approve\" name=\"Approve\" />\n<!-- after -->\n<userTask id=\"approve\" name=\"Approve\" flowable:formKey=\"approveForm\" />","handlingStrategy":"validation","validationCode":"TaskFormData task = taskService.createTaskQuery().taskId(taskId).singleResult();\nboolean hasForm = task != null && task.getFormKey() != null;","typeGuard":null,"tryCatchPattern":"try {\n    TaskFormData form = taskService.getTaskForm(taskId);\n} catch (FlowableException e) {\n    if (e.getMessage().startsWith(\"No taskFormHandler specified\")) {\n        // process definition lacks a form for this task\n        form = null;\n    } else {\n        throw e;\n    }\n}","preventionTips":["Always declare flowable:formKey or a form handler on user tasks in BPMN models","Validate deployed definitions include form metadata before exposing tasks to the UI","Keep custom FormHandler registrations consistent with the deployed model"],"tags":["java","flowable","form","configuration"],"backgroundTag":"missing-required-config-field","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}