History Variable with Java Native API

Dear Team,

I am trying to fetch the history variables with a native custom query. But giving the result as null.

String query ="SELECT double_ FROM ACT_HI_VARINST where NAME_=‘amount’ order by create_time_ desc limit 1 ";

	HistoricVariableInstance histVariable =  execution.getProcessEngineServices().getHistoryService().
			createNativeHistoricVariableInstanceQuery().
			sql(query).singleResult();

Please suggest, any changes required.

Regards,
Kedari

Hi @kedarik,

Could you please try to SELECT * instead of SELECT double_

HI @hassang

It’s worked. Thanks for your support.

Regards,