flowable/flowable-engine · error · FlowableIllegalArgumentException
The taskId or processDefinitionId parameter has to be…
Error message
The taskId or processDefinitionId parameter has to be provided
What it means
FormDataResource.getFormData exposes GET /form/form-data and requires exactly one lookup key: either taskId or processDefinitionId. When neither query parameter is supplied, FlowableIllegalArgumentException is thrown because there is nothing to fetch form data for.
Solutions
- Add exactly one of ?taskId=<id> or ?processDefinitionId=<id> to the request.
- Resolve the id client-side first (query tasks or process definitions) before calling the endpoint.
- If both are available, pick the taskId path — sending both raises the companion error (index 3419).
- Validate parameters in client code before issuing the request.
Example fix
// before GET /flowable-rest/service/form/form-data // after GET /flowable-rest/service/form/form-data?taskId=125
Defensive patterns
Strategy: validation
Validate before calling
if (taskId == null && processDefinitionId == null) {
throw new IllegalArgumentException("Provide taskId or processDefinitionId");
} Try / catch
try { formData = api.getFormData(taskId, null); } catch (FlowableIllegalArgumentException e) { /* check request params */ } Prevention
- Validate that exactly one lookup id is set before calling
- Interpolate query parameters in client templates
- Resolve ids via task/process definition queries first
When it happens
Trigger: GET /form/form-data with no query parameters at all, or with both parameters absent due to a client bug (e.g. null/empty values dropped before the request).
Common situations: Hand-built REST URLs missing the query string, templated client calls where variables were not interpolated, or API explorers sending the path without params.
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
- Not both a taskId and a processDefinitionId parameter can…
- Task has no form defined
- A group or a user is required to create an identity link.
- A group or a user is required to create an identity link.
- Authentication failed for this username and password
AI-assisted analysis of flowable/flowable-engine@d6d39ce1c6 (2026-09-11).
Data as JSON: /api/errors/474be8af402f022a.
Report an issue: GitHub.
Appendix: source
Thrown at modules/flowable-rest/src/main/java/org/flowable/rest/service/api/form/FormDataResource.java:69
@Autowired
protected RestResponseFactory restResponseFactory;
@Autowired
protected FormService formService;
@Autowired(required=false)
protected BpmnRestApiInterceptor restApiInterceptor;
@ApiOperation(value = "Get form data", tags = { "Forms" }, notes = "")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Indicates that form data could be queried."),
@ApiResponse(code = 404, message = "Indicates that form data could not be found.") })
@GetMapping(value = "/form/form-data", produces = "application/json")
public FormDataResponse getFormData(@RequestParam(value = "taskId", required = false) String taskId,
@RequestParam(value = "processDefinitionId", required = false) String processDefinitionId) {
if (taskId == null && processDefinitionId == null) {
throw new FlowableIllegalArgumentException("The taskId or processDefinitionId parameter has to be provided");
}
if (taskId != null && processDefinitionId != null) {
throw new FlowableIllegalArgumentException("Not both a taskId and a processDefinitionId parameter can be provided");
}
FormData formData = null;
String id = null;
if (taskId != null) {
formData = formService.getTaskFormData(taskId);
id = taskId;
} else {
formData = formService.getStartFormData(processDefinitionId);
id = processDefinitionId;
}
if (formData == null) {
throw new FlowableObjectNotFoundException("Could not find a form data with id '" + id + "'.", FormData.class);View on GitHub (pinned to d6d39ce1c6)