flowable / flowable-engine

A compact and highly efficient workflow and Business Process Management (BPM) platform for developers, system admins and business users.
https://www.flowable.org
Apache License 2.0
8.01k stars 2.63k forks source link

task complete before report NoSuchMethodError: org.flowable.bpmn.model.UserTask.getTaskCompleterVariableName() , flowable version: 7.0.1 #3882

Closed shining-lee closed 6 months ago

shining-lee commented 6 months ago

taskService.complete(taskId) -> completeTask method in TaskHelper class report NoSuchMethodError.

problem method code: protected static void storeTaskCompleter(TaskEntity taskEntity, ExecutionEntity execution, ProcessEngineConfigurationImpl processEngineConfiguration) { if (taskEntity.getProcessDefinitionId() != null) { FlowElement flowElement = execution.getCurrentFlowElement(); if (flowElement instanceof UserTask) { UserTask userTask = (UserTask) flowElement; String taskCompleterVariableName = userTask.getTaskCompleterVariableName(); if (StringUtils.isNotEmpty(taskCompleterVariableName)) { ExpressionManager expressionManager = processEngineConfiguration.getExpressionManager(); Expression expression = expressionManager.createExpression(userTask.getTaskCompleterVariableName()); String completerVariableName = (String) expression.getValue(execution); String completer = Authentication.getAuthenticatedUserId(); if (StringUtils.isNotEmpty(completerVariableName)) { execution.setVariable(completerVariableName, completer); } } } } }

line String taskCompleterVariableName = userTask.getTaskCompleterVariableName(); is red color .

shining-lee commented 6 months ago

image image

tijsrademakers commented 6 months ago

Hi, not sure why you are creating this issue here, as you can see this method is present in the UserTask class:

https://github.com/flowable/flowable-engine/blob/3f8058b47c5b36eb45d01f812f02580735a974a4/modules/flowable-bpmn-model/src/main/java/org/flowable/bpmn/model/UserTask.java#L228