flowable/flowable-engine · error · FlowableException
Cannot trigger ${execution} : no current flow element found.
Error message
Cannot trigger ${execution} : no current flow element found. Check the execution id that is being passed (it should not be a process instance execution, but a child execution currently referencing a flow element). What it means
Flowable's TriggerExecutionOperation fires a signal on an execution, but the execution's currentFlowElement is null. This means the trigger was sent to an execution that is not positioned at an activity (e.g. the root process-instance execution, or a concurrent/child execution that has no current flow element). The library throws instead of silently ignoring a trigger on the wrong execution.
Source
Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/agenda/TriggerExecutionOperation.java:79
} else {
ProcessEngineConfigurationImpl processEngineConfiguration = CommandContextUtil.getProcessEngineConfiguration(commandContext);
JobService jobService = processEngineConfiguration.getJobServiceConfiguration().getJobService();
JobEntity job = JobUtil.createJob(execution, currentFlowElement, AsyncTriggerJobHandler.TYPE, processEngineConfiguration);
jobService.createAsyncJob(job, true);
jobService.scheduleAsyncJob(job);
}
} else {
throw new FlowableException("Cannot trigger " + execution
+ " : the activityBehavior " + activityBehavior.getClass() + " does not implement the "
+ TriggerableActivityBehavior.class.getName() + " interface");
}
} else if (currentFlowElement == null) {
throw new FlowableException("Cannot trigger " + execution
+ " : no current flow element found. Check the execution id that is being passed "
+ "(it should not be a process instance execution, but a child execution currently referencing a flow element).");
} else {
throw new FlowableException("Programmatic error: cannot trigger " + execution + ", invalid flow element type found: "
+ currentFlowElement.getClass().getName() + ".");
}
}
}
View on GitHub (pinned to d6d39ce1c6)
Solutions
- Query the correct execution: RuntimeService.createExecutionQuery().processInstanceId(pid).activityId("theActivityId").singleResult() and trigger that id.
- Verify the execution still exists and is in a wait state before triggering (avoid double triggers).
- If you need to signal the whole instance, use the appropriate API (e.g. complete the task via TaskService) instead of triggering the process-instance execution.
Example fix
// before
runtimeService.trigger(processInstanceId);
// after
Execution execution = runtimeService.createExecutionQuery()
.processInstanceId(processInstanceId)
.activityId("receiveTaskId")
.singleResult();
runtimeService.trigger(execution.getId()); Defensive patterns
Strategy: validation
Validate before calling
Execution target = runtimeService.createExecutionQuery()
.processInstanceId(processInstanceId)
.activityId("receiveTaskId")
.singleResult();
if (target == null || target.getId().equals(processInstanceId)) {
throw new IllegalStateException("No child execution in a wait state for activity; cannot trigger");
}
runtimeService.trigger(target.getId()); Try / catch
try {
runtimeService.trigger(executionId);
} catch (FlowableException e) {
if (e.getMessage().contains("no current flow element found")) {
// wrong execution id; re-query child execution before retrying
} else {
throw e;
}
} Prevention
- Never pass the process instance id to trigger(); always resolve the child execution via createExecutionQuery().activityId(...)
- Check the execution is still active/waiting before triggering to avoid race/double-trigger
- Prefer TaskService.complete or domain APIs over raw trigger where possible
When it happens
Trigger: Calling RuntimeService.trigger(executionId) (or signal with variables) with the id of the process instance execution instead of a child execution currently sitting in a wait state (e.g. inside a receive task, user task, or event-based gateway).
Common situations: Developers fetch the process instance id via RuntimeService.createProcessInstanceQuery() and pass it to trigger(); only executions from createExecutionQuery().activityId(...) should be triggered. Also happens when the target execution already left the wait state (race condition / double trigger), or after engine version refactors of execution trees (concurrent child executions).
Understand the failure class
Background: "Must be a positive integer", "Invalid value", "Unsupported": the invalid-argument-value error family, when a library rejects the value you pass — this error's family across 35 libraries.
Related errors
- ${sequenceFlowId} does not match a sequence flow for ${deleg
- No outgoing sequence flow of the inclusive gateway '${activi
- Not supported to signal this execution
- No startFormHandler defined in process ''
- Error while handling compensation event ${eventSubscription}
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/f4e67bc360f9d830.
Report an issue: GitHub.