This doPost is getting pretty big, maybe stuff in this block should be pulled out into a reporting function similar to loadProcesses