my code "Context.getCommandContext() " return null
package com.eurekabio.BIAP.WFS.implemention;
import org.camunda.bpm.engine.impl.cfg.TransactionState;
import org.camunda.bpm.engine.impl.context.Context;
import org.springframework.context.annotation.Configuration;
@Configuration
public class TransactionListener {
public TransactionListener(){
Context.getCommandContext().getTransactionContext().addTransactionListener(TransactionState.COMMITTED, commandContext -> {
System.out.println(commandContext.getCurrentJob().getExecution().getPersistentState());
});
}
}