01-20-2014 08:14 AM
startProcessInstanceByKey(processDefinitionKey, map);
NativeHistoricVariableInstanceQuery historicVariableInstanceQuery = historyService.createNativeHistoricVariableInstanceQuery();
historicVariableInstanceQuery.sql("SELECT * FROM " + managementService.getTableName(HistoricVariableInstance.class) +
" WHERE EXECUTION_ID_=#{executionId} AND NAME_=#{variableName}");
historicVariableInstanceQuery.parameter("executionId", executionId);
historicVariableInstanceQuery.parameter("variableName", variableName);
HistoricVariableInstance historicVariableInstance = historicVariableInstanceQuery.singleResult();
if (historicVariableInstance != null) {
return (T) historicVariableInstance.getValue();
}
return null;
return (T) historicVariableInstance.getValue();
(SimpleActivitiQueryService.java:65) I get a NPE:
java.lang.NullPointerException
at org.activiti.engine.impl.persistence.entity.ByteArrayRef.ensureInitialized(ByteArrayRef.java:93)
at org.activiti.engine.impl.persistence.entity.ByteArrayRef.getBytes(ByteArrayRef.java:46)
at org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity.getBytes(HistoricVariableInstanceEntity.java:123)
at org.activiti.engine.impl.variable.ByteArrayType.getValue(ByteArrayType.java:32)
at org.activiti.engine.impl.variable.SerializableType.getValue(SerializableType.java:51)
at org.activiti.engine.impl.persistence.entity.HistoricVariableInstanceEntity.getValue(HistoricVariableInstanceEntity.java:114)
at myPkg.SimpleActivitiQueryService.findLastValueOfVariable(SimpleActivitiQueryService.java:65)
ByteArrayRef.java:93
, Context.getCommandContext()
is null.01-21-2014 03:10 AM
01-29-2014 10:48 AM
01-21-2014 05:09 AM
01-30-2014 02:24 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.