RabbitMQ Code Mods

Testing RabbitMQ Connectivity

Run the following command from the server that will be connecting

openssl s_client -connect esb.hawaii.edu:5671

If it comes back with cert info, you are allowed through the firewall.  Otherwise, it would hang, time out or disconnect

Code Changes

Inject rabbitmq callouts from these  classes

  • EmpDeleteAction.java
    • personnel records can be deleted even after the record has been established
      • if persposition records > 1, then only the persposition record is deleted
      • if persposition record == 1, then persposition and personnel records are deleted
  • EmpPage1Action.java
    • ADD_INIT_REC = creating the initial record
    • ADD_ADDITIONAL_REC = creating record where one already exists
    • UPDATE_EXISTING_REC = updating the active record
  • StaffPage2Action.java
    • individual can update their own record (office location, phone, fax)
  • EmpPage2Action.java
    • ADD_INIT_REC = creating the initial record
    • UPDATE_EXISTING_REC = updating the active record
  • EmpPage1SaveAction.java

    • when the status goes inactive, this class is called to get the data from the datamart
    • for HRDW staff
    • search determines the action
  • StaffPage1Action.java
    • for non-PS staff
    • status can be changed back and forth
    • search determines the action

Blue side (external package for staff)

  • role not set

Blue side (StdPage2Display for students)

  • no updates allowed
  • data pulled from SECE for page1 data
  • data pulled from itsadmin db for page2 data

Search

SideHRDW StaffNon-HRDW staffStudent
Blue

mainStaffPage1Display.do

mainStaffPage1Display.doextractSeceData.do
Yellow

empPage1Display.do

  • empPage1.jsp

staffPage1Display.do

  • staffAddPage1.jsp (all fields editable)
extractSeceData.do

Yellow side

  • staff
    • hrdw search is for those with and empID (pulls data from HRDW)
    • local search is for those without an empID (pulls from itsadmin db)
    • admin can update sectID
    • roleID can be updated but that's not the role we want; identify the role based on the java class being called
    • empPage1Action.java updates the sectId
      • quick save and final save do almost the same thing except that the final save performs data validations
    • empPage2Action.java updates the office, phone and fax
      • quick save and final save do almost the same thing except that the final save performs data validations
    • staffPage2Action updates the record for the non-HRDW staff like RCUH paid employees
  • students
    • stdPage1Submit.java
      • can only update the sectID
    • stdPage2Submit.java
      • updates the office, phone and fax 

When to send addAffiliation record

  • staff
    • when Dana creates the affiliation record
    • when employee changes section
  • student
    • when Heidy creates the affiliation record
    • when employee changes section

When to send modifyAffiliation record

  • when the officeLocation changes
  • when the role changes

When to send deleteAffiliation record

  • staff
    • Dana sets the inactive flag on the persposition record; not reliant on the termination date
    • when the orgHierarchy changes
  • student
    • active/inactive is done automatically because ITSADMIN reads data from SECE on the fly when looking up a student 
      • poses an issue with Dana when a student is hired as a full time staff because she is unable to create the persposition record for the employee's staff record
    • the pposStatus field for students is null because it's pulled from SECE
    • Problem: we can't reliably know when to publish a deleteAffiliation message
      • Option 1
        • allow Heidy to inactivate the student records and we track that in persposition
          • Cons
            • Heidy has to do work when she didn't have to before
              • however, she only needs to do this when a ITS student transitions to ITS staff; otherwise the SECE termination would handle it after 2 pay periods
            • code modification effort is involved
              • enable editing of the status field
              • persist the status in persposition
                • if the status is inactive in db, that overrides when SECE has
                • if the status is null in db, use what SECE has
      • Option 2
        • use a modified version of the ACTIVE_STAFF_STUDENT view that includes pposId or plcid and the status
        • can we use a database trigger, i.e. when the status becomes inactive?
      • Option 3
        • store all persposition and personnel data in db
          • all queries would then be done against the db
        • create a batch job to sync data between ITSADMIN and SECE 

Decided to go with Option 3. Utilize pposStatus for students instead of solely relying on the SECE plcStatus for active/inactive students. This allows the search and db queries to go off of 1 status for both staff and students. plcStatus is used for informational purposes only. A daily batch job is executed to compare active (pposStatus='A') students against the plcStatus in SECE. If the position is terminated in SECE, then the pposStatus is set to 'I' in ITSADMIN. PO for students do not have to inactivate records unless they need to.