{"record":{"id":"0df7d39ea93ddd8a","repo":"flowable/flowable-engine","slug":"no-topic-expression-configured-for","errorCode":null,"errorMessage":"no topic expression configured for ","messagePattern":"no topic expression configured for ","errorType":"exception","errorClass":"FlowableException","httpStatus":null,"severity":"error","filePath":"modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/behavior/impl/ExternalWorkerTaskActivityBehavior.java","lineNumber":67,"sourceCode":"    @Override\n    public void execute(CommandContext commandContext, PlanItemInstanceEntity planItemInstanceEntity) {\n        CmmnEngineConfiguration cmmnEngineConfiguration = CommandContextUtil.getCmmnEngineConfiguration(commandContext);\n        CreateCmmnExternalWorkerJobInterceptor interceptor = cmmnEngineConfiguration.getCreateCmmnExternalWorkerJobInterceptor();\n\n        CreateCmmnExternalWorkerJobBeforeContext beforeContext = new CreateCmmnExternalWorkerJobBeforeContext(\n                serviceTask,\n                planItemInstanceEntity,\n                getJobCategory(serviceTask),\n                serviceTask.getTopic()\n        );\n\n        if (interceptor != null) {\n            interceptor.beforeCreateExternalWorkerJob(beforeContext);\n        }\n\n        String jobTopicExpression = beforeContext.getJobTopicExpression();\n        if (StringUtils.isEmpty(jobTopicExpression)) {\n            throw new FlowableException(\"no topic expression configured for \" + planItemInstanceEntity);\n        }\n\n        JobServiceConfiguration jobServiceConfiguration = cmmnEngineConfiguration.getJobServiceConfiguration();\n        JobService jobService = jobServiceConfiguration.getJobService();\n\n        ExternalWorkerJobEntity job = jobService.createExternalWorkerJob();\n        job.setSubScopeId(planItemInstanceEntity.getId());\n        job.setScopeId(planItemInstanceEntity.getCaseInstanceId());\n        job.setScopeDefinitionId(planItemInstanceEntity.getCaseDefinitionId());\n        job.setScopeType(ScopeTypes.CMMN);\n        job.setElementId(serviceTask.getId());\n        job.setElementName(serviceTask.getName());\n        job.setJobHandlerType(ExternalWorkerTaskCompleteJobHandler.TYPE);\n        job.setExclusive(serviceTask.isExclusive());\n\n        if (StringUtils.isNotEmpty(beforeContext.getJobCategory())) {\n                Expression categoryExpression = CommandContextUtil.getExpressionManager(commandContext)\n                        .createExpression(beforeContext.getJobCategory());","sourceCodeStart":49,"sourceCodeEnd":85,"githubUrl":"https://github.com/flowable/flowable-engine/blob/d6d39ce1c69ff244f2d9dc6af756a9b95e865586/modules/flowable-cmmn-engine/src/main/java/org/flowable/cmmn/engine/impl/behavior/impl/ExternalWorkerTaskActivityBehavior.java#L49-L85","documentation":"ExternalWorkerTaskActivityBehavior creates an external worker job for the plan item. The job's topic comes from a topic expression string; if it is null or empty after interceptor processing, no topic can be assigned and the engine throws this FlowableException before creating the job.","triggerScenarios":"Activating an external worker task plan item whose topic expression attribute is empty or null in beforeContext.getJobTopicExpression().","commonSituations":"External worker task element in the case model missing the topic attribute; a model transformation/deployment dropped the attribute; topic supplied conditionally via expression that resolved to empty.","solutions":["Set the topic attribute on the external worker task element in the CMMN model, e.g. <externalWorkerTask topic=\"myTopic\"> or a topic expression.","Redeploy the corrected case model so the plan item definition carries the topic.","If the topic comes from an expression, ensure the referenced variable is populated before activation."],"exampleFix":"// before\n<serviceTask xmlns=\"http://flowable.org/cmmn\" type=\"external-worker-task\"/> <!-- no topic -->\n// after\n<serviceTask xmlns=\"http://flowable.org/cmmn\" type=\"external-worker-task\" topic=\"loan-processing\"/>","handlingStrategy":"validation","validationCode":"String topic = externalWorkerTask.getTopic();\nif (topic == null || topic.isBlank()) {\n    throw new IllegalArgumentException(\"External worker task must define a topic: \" + elementId);\n}","typeGuard":null,"tryCatchPattern":"try {\n    caseRuntimeService.triggerPlanItemInstance(planItemId);\n} catch (FlowableException e) {\n    if (e.getMessage().startsWith(\"no topic expression configured\")) {\n        log.error(\"External worker task missing topic in case model\");\n    }\n    throw e;\n}","preventionTips":["Validate case XML against the schema so required attributes are present","Review model exports after transformations that may drop attributes","Cover external worker tasks in deployment-time model validation"],"tags":["cmmn","external-worker","configuration","empty-value"],"backgroundTag":"missing-required-config-field","analyzedSha":"d6d39ce1c69ff244f2d9dc6af756a9b95e865586","analyzedAt":"2026-09-11T06:41:19.413Z","contentChangedAt":"2026-09-11T06:41:19.413Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}