org.camunda.bpm.client.exception.EngineException: TASK/CLIENT-01009 Exception while completing the external task: Unknown property used in expression: ${doRepair}. Cause: Cannot resolve identifier 'doRepair'

application.yml

camunda:
bpm:
client:
subscriptions:
creditScoreChecker:
process-definition-key: Process_work_task
include-extension-properties: true
variable-names: defaultScore
# 引擎根路径
base-url: http://localhost:8080/engine-rest
# 长轮询时间间隔
async-response-timeout: 2000
# 一次最多拉取任务数量
max-tasks: 1
# 全局订阅topiv上锁时间、单位毫秒,锁住期间,其他订阅者不拉取任务
lock-duration: 1000
# 指定工作节点ID
worker-id: camunda-demo

@Configuration
@ExternalTaskSubscription(“try_self_repair”)
public class RepairSubscribe implements ExternalTaskHandler {

@Override
public void execute(ExternalTask externalTask, ExternalTaskService externalTaskService) {
    // add your business logic here
    System.out.println("try_self_repair");
    Map<String, Object> variables = new HashMap<>();
    variables.put("isFree", true);
    externalTaskService.complete(externalTask);
}

}

exception:

bpm.client.topic.impl.TopicSubscriptionManager.handleExternalTask(TopicSubscriptionManager.java:155) [camunda-external-task-client-7.19.0.jar:7.19.0]
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.lambda$acquire$0(TopicSubscriptionManager.java:109) [camunda-external-task-client-7.19.0.jar:7.19.0]
at java.util.Arrays$ArrayList.forEach(Arrays.java:3880) ~[na:1.8.0_391]
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.acquire(TopicSubscriptionManager.java:104) [camunda-external-task-client-7.19.0.jar:7.19.0]
at org.camunda.bpm.client.topic.impl.TopicSubscriptionManager.run(TopicSubscriptionManager.java:88) [camunda-external-task-client-7.19.0.jar:7.19.0]
at java.lang.Thread.run(Thread.java:750) ~[na:1.8.0_391]
Caused by: org.camunda.bpm.client.exception.RestException: Unknown property used in expression: ${doRepair}. Cause: Cannot resolve identifier ‘doRepair’
at org.camunda.bpm.client.impl.EngineRestExceptionDto.toRestException(EngineRestExceptionDto.java:52) ~[camunda-external-task-client-7.19.0.jar:7.19.0]
at org.camunda.bpm.client.impl.RequestExecutor$1.handleResponse(RequestExecutor.java:133) ~[camunda-external-task-client-7.19.0.jar:7.19.0]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:223) ~[httpclient-4.5.13.jar:4.5.13]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165) ~[httpclient-4.5.13.jar:4.5.13]
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:140) ~[httpclient-4.5.13.jar:4.5.13]
at org.camunda.bpm.client.impl.RequestExecutor.executeRequest(RequestExecutor.java:88) ~[camunda-external-task-client-7.19.0.jar:7.19.0]
at org.camunda.bpm.client.impl.RequestExecutor.postRequest(RequestExecutor.java:74) ~[camunda-external-task-client-7.19.0.jar:7.19.0]
at org.camunda.bpm.client.impl.EngineClient.complete(EngineClient.java:107) ~[camunda-external-task-client-7.19.0.jar:7.19.0]
at org.camunda.bpm.client.task.impl.ExternalTaskServiceImpl.complete(ExternalTaskServiceImpl.java:99) ~[camunda-external-task-client-7.19.0.jar:7.19.0]
… 9 common frames omitted

work_task.bpmn (5.2 KB)

Hi @Gobin-cat

Error is coming from the next task which has its implementation type set to Delegation expression.
doRepair delegate needs to be registered as a Spring Bean.

Hi @Gobin-cat

I assume that a Process Application is used, with your model as a resource, resulting in automatic deployment and registration of the process application. If your model is deployed externally, it is likely a registration issue.

You can find more in the below docs:

The registration allows the process engine to load additional Java Classes and resources from the process application when executing the processes

But I have already used the process.xml file to implement automated deployment

Hi @Gobin-cat

Do you mean that the deployment has been done automatically?

Hi @Gobin-cat,

From the attached screenshot, I can see that the final es is missing in the file name used.

process.xml is used whereas processes.xml should be used.

The file name is’ process. xml ', which can achieve automated deployment

Hi @Gobin-cat,

Did you specify a custom location for the deployment descriptor file? I believe this is the only way to have a different name for the file. (the default name is processes.xml)

https://docs.camunda.org/manual/7.21/user-guide/process-applications/the-processes-xml-deployment-descriptor/#custom-location-for-the-processes-xml-file

Firstly, the bpmn file I am currently using is process.xml for automated deployment
Secondly, I just changed the file name to processe.xml, adjusted the process name and ID, and re automated the deployment. Finally, the process was executed, and the same issue occurred as before
Unknown property used in expression: ${doRepair}. Cause: Cannot resolve identifier ‘doRepair’