{"record":{"id":"00be367fc1a584ff","repo":"flowable/flowable-engine","slug":"invalid-action-actionrequest-getaction-00be36","errorCode":null,"errorMessage":"Invalid action: '\" + actionRequest.getAction() + \"'.","messagePattern":"Invalid action: '\" \\+ actionRequest\\.getAction\\(\\) \\+ \"'\\.","errorType":"http","errorClass":"FlowableIllegalArgumentException","httpStatus":400,"severity":"error","filePath":"modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/ProcessDefinitionResource.java","lineNumber":129,"sourceCode":"\n            // No need to re-fetch the ProcessDefinition entity, just update\n            // category in response\n            ProcessDefinitionResponse response = restResponseFactory.createProcessDefinitionResponse(processDefinition);\n            response.setCategory(actionRequest.getCategory());\n            return response;\n\n        } else {\n            // Actual action\n            if (actionRequest.getAction() != null) {\n                if (ProcessDefinitionActionRequest.ACTION_SUSPEND.equals(actionRequest.getAction())) {\n                    return suspendProcessDefinition(processDefinition, actionRequest.isIncludeProcessInstances(), actionRequest.getDate());\n\n                } else if (ProcessDefinitionActionRequest.ACTION_ACTIVATE.equals(actionRequest.getAction())) {\n                    return activateProcessDefinition(processDefinition, actionRequest.isIncludeProcessInstances(), actionRequest.getDate());\n                }\n            }\n\n            throw new FlowableIllegalArgumentException(\"Invalid action: '\" + actionRequest.getAction() + \"'.\");\n        }\n    }\n    \n    @ApiOperation(value = \"Get a process definition start form\", tags = { \"Process Definitions\" })\n    @ApiResponses(value = {\n            @ApiResponse(code = 200, message = \"Indicates request was successful and the process definition form is returned\"),\n            @ApiResponse(code = 404, message = \"Indicates the requested process definition was not found.\")\n    })\n    @GetMapping(value = \"/repository/process-definitions/{processDefinitionId}/start-form\", produces = \"application/json\")\n    public String getProcessDefinitionStartForm(@ApiParam(name = \"processDefinitionId\") @PathVariable String processDefinitionId) {\n        FormEngineConfigurationApi formEngineConfiguration = (FormEngineConfigurationApi) processEngineConfiguration.getEngineConfigurations().get(EngineConfigurationConstants.KEY_FORM_ENGINE_CONFIG);\n        if (formEngineConfiguration == null) {\n            return null;\n        }\n        FormRepositoryService formRepositoryService = formEngineConfiguration.getFormRepositoryService();\n        if (formRepositoryService == null) {\n            return null;\n        }","sourceCodeStart":111,"sourceCodeEnd":147,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-rest/src/main/java/org/flowable/rest/service/api/repository/ProcessDefinitionResource.java#L111-L147","documentation":"After null-checking the body, executeProcessDefinitionAction dispatches on the 'action' string; only 'activate' and 'suspend' are recognized. Any other value falls through to this FlowableIllegalArgumentException.","triggerScenarios":"PUT /repository/process-definitions/{id} with body {\"action\":\"pause\"} or any misspelled/unsupported action string.","commonSituations":"Typo in the action name; clients written against other engines' APIs using different verbs (e.g. 'disable'); case-sensitivity surprises ('Suspend' vs 'suspend').","solutions":["Use exactly \"suspend\" or \"activate\" (lowercase) in the action field","Consult ProcessDefinitionActionRequest constants ACTION_SUSPEND / ACTION_ACTIVATE","Validate the action client-side before sending"],"exampleFix":"// before\n{\"action\": \"Suspend\"}\n// after\n{\"action\": \"suspend\", \"includeProcessInstances\": true}","handlingStrategy":"validation","validationCode":"const ACTIONS = ['activate','suspend'];\nif (!ACTIONS.includes(action)) throw new Error(`action must be 'activate' or 'suspend', got: ${action}`);","typeGuard":"const isValidAction = (a) => a === 'activate' || a === 'suspend';","tryCatchPattern":"try { await api.put(defUrl, { action }); }\ncatch (e) { if (e.status === 400 && /Invalid action/.test(e.message)) fixActionName(e); else throw e; }","preventionTips":["Use constants ACTION_SUSPEND/ACTION_ACTIVATE from the client SDK","Keep actions lowercase — the comparison is case-sensitive","Document the two supported actions in internal tooling"],"tags":["rest","validation","invalid-action"],"backgroundTag":"invalid-enum-value","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-18T11:17:12.947Z"}