// null check for Oracle DB to prevent missing workflow variable
if (c == null) {
c = "";
}
if (c instanceof String || c instanceof Long || c instanceof Boolean || c instanceof Double) {
WorkflowVariable vd = new WorkflowVariable();
vd.setId(variableId);
vd.setToUpdate(eaName.equalsIgnoreCase(VARIABLE_TO_PROCESS_UPDATE));
vd.setVal(c);
vd.setJavaClass(c.getClass());
WMEntity varEnt = Shark.getInstance().getAdminMisc().getVariableDefinitionInfoByUniqueProcessDefinitionName(
sConn.getSessionHandle(),
act.container().manager().name(),variableId);
String varName = variableId;
if (varEnt != null) {
varName = varEnt.getName();
if (varName == null || varName.equals("")) {
varName = variableId;
}
}
String varDesc = "";
if (varEnt != null) {
WMFilter filter = new WMFilter("Name", WMFilter.EQ, "Description");
filter.setFilterType(XPDLBrowser.SIMPLE_TYPE_XPDL);
varDesc = Shark.getInstance()
.getXPDLBrowser()
.listAttributes(sConn.getSessionHandle(),
varEnt,
filter,
false)
.getArray()[0].getValue().toString();
}
vd.setName(varName);
vd.setDescription(varDesc);
ret.add(vd);
}
}
}
}