Skip to content
This repository has been archived by the owner on Nov 29, 2017. It is now read-only.

Workday Integration #430

Open
caseywatts opened this issue Dec 11, 2014 · 7 comments
Open

Workday Integration #430

caseywatts opened this issue Dec 11, 2014 · 7 comments

Comments

@caseywatts
Copy link
Collaborator

Currently we send a .csv file of payform data to someone who manually inputs payment information into a database for us. We'll need to export this data into this into an .xml format that Workday can use.

Previously this was the workflow:

  1. Manager prints the week's payforms to a .csv file
  2. Manager sorts columns in a certain way, converts the file to .xls
  3. Manager emails files to Sue
  4. Sue prints this to paper
  5. An intern manually inputs data into the Oracle database that gets people paid

This is our new workflow:

  1. Manager prints the week's payforms to a .xml file. (We can totally do a generic xml output from Shifts - just like .to_csv but instead .to_xml. Easy!)
  2. Convert to the .xml format Workday requires (the hard part)
  3. Manager uploads the .xml file to a webpage on Workday (ideally Shifts sends a message to Workday directly like .json or something? but that requires work ITS didn't pay for)

We have an example .xml file that workday can accept as input.

This becomes tricky though when we want Shifts to stay generic. We should NOT hard-code in something so Yale-specific like this into the master branch of Shifts. We're hoping to export Shifts eventually, and anything Yale-specific should be abstracted out eventually. I also don't want us to over-engineer a solution either though, this might be tricky.

Brainstorming options:

  1. Really the only way this is going to be sustainable is if Workday accepts a semi-generic input we give them, but it seems that that is not an option right now. The Shifts team and Jemin should continue pushing for the most sustainable option we can determine.
  2. We can write custom code in Shifts (on a "yale" master-like branch but not master? that becomes messy...) to export the appropriate xml.
  3. We can write a script to parse a generic Shifts output xml (just .to_xml) into the format Workday needs, and have managers run that before uploading it.
  4. We could make a tiny sinatra app that takes our generic xml input, converts it to the Workday format (like the script above), then uploads the file to Workday for us. I'm not sure how difficult uploading the file to Workday would be, we'd have to authenticate on Workday somehow. We'd probably need an API key and an endpoint as opposed to an HTML page with an upload form. We can work with the Workday team to discuss this sort of option.
@caseywatts
Copy link
Collaborator Author

Shifts' default xml output can be seen with this code snippet in rails console.

PayformSet.last.payforms.to_xml

To save it to a file, try this:

outputfile = File.new("/tmp/payformset.xml", 'w')
outputfile << PayformSet.last.payforms.to_xml
outputfile.close
open /tmp/payformset.xml

(open is an OS X command only)

@caseywatts
Copy link
Collaborator Author

ooh ooh by the way this is a super exciting issue!!

This is a major prerequisite for us to start marketing this for other student employment groups to use :D

@caseywatts
Copy link
Collaborator Author

Idk if this is helpful maybe:
https://github.com/savonrb/gyoku
https://github.com/jimweirich/builder

@caseywatts
Copy link
Collaborator Author

ooooh could we just do something like .xml.erb? lol
Workday is giving us a template we can use~

@njlxyaoxinwei
Copy link
Contributor

The PTAEO code is set for each category, and each PayformSet needs to generate one XML

@njlxyaoxinwei
Copy link
Contributor

@njlxyaoxinwei
Copy link
Contributor

Workday integration merged into Shifts3 master. Will need to figure what to do with the rails2 branch

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants