WorkflowAssignment wfAssignment = (WorkflowAssignment) this.getProperty("workflowAssignment");
if ((primaryKey != null && !primaryKey.isEmpty()) || wfAssignment != null) {
try {
if (tableName != null && tableName.length() != 0) {
ApplicationContext appContext = AppUtil.getApplicationContext();
FormDataDao formDataDao = (FormDataDao) appContext.getBean("formDataDao");
if (primaryKey == null && wfAssignment != null) {
WorkflowManager workflowManager = (WorkflowManager) appContext.getBean("workflowManager");
WorkflowProcessLink link = workflowManager.getWorkflowProcessLink(wfAssignment.getProcessId());
if (link != null) {
primaryKey = link.getOriginProcessId();
} else if (primaryKey == null) {
primaryKey = wfAssignment.getProcessId();
}
}
String cacheKey = tableName + "##" + primaryKey;
FormRow row = formDataCache.get(cacheKey);
if (row == null) {
row = formDataDao.loadByTableNameAndColumnName(tableName, columnName, primaryKey);
formDataCache.put(cacheKey, row);
}
if (row != null && row.getCustomProperties() != null) {
Object val = row.getCustomProperties().get(columnName);