}
return null;
}
protected FormRow getRow(WorkflowAssignment wfAssignment, String multirowBaseObjectName, Integer rowNumber, Object[] fieldMapping, Map object) {
FormRow row = new FormRow();
for (Object o : fieldMapping) {
Map mapping = (HashMap) o;
String fieldName = mapping.get("field").toString();
String jsonObjectName = WorkflowUtil.processVariable(mapping.get("jsonObjectName").toString(), null, wfAssignment, null, null);
if (multirowBaseObjectName != null) {
jsonObjectName = jsonObjectName.replace(multirowBaseObjectName, multirowBaseObjectName + "[" + rowNumber + "]");
}
String value = (String) getObjectFromMap(jsonObjectName, object);
if (value == null) {
value = jsonObjectName;
}
if (FormUtil.PROPERTY_ID.equals(fieldName)) {
row.setId(value);
} else {
row.put(fieldName, value);
}
}
if (row.getId() == null || (row.getId() != null && row.getId().trim().length() == 0)) {
if (multirowBaseObjectName == null) {
row.setId(wfAssignment.getProcessId());
} else {
row.setId(UuidGenerator.getInstance().getUuid());
}
}
Date currentDate = new Date();
row.setDateModified(currentDate);
row.setDateCreated(currentDate);
return row;
}