# Camunda Service Task Error : Unknown property used in expression

**URL:** <https://forum.camunda.io/t/camunda-service-task-error-unknown-property-used-in-expression/37868>\
**Category:** Discussion & Questions\
**Tags:** process-engine\
**Created:** [May 25, 2022, 9:30pm UTC](https://forum.camunda.io/t/camunda-service-task-error-unknown-property-used-in-expression/37868 "2022-05-25T21:30:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![harish2610](https://forum.camunda.io/user_avatar/forum.camunda.io/harish2610/32/17430_2.png) [@harish2610](https://forum.camunda.io/u/harish2610)\
**Post date:** [May 25, 2022, 9:30pm UTC](https://forum.camunda.io/t/camunda-service-task-error-unknown-property-used-in-expression/37868/1 "2022-05-25T21:30:34Z")

</div>

I created a simple workflow where I am calling an event subprocess in another process using a service task and I am doing this by using a Java code. I configured the java class in the service task using the Implementation type “Delegate Expression” (see below)

 ![image](https://forum.camunda.io/uploads/default/original/3X/1/f/1fc56507cc7d4261ad020904ccd0aa3d0357b628.png)

I get the following error while running the service task.

An error happened while submitting the task form : Cannot submit task form 54897af5-dc6b-11ec-85f0-e02be903a6c0: Unknown property used in expression: #{cancelProcess}. Cause: Cannot resolve identifier ‘cancelProcess’

Here is my Java code :

```auto
package org.example;

import org.camunda.bpm.engine.RuntimeService;
import org.camunda.bpm.engine.delegate.DelegateExecution;
import org.camunda.bpm.engine.delegate.JavaDelegate;
import org.camunda.bpm.engine.runtime.MessageCorrelationResult;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Service;

@Component("cancelProcess")
public class CancelProcess implements JavaDelegate {
    public void execute(DelegateExecution execution) {
        // correlate the message
        RuntimeService runtimeService = execution.getProcessEngineServices().getRuntimeService();
        MessageCorrelationResult result = runtimeService.createMessageCorrelation("CANCEL_PROCESS")
                .processInstanceBusinessKey("Order-Process-123")
                .setVariable("employeeName", execution.getVariable("employeeName"))
                .correlateWithResult();
    }
}

```

Please advise. What mistake am I making here.

---

<div class="post-metadata">

**Author:** ![aravindhrs](https://forum.camunda.io/user_avatar/forum.camunda.io/aravindhrs/32/32503_2.png) [@aravindhrs](https://forum.camunda.io/u/aravindhrs)\
**Post date:** [May 26, 2022, 7:37am UTC](https://forum.camunda.io/t/camunda-service-task-error-unknown-property-used-in-expression/37868/2 "2022-05-26T07:37:30Z")

</div>

@harish2610 could you upload your BPMN file?

---

<div class="post-metadata">

**Author:** ![system](https://forum.camunda.io/uploads/default/original/3X/5/8/58d50142eacca605d35cb1ef9e6b86ae85f49436.png) [@system](https://forum.camunda.io/u/system)\
**Post date:** [January 31, 2024, 10:17am UTC](https://forum.camunda.io/t/camunda-service-task-error-unknown-property-used-in-expression/37868/3 "2024-01-31T10:17:11Z")

</div>

Closed on January 31, 2024, 10:17am UTC


