flowable/flowable-engine · error · FlowableObjectNotFoundException

Process Definition '

Error message

Process Definition '

What it means

FlowableObjectNotFoundException thrown by GetRenderedStartFormCmd.execute when the given processDefinitionId does not resolve to a deployed process definition. The deployment manager looks up the definition by id and, finding nothing, reports that the referenced entity does not exist. Message text is truncated in source but reads "Process Definition '<id>' not found" with ProcessDefinition.class as the resource type.

Solutions

  1. Verify the id via RepositoryService.createProcessDefinitionQuery().processDefinitionId(id).singleResult() and fix the caller to pass a valid definition id.
  2. If you only have a key, use processDefinitionQuery().latestVersion().processDefinitionKey(key) to obtain the current id first.
  3. Re-check tenant/database configuration: ensure the engine connects to the DB where the definition is deployed.
  4. Redeploy the process definition if its deployment was deleted.

Example fix

// before
Object form = formService.getRenderedStartForm("myProcess"); // key, not id
// after
ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()
    .processDefinitionKey("myProcess").latestVersion().singleResult();
Object form = formService.getRenderedStartForm(pd.getId());
Defensive patterns

Strategy: validation

Validate before calling

ProcessDefinition pd = repositoryService.createProcessDefinitionQuery()
    .processDefinitionId(processDefinitionId).singleResult();
if (pd == null) throw new IllegalArgumentException("Unknown process definition id: " + processDefinitionId);

Try / catch

try {
    return formService.getRenderedStartForm(processDefinitionId);
} catch (FlowableObjectNotFoundException e) {
    // definition not deployed; surface a 404-style response
}

Prevention

When it happens

Trigger: Calling RuntimeService.getStartFormRenderedStartForm equivalent: formService.getRenderedStartForm(processDefinitionId, formEngineName) with an id that is not a deployed definition — e.g. a stale id, a definitionId instead of definitionKey, or an id from another engine/database.

Common situations: Using the process definition key instead of the id; the definition was deleted by a cascade delete of its deployment; pointing at the wrong database/tenant; ids cached in a UI from before a redeployment that changed definition ids.

Understand the failure class

Background: "Not found" and "does not exist" errors: why "Task not found", "No such folder", and "Can't find" fire when a lookup comes back empty — this error's family across 14 libraries.

Related errors


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

Appendix: source

Thrown at modules/flowable-engine/src/main/java/org/flowable/engine/impl/cmd/GetRenderedStartFormCmd.java:49

 * @author Joram Barrez
 */
public class GetRenderedStartFormCmd implements Command<Object>, Serializable {

    private static final long serialVersionUID = 1L;
    protected String processDefinitionId;
    protected String formEngineName;

    public GetRenderedStartFormCmd(String processDefinitionId, String formEngineName) {
        this.processDefinitionId = processDefinitionId;
        this.formEngineName = formEngineName;
    }

    @Override
    public Object execute(CommandContext commandContext) {
        ProcessDefinition processDefinition = CommandContextUtil.getProcessEngineConfiguration(commandContext).getDeploymentManager().findDeployedProcessDefinitionById(processDefinitionId);

        if (processDefinition == null) {
            throw new FlowableObjectNotFoundException("Process Definition '" + processDefinitionId + "' not found", ProcessDefinition.class);
        }

        if (Flowable5Util.isFlowable5ProcessDefinition(processDefinition, commandContext)) {
            return Flowable5Util.getFlowable5CompatibilityHandler().getRenderedStartForm(processDefinitionId, formEngineName);
        }

        FormHandlerHelper formHandlerHelper = CommandContextUtil.getProcessEngineConfiguration(commandContext).getFormHandlerHelper();
        StartFormHandler startFormHandler = formHandlerHelper.getStartFormHandler(commandContext, processDefinition);
        if (startFormHandler == null) {
            return null;
        }

        FormEngine formEngine = CommandContextUtil.getProcessEngineConfiguration(commandContext).getFormEngines().get(formEngineName);

        if (formEngine == null) {
            throw new FlowableException("No formEngine '" + formEngineName + "' defined process engine configuration");
        }

View on GitHub (pinned to d6d39ce1c6)