Hi guys:
I want to select and update table at the process end.
Now I setting EndEventListener but I have found the incidentDao is null.
So I just get ENGINE-16004 Exception while closing command context: null
What caused this problem?
Or there any other way to know the process is end?
import com.demo.secondary.incident.dao.IncidentDao;
public class EndEventListener implements JavaDelegate {
@Autowired
private IncidentDao incidentDao;
@Override
public void execute(DelegateExecution execution) throws Exception {
System.out.println(“------------EndEventListener-------------”);
System.err.println(execution.getProcessInstanceId());
System.out.println(incidentDao);
IncidentEntity incidentEntity = incidentDao.getByWorkflowProcessInstanceId(execution.getProcessInstanceId());
}
}
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface IncidentDao extends BaseDao<IncidentEntity, String> {
public IncidentEntity getByWorkflowProcessInstanceId(String workflowProcessInstanceId);
}