flowable/flowable-engine · error · ActivitiException

Process ' ' has no default start activity (e.g. none start…

Error message

Process '${name}' has no default start activity (e.g. none start event), hence you cannot use 'startProcessInstanceBy...' but have to start it using one of the modeled start events (e.g. message start events).

What it means

ActivitiException thrown by ProcessDefinitionImpl.createProcessInstance when the process definition has no 'initial' start activity. Processes modeled only with non-none start events (message, signal, timer) have no default start, so startProcessInstanceBy... cannot be used. The engine points the caller at starting via the modeled start events instead.

Solutions

  1. Start the process with the appropriate API: e.g. RuntimeService.startProcessInstanceByMessage(...) for a message start event, or wait for the timer/signal.
  2. Add a none start event to the BPMN model if API-started instances are desired.
  3. Deploy/choose a process version that has a none start event.

Example fix

// before
runtimeService.startProcessInstanceByKey("orderProcess"); // only message start event
// after
runtimeService.startProcessInstanceByMessage("newOrderMessage", businessKey, variables);
Defensive patterns

Strategy: validation

Validate before calling

org.flowable.engine.RepositoryService rs = ...;
ProcessDefinition pd = rs.createProcessDefinitionQuery().processDefinitionKey(key).latestVersion().singleResult();
BpmnModel model = rs.getBpmnModel(pd.getId());
Process proc = model.getMainProcess();
boolean hasNoneStart = proc.findFlowElementsOfType(StartEvent.class).stream()
    .anyMatch(se -> se.getEventDefinitions().isEmpty());
if (!hasNoneStart) {
  // start via message/signal/timer API instead of startProcessInstanceByKey
}

Try / catch

try {
  runtimeService.startProcessInstanceByKey(key, businessKey, vars);
} catch (ActivitiException e) {
  if (e.getMessage() != null && e.getMessage().contains("no default start activity")) {
    // fall back to the modeled message start
    runtimeService.startProcessInstanceByMessage(startMessageName, businessKey, vars);
  } else {
    throw e;
  }
}

Prevention

When it happens

Trigger: Calling startProcessInstanceByKey/Id (which invokes createProcessInstance()) on a deployed process whose model contains no none start event.

Common situations: BPMN processes that begin only with a message/timer/signal start event, and someone tries to start them with RuntimeService.startProcessInstanceByKey(...).

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/pvm/process/ProcessDefinitionImpl.java:50

    private static final long serialVersionUID = 1L;

    protected String name;
    protected String key;
    protected String description;
    protected ActivityImpl initial;
    protected Map<ActivityImpl, List<ActivityImpl>> initialActivityStacks = new HashMap<>();
    protected List<LaneSet> laneSets;
    protected ParticipantProcess participantProcess;

    public ProcessDefinitionImpl(String id) {
        super(id, null);
        processDefinition = this;
    }

    @Override
    public PvmProcessInstance createProcessInstance() {
        if (initial == null) {
            throw new ActivitiException(
                    "Process '" + name + "' has no default start activity (e.g. none start event), hence you cannot use 'startProcessInstanceBy...' but have to start it using one of the modeled start events (e.g. message start events).");
        }
        return createProcessInstanceForInitial(initial);
    }

    /**
     * creates a process instance using the provided activity as initial
     */
    public PvmProcessInstance createProcessInstanceForInitial(ActivityImpl initial) {

        if (initial == null) {
            throw new ActivitiException("Cannot start process instance, initial activity where the process instance should start is null.");
        }

        InterpretableExecution processInstance = newProcessInstance(initial);
        processInstance.setProcessDefinition(this);
        processInstance.setProcessInstance(processInstance);
        processInstance.initialize();

View on GitHub (pinned to d6d39ce1c6)