flowable/flowable-engine · warning
One of the attributes 'class', 'delegateExpression'…
Error message
One of the attributes 'class', 'delegateExpression', 'type', 'operation', or 'expression' is mandatory on serviceTask {} What it means
A serviceTask element defines none of the required implementation attributes: activiti:class, delegateExpression, expression, a known 'type', or an operationRef for web service. The parser logs this warning and leaves the activity without a behavior; invoking the task at runtime will fail because there is nothing to execute.
Solutions
- Add one of the required attributes, e.g. flowable:class="com.x.MyDelegate" or flowable:delegateExpression="${bean}"
- Set a known flowable:type (mail, camel, shell, ...) or flowable:expression="${...}"
- Provide operationRef plus WSDL imports for a web-service task
Example fix
// before <serviceTask id="st1" name="Do work"/> // after <serviceTask id="st1" name="Do work" flowable:class="com.example.WorkDelegate"/>
Defensive patterns
Strategy: validation
Validate before calling
for (ServiceTask t : model.getFlowElementsOfType(ServiceTask.class)) {
boolean hasImpl = notEmpty(t.getImplementation()) || notEmpty(t.getType()) || notEmpty(t.getOperationRef());
if (!hasImpl) throw new IllegalArgumentException("serviceTask " + t.getId() + " has no implementation");
} Prevention
- Never deploy serviceTask shapes without an implementation attribute
- Validate the BPMN in CI before repository deployment
- Standardize on class or delegateExpression implementations in team conventions
When it happens
Trigger: executeParse of a ServiceTask reaching the final else branch: implementationType not CLASS/EXPRESSION/DELEGATEEXPRESSION/WEBSERVICE/type-branch — typically an empty <serviceTask id="x"/> or one with only unrelated attributes.
Common situations: Bare serviceTask shape dropped from a palette and never configured; import from external tooling using different attribute names; accidental removal of the class attribute during refactoring.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Invalid service task type
- One of the attributes 'type' or 'operation' is mandatory on…
- Activity needed for multi instance cannot bv found
- Could not execute shell command for + execution
- Delegate expression did neither resolve to an…
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/6dffeca599bf4654.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/handler/ServiceTaskParseHandler.java:82
activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createClassDelegateServiceTask(serviceTask));
// activiti:delegateExpression
} else if (ImplementationType.IMPLEMENTATION_TYPE_DELEGATEEXPRESSION.equalsIgnoreCase(serviceTask.getImplementationType())) {
activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createServiceTaskDelegateExpressionActivityBehavior(serviceTask));
// activiti:expression
} else if (ImplementationType.IMPLEMENTATION_TYPE_EXPRESSION.equalsIgnoreCase(serviceTask.getImplementationType())) {
activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createServiceTaskExpressionActivityBehavior(serviceTask));
// Webservice
} else if (ImplementationType.IMPLEMENTATION_TYPE_WEBSERVICE.equalsIgnoreCase(serviceTask.getImplementationType()) &&
StringUtils.isNotEmpty(serviceTask.getOperationRef())) {
WebServiceActivityBehavior webServiceActivityBehavior = bpmnParse.getActivityBehaviorFactory().createWebServiceActivityBehavior(serviceTask, bpmnParse.getBpmnModel());
activity.setActivityBehavior(webServiceActivityBehavior);
} else {
LOGGER.warn("One of the attributes 'class', 'delegateExpression', 'type', 'operation', or 'expression' is mandatory on serviceTask {}", serviceTask.getId());
}
}
}
View on GitHub (pinned to d6d39ce1c6)