flowable/flowable-engine · error · FlowableException

IdentityService is missing and must be provided to set…

Error message

IdentityService is missing and must be provided to set process initiator.

What it means

FlowableProducer.setProcessInitiator calls identityService.setAuthenticatedUserId(...) to record who started the process. Flowable throws this FlowableException when an initiator is requested but the producer's IdentityService was never injected, because the Camel module only wires it up when explicitly configured.

Solutions

  1. Provide the engine's IdentityService to the Camel component: flowableComponent.setIdentityService(processEngine.getIdentityService()).
  2. Ensure the underlying process engine configuration exposes an identityService (default Flowable configurations do).
  3. If initiator tracking is unnecessary, remove the initiator header/property from the exchange instead of leaving it empty.
  4. In Spring, use the flowable:camel component bean that receives identityService via configuration so it is auto-wired.

Example fix

// before
FlowableComponent component = new FlowableComponent(); // identityService missing
// after
FlowableComponent component = new FlowableComponent();
component.setIdentityService(processEngine.getIdentityService());
Defensive patterns

Strategy: validation

Validate before calling

if (flowableComponent.getIdentityService() == null) {
    flowableComponent.setIdentityService(processEngine.getIdentityService());
}

Try / catch

try {
    producer.process(exchange);
} catch (FlowableException e) {
    if (e.getMessage().contains("IdentityService is missing")) {
        // wire IdentityService into the component and retry
    }
    throw e;
}

Prevention

When it happens

Trigger: Sending an exchange that includes the process initiator header/property (so startProcess calls setProcessInitiator) while the FlowableProducer/CamelEndpoint was created without an IdentityService (processEngineConfiguration identityService not provided to the camel component).

Common situations: Camel component built manually without setIdentityService(); using a minimal ProcessEngineConfiguration where identity service is not registered; wiring the camel component in tests with a stub engine lacking the identity service.

Understand the failure class

Background: "not installed", "pip install", "required for": how missing-dependency errors surface across open-source libraries — this error's family across 34 libraries.

Related errors


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

Appendix: source

Thrown at modules/flowable-camel/src/main/java/org/flowable/camel/FlowableProducer.java:192

                setProcessInitiator(ExchangeUtils.prepareInitiator(exchange, endpoint));
            }

            if (key == null) {
                return runtimeService.startProcessInstanceByKey(processKey, ExchangeUtils.prepareVariables(exchange, endpoint));
            } else {
                return runtimeService.startProcessInstanceByKey(processKey, key, ExchangeUtils.prepareVariables(exchange, endpoint));
            }

        } finally {
            if (endpoint.isSetProcessInitiator()) {
                setProcessInitiator(null);
            }
        }
    }

    protected void setProcessInitiator(String processInitiator) {
        if (identityService == null) {
            throw new FlowableException("IdentityService is missing and must be provided to set process initiator.");
        }
        identityService.setAuthenticatedUserId(processInitiator);
    }

    protected FlowableEndpoint getFlowableEndpoint() {
        return (FlowableEndpoint) getEndpoint();
    }

    public void setIdentityService(IdentityService identityService) {
        this.identityService = identityService;
    }

    public void setRuntimeService(RuntimeService runtimeService) {
        this.runtimeService = runtimeService;
    }

    public void setRepositoryService(RepositoryService repositoryService) {
        this.repositoryService = repositoryService;

View on GitHub (pinned to d6d39ce1c6)