Retrieve task variables

@CamundaSelector(type = "serviceTask", event = ExecutionListener.EVENTNAME_START)
@Component
class LoggingListener(private val runtimeService: RuntimeService) : ExecutionListener {

    override fun notify(delegateExecution: DelegateExecution) {

    }
}

How could i retrieve variable names or values which I set with setVariable("user", user) in my JavaDelegate class (Its simple service task) ? I’m going to create a global logging so i decided to use reactor bus listeners.

Is delegateExecution.getVariables() what you are looking for? If not, please clarify your question.

Yup exactly! Sorry for simple question I was testing on service task without any input variables… Thank you :slight_smile:

EDIT:
Hmm It shows every variable in task’s scope. Is it possible to get only these directly related to task?

See delegateExecution.getVariablesLocal(). There is some documentation at https://docs.camunda.org/manual/7.9/user-guide/process-engine/variables/ on these concepts.