-
1. Re: jBPM How to get variables of terminated processes
max_82 Nov 16, 2013 1:27 PM (in response to max_82)Nevermind, I found the way to get variables browsing the API. For those who might find this topic interesting, here is the code to get the process variable "offerId":
List<ProcessInstanceLog> processDetail = null;
try
{
processDetail = JPAProcessInstanceDbLog.findProcessInstances();
}
catch(Exception e)
{
CustomExceptionHandler.handleException(e);
}
for (int i=0; i<processDetail.size();i++){
long piid=processDetail.get(i).getId();
List<VariableInstanceLog> variables=JPAProcessInstanceDbLog.findVariableInstances(piid);
for (int j=0;j<variables.size();j++){
//logger.info(variables.get(j).getVariableId().toString());
String variableId = variables.get(j).getVariableId();
if(variableId.equals("offerId")){
String offerId = variables.get(j).getValue();
}
}
}