{"record":{"id":"36e01c3689c88feb","repo":"flowable/flowable-engine","slug":"no-processdefinitionid-processdefinitionkey-nor-m","errorCode":null,"errorMessage":"No processDefinitionId, processDefinitionKey nor messageName provided","messagePattern":"No processDefinitionId, processDefinitionKey nor messageName provided","errorType":"validation","errorClass":"FlowableIllegalArgumentException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/RuntimeServiceImpl.java","lineNumber":882,"sourceCode":"    }\n\n    @Override\n    public Execution addMultiInstanceExecution(String activityId, String parentExecutionId, Map<String, Object> executionVariables) {\n        return commandExecutor.execute(new AddMultiInstanceExecutionCmd(activityId, parentExecutionId, executionVariables));\n    }\n\n    @Override\n    public void deleteMultiInstanceExecution(String executionId, boolean executionIsCompleted) {\n        commandExecutor.execute(new DeleteMultiInstanceExecutionCmd(executionId, executionIsCompleted));\n    }\n\n    public ProcessInstance startProcessInstance(ProcessInstanceBuilderImpl processInstanceBuilder) {\n        if (processInstanceBuilder.getProcessDefinitionId() != null || processInstanceBuilder.getProcessDefinitionKey() != null) {\n            return commandExecutor.execute(new StartProcessInstanceCmd<ProcessInstance>(processInstanceBuilder));\n        } else if (processInstanceBuilder.getMessageName() != null) {\n            return commandExecutor.execute(new StartProcessInstanceByMessageCmd(processInstanceBuilder));\n        } else {\n            throw new FlowableIllegalArgumentException(\"No processDefinitionId, processDefinitionKey nor messageName provided\");\n        }\n    }\n\n    public ProcessInstance startProcessInstanceAsync(ProcessInstanceBuilderImpl processInstanceBuilder) {\n        if (processInstanceBuilder.getProcessDefinitionId() != null || processInstanceBuilder.getProcessDefinitionKey() != null) {\n            return (ProcessInstance) commandExecutor.execute(new StartProcessInstanceAsyncCmd(processInstanceBuilder));\n        } else {\n            throw new FlowableIllegalArgumentException(\"No processDefinitionId, processDefinitionKey provided\");\n        }\n    }\n\n    public EventSubscription registerProcessInstanceStartEventSubscription(ProcessInstanceStartEventSubscriptionBuilderImpl builder) {\n        return commandExecutor.execute(new RegisterProcessInstanceStartEventSubscriptionCmd(builder));\n    }\n\n    public void migrateProcessInstanceStartEventSubscriptionsToProcessDefinitionVersion(ProcessInstanceStartEventSubscriptionModificationBuilderImpl builder) {\n        commandExecutor.execute(new ModifyProcessInstanceStartEventSubscriptionCmd(builder));\n    }","sourceCodeStart":864,"sourceCodeEnd":900,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/RuntimeServiceImpl.java#L864-L900","documentation":"startProcessInstance requires the builder to identify the process definition by id or key, or a message name to start by message. If none is set, the engine cannot determine what to start and throws FlowableIllegalArgumentException.","triggerScenarios":"Calling RuntimeService.startProcessInstance(builder) with a ProcessInstanceBuilderImpl on which none of processDefinitionId, processDefinitionKey, or messageName was set (e.g. only business key or variables were configured).","commonSituations":"Conditionally populating the builder where all branches failed; building the builder from config where the deployment key property is missing; typo between key/id fields.","solutions":["Set processDefinitionKey (or processDefinitionId) on the builder: runtimeService.createProcessInstanceBuilder().processDefinitionKey(\"myProcess\")","If starting by message, call messageName(...) on the builder","Verify the configuration/property feeding the builder is actually populated"],"exampleFix":"// before\nProcessInstance pi = runtimeService.startProcessInstance(\n    runtimeService.createProcessInstanceBuilder().businessKey(bk));\n// after\nProcessInstance pi = runtimeService.startProcessInstance(\n    runtimeService.createProcessInstanceBuilder().processDefinitionKey(\"orderProcess\").businessKey(bk));","handlingStrategy":"validation","validationCode":"ProcessInstanceBuilderImpl b = runtimeService.createProcessInstanceBuilder();\nif (b.getProcessDefinitionId() == null && b.getProcessDefinitionKey() == null && b.getMessageName() == null) {\n    throw new IllegalArgumentException(\"Provide processDefinitionId, processDefinitionKey or messageName\");\n}\nruntimeService.startProcessInstance(b);","typeGuard":null,"tryCatchPattern":"try {\n    runtimeService.startProcessInstance(builder);\n} catch (FlowableIllegalArgumentException e) {\n    log.error(\"Process start misconfigured: {}\", e.getMessage());\n    throw new ConfigurationException(e);\n}","preventionTips":["Always set processDefinitionKey when building the builder","Centralize builder construction in one factory method","Validate config that feeds builder fields at startup"],"tags":["java","flowable","process-instance","builder"],"backgroundTag":"missing-required-argument","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"}