Monthly Archives: May 2010

Dong Shin 05.13.2010

  • working from home
  • reinstalled the Flex Builder plugin for Eclipse Galileo
    • links/com.adobe.flexbuilder.feature.core.link file is missing “path=” at the beginning of the line!
  • exported com.edgeti.Uilts package from Visibility2 to com.fgm.ServletUtils
  • SQLScriptRunner runs as java app, converting it to Servlet
  • Troubleshooting Servlet crashing hard with Tomcat…..
    • turned out web.xml had duplicate lines
    • fixed and deploys good now
    • logs/SQLScriptRunner.log visible
    • on to actual interface implementation!

Mike 5.12.2010

  • More attempting to build Dong’s Project, getting closer
  • Now that the back end code for slide shows are working I tried to move to the drag and drop interface for creating slide shows.  However, my database was wiped at one point so I tried refilling it with fake data.  Now something is throwing a null pointer exception somewhere, catching it, and not logging it.  The fake roles look correct in the database but won’t load in to the AccountManager GUI and I can’t create a user without the roles so I’m stuck in a giant rabbit hole.

Phil 5.12.2010

7:30 – 3:30

  • Helped John Williams out a bit with generating some unusual tables
  • Changed the employees_standard table to reflect the new organization of the data. Had a talk with Mike C. about automatically generating details xml files
  • After plugging in my computer, found it running *really* slowly. Deleting my trash (25,025 items) to see if that speeds things up.
  • Need to talk to Dong about backticking Ingest Manager – done
  • Apparently, I left of 11 employee classification types. Need to fix that tomorrow.
  • Adding user management to scripting

Dong Shin 05.12.2010

  • refresh () in onCreateComplete in FinancialDataCanvas causing the data view update twice…. Fixed now and it’s lot faster.
  • Changed FinancialDataDGItemRenderer to highlight the current month’s $ cells only. Removed whole column highlight
  • highlight the cells that fails the criterias
    • less than 90% of next cell
    • no in previous cell
  • cells with comments generate red borders?

Mike 5.11.2010

  • Started writing test cases to help debug and ensure the slideshow database code was working.  Banged my head against a very weird foreign key issue for many hours… Inserts were throwing an error using the JDBC connection but working fine from the MYSQL workbench.  I could even step through with the debugger, copy and paste the query to mysql right before it ran in java and it would execute fine.  The internet was no help so in my flailing I changed the table engine type from MyISAM to InnoDB and it worked…
  • Now I have a set of very nice test cases and all the methods listed in my previous posted are tested and working.
  • Tried to build Dong’s ProjProtfolioMgrClient, finally got connected to the new maven repo but still having build problems

Phil 5.11.2010

7:30 – 3:30

  • Fix ServerLog – done. The problem is the changeout of the remote object to the javautils package. Had to generalize a bit.
  • Fix PublishServlet – done
  • Demo prep (screenshots) – done
  • Demo. Went well, I think. One of the lab PMs liked the demonstration enough that he wanted a copy for his lab

Dong Shin 05.11.2010

  • charts for each dataset now displays $ figures only – removed % figures
  • InvoiceFormWindow changed to have individual items added to the list and manage items
  • removed all message Alerts when saving data….
  • To install the Java development tools in the standalone version of Flex Builder:
  1. Use the Help > Software Updates > Find and Install menu command to open the Install/Update dialog box
  2. Select Search for new features to install.
  3. Click Next.
  4. In the results, choose Europa Discovery Site.
  5. Click Finish.
  6. Select the Java Development package to install.
  7. Click Next.
  8. Accept the license.
  9. Click Finish.
  • trying to track down slow data retrieval

Dong Shin 05.10.2010

  • deployed ProjPortfolioMgr to Phil’s PC
    • created projportfolio user and grant permissions – make sure MySQL restarts!!!!!
  • The crash problem on Charts may only be in DEBUG….
  • checking out are building Visibility 2 for the IngestMgr trouble-shooting
  • Continue w/o Invoice added to InvoiceFormWindow
  • added $ Goals to the FinancialDataGrid – calculated from % and fundingAmount

