{"record":{"id":"56787ad526527a31","repo":"flowable/flowable-engine","slug":"processdefinition-processdefinitionid-does-not-e","errorCode":null,"errorMessage":"ProcessDefinition <processDefinitionId> does not exists","messagePattern":"ProcessDefinition <processDefinitionId> does not exists","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-engine/src/main/java/org/flowable/engine/impl/DynamicBpmnServiceImpl.java","lineNumber":463,"sourceCode":"    }\n\n    @Override\n    public void resetProperty(String elementId, String property, ObjectNode infoNode) {\n        ObjectNode path = (ObjectNode) infoNode.path(BPMN_NODE).path(elementId);\n        if (!path.isMissingNode()) {\n            path.remove(property);\n        }\n    }\n\n    @Override\n    public DynamicProcessDefinitionSummary getDynamicProcessDefinitionSummary(String processDefinitionId) {\n        ObjectNode infoNode = getProcessDefinitionInfo(processDefinitionId);\n        ObjectMapper objectMapper = configuration.getObjectMapper();\n        BpmnModel bpmnModel = commandExecutor.execute(new GetBpmnModelCmd(processDefinitionId));\n\n        // aggressive exception. this method should not be called if the process definition does not exists.\n        if (bpmnModel == null) {\n            throw new FlowableException(\"ProcessDefinition \" + processDefinitionId + \" does not exists\");\n        }\n\n        // to avoid redundant null checks we create an new node\n        if (infoNode == null) {\n            infoNode = configuration.getObjectMapper().createObjectNode();\n            createOrGetBpmnNode(infoNode);\n        }\n\n        return new DynamicProcessDefinitionSummary(bpmnModel, infoNode, objectMapper);\n    }\n\n    protected void setElementProperty(String id, String propertyName, String propertyValue, ObjectNode infoNode) {\n        ObjectNode bpmnNode = createOrGetBpmnNode(infoNode);\n        if (!bpmnNode.has(id)) {\n            bpmnNode.putObject(id);\n        }\n\n        ((ObjectNode) bpmnNode.get(id)).put(propertyName, propertyValue);","sourceCodeStart":445,"sourceCodeEnd":481,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-engine/src/main/java/org/flowable/engine/impl/DynamicBpmnServiceImpl.java#L445-L481","documentation":"DynamicBpmnServiceImpl.getDynamicProcessDefinitionSummary() aggressively verifies the process definition exists by loading its BPMN model. When GetBpmnModelCmd returns null (no such process definition id), it throws FlowableException, since the method is documented as only valid for existing definitions.","triggerScenarios":"Calling getDynamicProcessDefinitionSummary with an id that was never deployed, was deleted, or contains a typo; using a stale id after redeployment with a new id; calling before the deployment transaction committed.","commonSituations":"Referenced process definition removed by a cleanup job; wrong tenant or engine instance; ids copied between test/production repositories; caching of deleted definition ids.","solutions":["Verify the id exists via repositoryService.createProcessDefinitionQuery().processDefinitionId(id).singleResult() before calling","Re-fetch the id from the repository instead of a cached/stale value","Catch FlowableException and treat it as 'definition not found' in the caller"],"exampleFix":"// before\nProcessDefinitionSummary summary = dynamicBpmnService.getDynamicProcessDefinitionSummary(id);\n// after\nif (repositoryService.createProcessDefinitionQuery().processDefinitionId(id).count() > 0) {\n    ProcessDefinitionSummary summary = dynamicBpmnService.getDynamicProcessDefinitionSummary(id);\n}","handlingStrategy":"try-catch","validationCode":"if (repositoryService.createProcessDefinitionQuery().processDefinitionId(id).count() == 0) {\n    throw new IllegalStateException(\"Unknown process definition: \" + id);\n}\nProcessDefinitionSummary s = dynamicBpmnService.getDynamicProcessDefinitionSummary(id);","typeGuard":"boolean definitionExists(String id, RepositoryService rs) {\n    return id != null && rs.createProcessDefinitionQuery().processDefinitionId(id).count() > 0;\n}","tryCatchPattern":"try {\n    summary = dynamicBpmnService.getDynamicProcessDefinitionSummary(id);\n} catch (FlowableException e) {\n    // treat as definition-not-found; refresh id or surface 404\n}","preventionTips":["Resolve definition ids from the repository at call time, not from caches","Confirm deployments exist in the target engine/tenant","Handle deleted/redeployed definitions gracefully"],"tags":["resource-not-found","process-definition","dynamic-bpmn"],"backgroundTag":"entity-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"}