From a pure Java API point of view, you can use query manager to get the list of variables for a particular process. This is an example:
public List getProcessVariables(String processName){
List _result = null;
try{
_result = _queryManager.getProcessVariables(processName);
}
catch(Exception e){
System.out.println("Error in TaskManager getProcessVariables");
System.out.println(e.getMessage());
}
return _result;
You can also get the variables value for a particular process instance with the following code:
public List getProcessVariablesValue(long processID){
List procVar = null;
try {
procVar = _queryManager.getProcessVariableValues(processID);
if(procVar == null) {
System.out.println("No process variables");
}
int size = procVar.size();
System.out.println(size);
for(int i = 0; i < size; i++){
MultiTypeVariable var = ((MultiTypeVariable)procVar.get(i));
System.out.println("name = " + var.getName());
System.out.println("value = " + var.getValue());
System.out.println("getTitle = " + var.getTitle());
System.out.println("getType = " + var.getType());
System.out.println("isSearchable = " + var.isSearchable());
System.out.println("isVisible = " + var.isVisible());
}
}
catch (Exception e) {
e.printStackTrace();
System.out.println("ERROR!!!");
}
return procVar;
}
... where _queryManager = TaskManagerClientFactory.getQueryManager(_factory);
Hope this helps.
Jasmin