flowable/flowable-engine · error · FlowableException

No start element found with id

Error message

No start element found with id ${startEventId} for process definition ${id}

What it means

Thrown when a caller explicitly requests a specific start event via startEventId, but process.getFlowElement(startEventId) finds no flow element with that id in the parsed BPMN model. Flowable only proceeds if the supplied id resolves to an existing flow element.

Solutions

  1. Open the deployed BPMN XML and use the exact id attribute of the desired <startEvent> element.
  2. Verify with RepositoryService/BpmnModel: repositoryService.getBpmnModel(definitionId).getMainProcess().getFlowElement(id) before starting.
  3. Pass null/empty startEventId if you just want the default (initial) start event.
  4. Redeploy a corrected BPMN model if the start event id is genuinely missing.

Example fix

// before
runtimeService.startProcessInstanceByKey("order", "start", vars); // 'start' is the name, not id
// after
// <startEvent id="startEvent1" name="start" .../>
runtimeService.startProcessInstanceByKey("order", "startEvent1", vars);
Defensive patterns

Strategy: validation

Validate before calling

BpmnModel model = repositoryService.getBpmnModel(definitionId);
FlowElement el = model.getMainProcess().getFlowElement(startEventId);
if (!(el instanceof StartEvent)) {
    throw new IllegalArgumentException(startEventId + " is not a start event id in definition " + definitionId);
}

Type guard

public static boolean isStartEvent(BpmnModel model, String id) {
    return model != null && model.getMainProcess() != null
        && model.getMainProcess().getFlowElement(id) instanceof org.flowable.bpmn.model.StartEvent;
}

Try / catch

try {
    runtimeService.startProcessInstanceById(defId, businessKey, startEventId, vars);
} catch (FlowableException e) {
    if (e.getMessage().startsWith("No start element found")) {
        throw new IllegalArgumentException("Unknown startEventId: " + startEventId, e);
    }
    throw e;
}

Prevention

When it happens

Trigger: RuntimeService.startProcessInstanceByKey/ById variants that accept a startEventId (e.g. startProcessInstanceById(definitionId, businessKey, startEventId, variables)) with an id that does not exist anywhere in the process model.

Common situations: Typo in the start event id; referencing the start event's name instead of its id; the BPMN file was edited/renamed and the caller still uses the old id; caller assumes the 'StartEvent_1' generated id of another process.

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


AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11). Data as JSON: /api/errors/91aa866091e2c7de. Report an issue: GitHub.

Appendix: source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/util/ProcessInstanceHelper.java:101

                    variables, transientVariables, businessKey, processDefinition.getTenantId(), processInstanceName);
        }

        // Do not start process a process instance if the process definition is suspended
        if (ProcessDefinitionUtil.isProcessDefinitionSuspended(processDefinition.getId())) {
            throw new FlowableException("Cannot start process instance. Process definition " + processDefinition.getName() + " (id = " + processDefinition.getId() + ") is suspended");
        }

        // Get model from cache
        Process process = ProcessDefinitionUtil.getProcess(processDefinition.getId());
        if (process == null) {
            throw new FlowableException("Cannot start process instance. Process model " + processDefinition.getName() + " (id = " + processDefinition.getId() + ") could not be found");
        }
        
        FlowElement initialFlowElement = null;
        if (StringUtils.isNotEmpty(startEventId)) {
            FlowElement startEventFlowElement = process.getFlowElement(startEventId);
            if (startEventFlowElement == null) {
                throw new FlowableException("No start element found with id " + startEventId + " for process definition " + processDefinition.getId());
            }
            
            if (!(startEventFlowElement instanceof StartEvent)) {
                throw new FlowableException("Provide start event id is not a start event " + startEventId + " for process definition " + processDefinition.getId());
            }
            
            initialFlowElement = startEventFlowElement;
            
        } else {
            initialFlowElement = process.getInitialFlowElement();
        }
        
        if (initialFlowElement == null) {
            throw new FlowableException("No start element found for process definition " + processDefinition.getId());
        }

        return createAndStartProcessInstanceWithInitialFlowElement(processDefinition, businessKey, businessStatus, processInstanceName,
                overrideDefinitionTenantId,

View on GitHub (pinned to d6d39ce1c6)