12-30-2012 01:48 PM
List<HistoricDetail> hds = historyService.createHistoricDetailQuery().processInstanceId(processInstanceId).variableUpdates().orderByTime().desc().list();
<discriminator javaType="string" column="TYPE_">
<case value="VariableUpdate" resultMap="historicVariableUpdateResultMap_postgres"/>
<case value="FormProperty" resultMap="historicFormPropertyResultMap"/>
</discriminator>
<discriminator javaType="string" column="TYPE_">
<case value="VariableUpdate" resultMap="historicVariableUpdateResultMap"/>
<case value="FormProperty" resultMap="historicFormPropertyResultMap"/>
</discriminator>
12-30-2012 04:04 PM
Hi,
After upgrade to Activiti 5.11 the query:
List<HistoricDetail> hds = historyService.createHistoricDetailQuery().processInstanceId(processInstanceId).variableUpdates().orderByTime().desc().list();
return HistoricDetail that not implements HistoricDetailVariableInstanceUpdateEntity, then is impossible access variable informations (via cast).
…
but "historicVariableUpdateResultMap_postgres" is not defined, then the MyBatis fails to map data.
My workaround is change "historicVariableUpdateResultMap_postgres" in "historicVariableUpdateResultMap" that is defined after in HistoricDetail.xml.
….
Now query works and is possible to cast returned HistoricDetail to HistoricVariableUpdate.
Can you apply patch on next release please?
Best regards!
12-30-2012 04:37 PM
List<HistoricDetail> hds = historyService.createHistoricDetailQuery().processInstanceId(processInstanceId).variableUpdates().orderByTime().desc().list();
for(HistoricDetail hd : hds){
if(hd instanceof HistoricVariableUpdate){
HistoricVariableUpdate var = (HistoricVariableUpdate)hd;
}
}
01-03-2013 04:38 AM
01-06-2013 04:43 PM
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.