Phil 5.10.2010

7:30 – 4:30

  • Prepping for demo
  • Got dong’s war file deployed on my machine. That works, rather than building. He’s going to ask Mike to try building and see where the problem lies
  • Problems with ie today – it can’t open multiple Flex programs.
  • Spent some time getting the projmanager user working in mySql
  • better pull for errors: SELECT p.title as project, f.name as funding, o.* FROM obligations_outlays o, fundings f, projects p;
  • IngestManager problems:
    • Can’t parse special characters into column names or the values can’t be inserted properly in the column. For example, ‘2/15/60’ won’t read in at all, ‘2-15-60’ won’t have any data in the columns, and ‘2_15_60’ is a date format that Actionscript can’t recognize
    • If the XML SOLR file has CRs in the text file, they are kept, which screws up VISIBILITY. They need to be stripped.

Script to look for decreasing values in outlays:

# Strip off a column based on its name
def stripColumn(headers, table, columnName):
    newRow = []
    for item in headers:
        if item != columnName:
            newRow.append(item)
    newTable = [];
    newTable.append(newRow)
    for row in table:
        newRow = []
        for i in xrange(len(headers)):
            if headers[i] != columnName:
                newRow.append(row[i])
        newTable.append(newRow)
    return newTable

# Find a month that is less than the previous
def errorsToSolrXml(doc, root, header, table):
    for row in table:
        for i in xrange(len(row)-1):
            if header[i].count("month_") > 0:
                cur = int(float(row[i]))
                next = int(float(row[i+1]))
                #print row[0]+": "+header[i]+" = "+str(cur)
                if(cur > next):
                    #print header[i]+" = "+str(cur)+" > ("+str(next)+")"

                    errorNode = doc.createElement('doc')
                    root.appendChild(errorNode)
                    fieldNode = doc.createElement('field')
                    fieldNode.setAttribute('name', 'type')
                    textNode = doc.createTextNode(str(row[0]))
                    fieldNode.appendChild(textNode)
                    errorNode.appendChild(fieldNode)

                    fieldNode = doc.createElement('field')
                    fieldNode.setAttribute('name', 'cur_month')
                    textNode = doc.createTextNode(header[i])
                    fieldNode.appendChild(textNode)
                    errorNode.appendChild(fieldNode)

                    fieldNode = doc.createElement('field')
                    fieldNode.setAttribute('name', 'next_month')
                    textNode = doc.createTextNode(header[i+1])
                    fieldNode.appendChild(textNode)
                    errorNode.appendChild(fieldNode)

                    fieldNode = doc.createElement('field')
                    fieldNode.setAttribute('name', 'value')
                    textNode = doc.createTextNode(str(cur - next))
                    fieldNode.appendChild(textNode)
                    errorNode.appendChild(fieldNode)

#################### 'main'

impl = getDOMImplementation()

jf = ScriptFacades()
table = jf.dbQuery('project_portfolio', 'SELECT * from obligations_outlays where project_id=1 and year=2010')
tableData = table.getTable()
newTable = stripColumn(tableData[:1][0], tableData[1:], 'uid')

errorDoc = impl.createDocument(None, "add", None)
root = errorDoc.documentElement
errorsToSolrXml(errorDoc, root, newTable[:1][0], newTable[1:])
#print errorDoc.toprettyxml()
jf.publishXml("/obligation_errors.xml", errorDoc.toxml())

Dong Shin 05.09.2010

  • chart for all obligation / overlay data added – crashes when mouse over at multiple points intersect…..
  • funding now supports to FY14
  • worked down the list from the meeting….. Project Creation works!!!!!!!!!!!!!

Dong Shin 05.08.2010

  • reworked calculation of the percent cells
  • order of rows organized by obligations and outlays
  • fixed bug caused by FORMAT (col, 2)…
  • Summary Panel reworked for the new data structure
  • Project Viewer is pretty much done!
  • started on Project Creation

