{"record":{"id":"41c1c6ae3a77cf16","repo":"flowable/flowable-engine","slug":"no-startformhandler-defined-in-process","errorCode":null,"errorMessage":"No startFormHandler defined in process ''","messagePattern":"No startFormHandler defined in process ''","errorType":"exception","errorClass":"ActivitiException","httpStatus":null,"severity":"error","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/cmd/GetStartFormCmd.java","lineNumber":51,"sourceCode":"    protected String processDefinitionId;\n\n    public GetStartFormCmd(String processDefinitionId) {\n        this.processDefinitionId = processDefinitionId;\n    }\n\n    @Override\n    public StartFormData execute(CommandContext commandContext) {\n        ProcessDefinitionEntity processDefinition = (ProcessDefinitionEntity) commandContext\n                .getProcessEngineConfiguration()\n                .getDeploymentManager()\n                .findDeployedProcessDefinitionById(processDefinitionId);\n        if (processDefinition == null) {\n            throw new ActivitiObjectNotFoundException(\"No process definition found for id '\" + processDefinitionId + \"'\", ProcessDefinition.class);\n        }\n\n        StartFormHandler startFormHandler = processDefinition.getStartFormHandler();\n        if (startFormHandler == null) {\n            throw new ActivitiException(\"No startFormHandler defined in process '\" + processDefinitionId + \"'\");\n        }\n\n        return startFormHandler.createStartFormData(processDefinition);\n    }\n}\n","sourceCodeStart":33,"sourceCodeEnd":57,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/cmd/GetStartFormCmd.java#L33-L57","documentation":"Deployment resolution failure in flowable5 GetStartFormCmd.execute: the process definition was deployed, but its parsed definition carries no startFormHandler (no start form defined in the BPMN), so no start form data can be returned.","triggerScenarios":"Calling FormService.getStartForm(processDefinitionId) on a definition whose <startEvent> carries no formKey/formHandler mapping and no default StartFormHandler was resolved during parsing.","commonSituations":"Deploying a BPMN without flowable:formKey on the start event and then querying its start form; relying on a FormHandler that was removed in a config/parser change; mixed engine versions where the parser no longer sets the handler.","solutions":["Add form metadata to the start event in the BPMN (flowable:formKey or a start form handler) and redeploy.","Check startFormHandler is configured (default DefaultStartFormHandler is normally always set — verify parser configuration wasn't overridden).","Guard the caller: only call getStartForm for definitions known to declare a start form.","If no form is needed, treat the null-returning rendered-form command or a query-first approach as the guard."],"exampleFix":"// before\n<startEvent id=\"start\" /> <!-- no form -->\n// after\n<startEvent id=\"start\" flowable:formKey=\"startForm\" flowable:initiator=\"initiator\" />","handlingStrategy":"validation","validationCode":"StartFormData data = null;\ntry {\n    data = formService.getStartForm(processDefinitionId);\n} catch (ActivitiException e) {\n    if (e.getMessage().startsWith(\"No startFormHandler\")) {\n        data = null; // definition declares no start form\n    }\n}","typeGuard":null,"tryCatchPattern":"try {\n    formService.getStartForm(pdId);\n} catch (ActivitiException e) {\n    if (e.getMessage().contains(\"No startFormHandler defined\")) {\n        // no start form declared — show default UI\n    }\n}","preventionTips":["Declare flowable:formKey on every start event that needs a form","Redeploy after changing form metadata","Document which process definitions intentionally have no start form"],"tags":["start-form","form-handler","workflow","bpmn"],"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-14T05:17:10.506Z"}