{"record":{"id":"0a845f0275fe8eed","repo":"flowable/flowable-engine","slug":"invalid-service-task-type-for-service-task","errorCode":null,"errorMessage":"Invalid service task type: '{}'  for service task {}","messagePattern":"Invalid service task type: '(.+?)'  for service task (.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/handler/ServiceTaskParseHandler.java","lineNumber":59,"sourceCode":"        ActivityImpl activity = createActivityOnCurrentScope(bpmnParse, serviceTask, BpmnXMLConstants.ELEMENT_TASK_SERVICE);\n        activity.setAsync(serviceTask.isAsynchronous());\n        activity.setFailedJobRetryTimeCycleValue(serviceTask.getFailedJobRetryTimeCycleValue());\n        activity.setExclusive(!serviceTask.isNotExclusive());\n\n        // Email, and Shell service tasks\n        if (StringUtils.isNotEmpty(serviceTask.getType())) {\n\n            if (\"mail\".equalsIgnoreCase(serviceTask.getType())) {\n                activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createMailActivityBehavior(serviceTask));\n\n            } else if (\"camel\".equalsIgnoreCase(serviceTask.getType())) {\n                activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createCamelActivityBehavior(serviceTask, bpmnParse.getBpmnModel()));\n\n            } else if (\"shell\".equalsIgnoreCase(serviceTask.getType())) {\n                activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createShellActivityBehavior(serviceTask));\n\n            } else {\n                LOGGER.warn(\"Invalid service task type: '{}'  for service task {}\", serviceTask.getType(), serviceTask.getId());\n            }\n\n            // activiti:class\n        } else if (ImplementationType.IMPLEMENTATION_TYPE_CLASS.equalsIgnoreCase(serviceTask.getImplementationType())) {\n            activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createClassDelegateServiceTask(serviceTask));\n\n            // activiti:delegateExpression\n        } else if (ImplementationType.IMPLEMENTATION_TYPE_DELEGATEEXPRESSION.equalsIgnoreCase(serviceTask.getImplementationType())) {\n            activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createServiceTaskDelegateExpressionActivityBehavior(serviceTask));\n\n            // activiti:expression\n        } else if (ImplementationType.IMPLEMENTATION_TYPE_EXPRESSION.equalsIgnoreCase(serviceTask.getImplementationType())) {\n            activity.setActivityBehavior(bpmnParse.getActivityBehaviorFactory().createServiceTaskExpressionActivityBehavior(serviceTask));\n\n            // Webservice\n        } else if (ImplementationType.IMPLEMENTATION_TYPE_WEBSERVICE.equalsIgnoreCase(serviceTask.getImplementationType()) &&\n                StringUtils.isNotEmpty(serviceTask.getOperationRef())) {\n","sourceCodeStart":41,"sourceCodeEnd":77,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable5-engine/src/main/java/org/activiti/engine/impl/bpmn/parser/handler/ServiceTaskParseHandler.java#L41-L77","documentation":"A serviceTask declares a 'type' attribute with a value the engine does not know how to map to an activity behavior. Known types include mail, mule, camel, shell, dmn, etc.; anything else falls through to this warning and no behavior is assigned. The task will lack runtime behavior in the deployed process.","triggerScenarios":"executeParse of a ServiceTask with implementationType IMPLEMENTATION_TYPE_TYPE where getType() is a non-empty string not matching any known branch (case-insensitive compare against \"mail\", \"mule\", \"camel\", \"shell\", etc.).","commonSituations":"Typo in the type attribute (\"maill\", \"CamelTask\"); copying config from a different engine that supports other types; custom type extension expected in a newer engine version.","solutions":["Correct the type attribute to a supported value (e.g. mail, mule, camel, shell)","Use activiti:class / delegateExpression / expression instead of the type attribute for custom logic","Upgrade the engine version if the desired type is supported there"],"exampleFix":"// before\n<serviceTask id=\"st1\" flowable:type=\"maill\"/>\n// after\n<serviceTask id=\"st1\" flowable:type=\"mail\"/>","handlingStrategy":"validation","validationCode":"Set<String> KNOWN = Set.of(\"mail\",\"mule\",\"camel\",\"shell\",\"dmn\");\nfor (ServiceTask t : model.getFlowElementsOfType(ServiceTask.class)) {\n    String type = t.getType();\n    if (type != null && !KNOWN.contains(type.toLowerCase())) {\n        throw new IllegalArgumentException(\"serviceTask \" + t.getId() + \" has unknown type '\" + type + \"'\");\n    }\n}","typeGuard":"function isKnownServiceTaskType(type) { return ['mail','mule','camel','shell','dmn'].includes(String(type).toLowerCase()); }","tryCatchPattern":null,"preventionTips":["Check the engine docs for the exact supported type strings","Use camelCase-free, lowercase type values as documented","Prefer activiti:class/delegateExpression for custom behavior"],"tags":["bpmn","parsing","service-task","invalid-type"],"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"}