Dong Shin 05.07.2010

  • financial data editing works
  • new obligation/overlay types
  • invoice data entry works – need to make it addable
  • DataGridFormWindow almost finished – need to customize for each entry type

Phil 5.7.2010

7:30 – 5:30

  • Working on writing a script that does something with Dong’s data

Inserting data for months – no invoice though

jf = ScriptFacades()

table = jf.dbQuery('project_portfolio', 'SELECT uid from obligations_outlays where project_id=1')
tableData = table.getTable()
print tableData[1:]

for uid in tableData[1:]:
    for month in xrange(1,25):
        monthName = 'month_'+str(month)
        query = 'UPDATE obligations_outlays set '+str(monthName)+' = '+str(random.randint(1000,2000)*month)+' where uid = '+str(uid[0])
        print query
        jf.dbQuery('project_portfolio', query)

Getting data and publishing

# This method converts a DbTable (A list of lists) into an Apache SOLR xml document
def solrXmlFromListList(doc, root, headers, table):
    for row in table:
        rowNode = doc.createElement('doc')
        root.appendChild(rowNode)
        #print row
        for i in xrange(len(headers)):
            #print str(headers[i])+" = "+str(row[i])
            fieldNode = doc.createElement('field')
            fieldNode.setAttribute('name', headers[i])
            textNode = doc.createTextNode(str(row[i]))
            fieldNode.appendChild(textNode)
            rowNode.appendChild(fieldNode)

# Strip off a column based on its name
def stripColumn(headers, table, columnName):
    newRow = []
    for item in headers:
        if item != columnName:
            newRow.append(item)
    newTable = [];
    newTable.append(newRow)
    for row in table:
        newRow = []
        for i in xrange(len(headers)):
            if headers[i] != columnName:
                newRow.append(row[i])
        newTable.append(newRow)
    return newTable

# Change month_xx to a year/date string
def mapDates(row, year):
    for i in xrange(len(row)):
        if row[i].count("month_") > 0:
            splits = row[i].split('_');
            month = (int(splits[1])-1)%12
            addYear = (int(splits[1])-1)/12
            row[i] = str(month+1)+"-1-"+str(year+addYear)
            #print row[i]

#################### 'main'

jf = ScriptFacades()
table = jf.dbQuery('project_portfolio', 'SELECT * from obligations_outlays where project_id=1 and year=2010')
tableData = table.getTable()
newTable = stripColumn(tableData[:1][0], tableData[1:], 'uid')

mapDates(newTable[:1][0], 2010)

impl = getDOMImplementation()
myDoc = impl.createDocument(None, "add", None)
rootElement = myDoc.documentElement
solrXmlFromListList(myDoc, rootElement, newTable[:1][0], newTable[1:])
#print myDoc.toprettyxml()
jf.publishXml("/obligation_outlays_proj_1_year_2010.xml", myDoc.toprettyxml())

Phil 5.6.2010

7:30 -4:30

  • Today, in 1862, the Mexican Army defeated the French at the battle of Puebla. In case you were wondering.
  • Richard M is getting Tomcat working better on the LDAT server. We will be ready to continue experimenting in a week or so.
  • While waiting for Dong to roll in his changes from yesterday, I’m going to try and fix the case where the JVM holding a jython instance dies from some fatal error. Wound up deleting the ScriptEntity instance from the static map of all script instances and loading a new instance. Seems to work, but we need to test on other servers.
  • Got Dong’s data, but the project will not build

Mike 5.6.2010

  • Created two new tables for storing slideshows and references to their slides, have sql update script for updating database
  • Implemented the following methods in UsersAndRoles for interacting with the DB:
    • addSlideShow
    • deleteSlideShow
    • getSlideShow
    • updateSlideShow
    • getSlideShowTree
  • Look at Phil’s comments:
    • will add create table script to… somewhere
    • will try putting slide controls in open space at the top and have them only appear once a slideshow is loaded
    • Transitions will be TOUGH, but hey, I need stuff to work on anyway