flowable/flowable-engine · critical · FlowableException

No start element found for process definition

Error message

No start element found for process definition ${id}

What it means

Thrown when no initial flow element could be determined for the process definition — neither an explicit startEventId was given and process.getInitialFlowElement() returned null. This typically means the process model has no start event at all.

Solutions

  1. Add a <startEvent> to the BPMN model and redeploy.
  2. If building with the BpmnModel API, call process.addFlowElement(startEvent) with an initial StartEvent before deployment.
  3. If you intend a specific start event, pass its id as startEventId so it is used explicitly.
  4. Validate the process with ProcessValidator before deployment to catch start-event-less models early.

Example fix

// before (programmatic model)
Process p = new Process(); p.setId("noStart"); p.addFlowElement(new ServiceTask());
// after
StartEvent se = new StartEvent(); se.setId("start1");
p.addFlowElement(se); p.addFlowElement(new ServiceTask());
Defensive patterns

Strategy: validation

Validate before calling

BpmnModel model = repositoryService.getBpmnModel(defId);
if (model.getMainProcess().getInitialFlowElement() == null) {
    throw new IllegalStateException("Process " + defId + " has no start event — fix and redeploy");
}

Type guard

public static boolean hasStartEvent(Process process) {
    return process.getFlowElements().stream().anyMatch(fe -> fe instanceof org.flowable.bpmn.model.StartEvent);
}

Try / catch

try {
    return runtimeService.startProcessInstanceByKey(key, vars);
} catch (FlowableException e) {
    if (e.getMessage().startsWith("No start element found")) {
        throw new IllegalStateException("Deployed model for '" + key + "' lacks a start event", e);
    }
    throw e;
}

Prevention

When it happens

Trigger: Calling createProcessInstance via RuntimeService.startProcessInstance* for a deployed BPMN model that contains no <startEvent> (or one that the model parser could not register as initial), without specifying a startEventId.

Common situations: Hand-written BPMN XML missing the start event; a model built programmatically (BpmnModel API) without addFlowElement of a StartEvent; processes designed only with signal/message start events where the parser found none applicable as initial; importing diagrams from external tools that drop the start event.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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

Appendix: source

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

        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,
                predefinedProcessInstanceId, initialFlowElement, process, variables, transientVariables,
                callbackId, callbackType, referenceId, referenceType, ownerId, assigneeId, stageInstanceId, startProcessInstance);
    }

    public ProcessInstance createAndStartProcessInstanceByMessage(ProcessDefinition processDefinition, String messageName, String businessKey,
            String businessStatus, Map<String, Object> variables, Map<String, Object> transientVariables, String callbackId, String callbackType,
            String referenceId, String referenceType, String ownerId, String assigneeId) {

        CommandContext commandContext = Context.getCommandContext();
        if (Flowable5Util.isFlowable5ProcessDefinition(processDefinition, commandContext)) {
            return CommandContextUtil.getProcessEngineConfiguration(commandContext).getFlowable5CompatibilityHandler().startProcessInstanceByMessage(
                    messageName, variables, transientVariables, businessKey, processDefinition.getTenantId());
        }

View on GitHub (pinned to d6d39ce1c6)