This application is intended to be a sample which illustrates the following:
THIS APPLICATION IS NOT INTENDED FOR ANY OTHER PURPOSE. You are free to copy this code and build upon it.
A Flexible Spending Account is one in which employees may deposit pre-tax dollars to be used for medical expenses. Employees typically elect to sign up for this plan with the administrator of the plan (the employer) and select a dollar amount that they want deposited into their account. When an employee incurs a medical expense, the employee submits a claim which, if approved, results in a withdrawal from the account and the remittance of the approved amount to the employee.
This application provides support for managing Flexible Spending Accounts.
The administrator interface has support for
The employee interface has support for
The system can only handle ONE claim per employee at any time. Once the claim has been deleted, a new claim may be submitted.
The system comprises of:
In the following, $SR
will be used to denote the
directory in which you have installed the server (server root).
The system is shipped with the following main files/directories:
Running this part requires JDK. It has been tested using JDK 1.0.2.
You should have installed JDK before proceeding. $JDK
will be used to refer to the directory where you have installed your
JDK.
Open a shell and ensure that the following environment is present:
.
$SR/js/samples/flexi
$SR/wai/java/nisb.zip
$JDK/lib/classes.zip
$JDK/bin
Once the above environment is setup:
java FlexiServer
You should see a message like:
after which the appplication will go into a listening mode waiting for service requests.Started FSA Admin: Admin[Server,oid=PersistentId[repId=IDL:Flexi/Admin:1.0,objectName=FSA-Admin]]
Ensure that you have 'Server-side JavaScript' turned on before proceeding any further. You can do this via the Admin Server.
Edit your server's obj.conf
file. Find the line which
looks similar to the following:
Prepend the following to the classpath:Init classpath="$SR/wai/java/nisb.zip:$SR/js/samples:$SR/plugins/java/classes/serv3_0.zip: $SR/plugins/java/local-classes" ldpath="$SR/plugins/java/bin" fn="SJavaBootInit"
$SR/js/samples/flexi
Edit your server's jsa.conf
file. Add the following line
to the list of applications present there:
This installs the SSJS Flexi application into your server. Note that this application has a start page which gets executed upon server startup. This start page attempts to connect to the Remote Flexi Application. So, ensure that you have the remote application running before you start your server, once you've added the flexi SSJS application to the server.flexi uri=/flexi object=$SR/js/samples/flexi/flexi.web home=fsa.html start=start.html client-mode=client-cookie maxdbconnect=0
Restart the server. The server should come up with the fexi application.
Point your browser to:
http://server-name/flexi
This brings you to the interface selector page. Select either the admin or the employee interface. To get a quick feel for the application follow the steps outlined in the section Typical Flow of Events.'