Figure 3   Application Workflow

Person What does the user want to do? What does the user need to do? What happens after a successful submission?
Hiring manager Add a new job order request. Fills the required fields, entering hiring manager information and human resources manager information. Then clicks "Send FORWARD to HR Manager." Email is sent to the specified human resources manager with job ID and password information. An email reminder is sent to the hiring manager.
Edit and send back to human resources manager. Edit the app with job ID and password, then click "Resend FORWARD to HR Manager." Email is sent to the specified human resources manager.
Human resources manager Send to human resources recruiter. Edit the app with job ID and password (or click on email link), enter the human resources recruiter information, then click "Send FORWARD to HR Recruiter (Approved)." Email is sent to the specific human resources recruiter with job ID and password information.
Send back to the hiring manager. Edit the app with job ID and password (or click on email link), enter note, and then click "Send BACK to Hiring Manager with note." The note is message encapsulated in an email and is sent back to the hiring manager.
Human resources recruiter Forward the request to the Web manager. Edit the app with job ID and password, (or click on email link), enter the Webmaster information, then click "Send FORWARD to Webmaster (Approved)." Email is sent to the specific Web manager or Webmaster with ID and password information.
Send back to human resources manager. Edit the app with job ID and password (or click on email link), enter note, and then click "Send BACK to HR Manager with note." The note is encapsulated in an email message and is sent back to the human resources manager.
Webmaster Send back to human resources recruiter. Edit the app with job ID and password (or click on email link), enter note, and then click "Send BACK to HR Recruiter with note." The note is encapsulated in an email message and is sent back to the human resources recruiter.
Post to Web site. Edit the app with job ID and password (or click on email link), select the template, select Web site posting, then click "Send FORWARD to Website." Will be listed as Web site posting until deactivated by Web manager. Email is sent to the hiring manager, human resources manager, and human resources recruiter.
Post to intranet. Edit the app with job ID and password (or click on email link), select the template, select intranet posting, then click "Send FORWARD to Website." Will be listed as internal posting until deactivated by Web manager. Email is sent to the hiring manager, human resources manager, and human resources recruiter.
Remove listing from Web site/intranet and so on. Edit the app with job ID and password (or click on email link). Select "deactivate" posting, then click "Update Application Status." Email is sent to the hiring manager, human resources manager, and human resources recruiter.


Figure 6   Request.asp Snippet


 ...
 JobID= Request("JobID")
 JobRequisitionNumber= Request("JobRequisitionNumber")
 JobDepartment= Request("JobDepartment")
 JobTitle= Request("JobTitle")
 JobHiringManager= Request("JobHiringManager")
 JobManagerEmail= Request("JobManagerEmail")
 JobGrade= Request("JobGrade")
 JobType= Request("JobType")
 JobStatus= Request("JobStatus")
 JobSplashImage= Request("JobSplashImage")
 'JobNeededDate= Request("JobNeededDate")
 JobNeededDateMonth= Request("JobNeededDateMonth")
 JobNeededDateDay= Request("JobNeededDateDay")
 JobNeededDateYear= Request("JobNeededDateYear")
 
 ...
 
 WorkflowName2=Request("WorkflowName2")
 WorkflowName3=Request("WorkflowName3")
 WorkflowName4=Request("WorkflowName4")
 
 WorkflowSentToEmail1=Request("WorkflowSentToEmail1")
 WorkflowSentToEmail2=Request("WorkflowSentToEmail2")
 WorkflowSentToEmail3=Request("WorkflowSentToEmail3")


Figure 7   Workflow Stages

Stage Process owner Value of Stage
1 Hiring manager A
2 Human resources manager S
3 Human resources recruiter V
4 Webmaster L


Figure 8   Getting OnlyView


 if mode="E" and Action="" then
     if Stage=STAGE1 then
         sqlstr="SELECT * FROM Tblworkflow WHERE workflowJobID=" & Cint(JobID) _
         & " and workflowPassword1='" & Password & "'"
     elseif Stage=STAGE2 then
         sqlstr="SELECT * FROM Tblworkflow WHERE workflowJobID=" & Cint(JobID) _
         & " and workflowPassword2='" & Password & "'"
     elseif Stage=STAGE3 then
         sqlstr="SELECT * FROM Tblworkflow WHERE workflowJobID=" & Cint(JobID) _
         & " and workflowPassword3='" & Password & "'"
     elseif Stage=STAGE4 then
         sqlstr="SELECT * FROM Tblworkflow WHERE workflowJobID=" & Cint(JobID) _
             & " and workflowPassword4='" & Password & "'"
         end if            
     '--- check to see if an edit is possible for the click depending upon the 
     '--- status of the workflow
     set rs=Conn.execute(sqlstr)
     if rs.eof then
         '- not a valid ID and password
         rs.close
         set rs=nothing
         Conn.close
         set Conn=nothing
         msg= msg & "<li>Your have entered invalid information for the _
         particular record, or" & " you currently cannot edit the record "
         Response.redirect ("Error.asp?msg=" & Server.urlencode(msg))
     Else '-valid ID and password
         CurrentStage=rs("WorkFlowStage")
         '-is status valid    
         if rs("WorkFlowStage")=Stage then
             OnlyView=false
         Else
             OnlyView=true
         end if
         Load JobID, Conn
     end if            
 end if


Figure 9   Using OnlyView


 <font size=-1 face=arial ><u><b>Requisition Number</b></u></font>
 <br>
 <%
 if OnlyView=true then
     Response.write ( JobRequisitionNumber)
 %>
 <br>
 <%
 else
 %>
     <input type=text name=JobRequisitionNumber value="<%=JobRequisitionNumber%>"
         maxlength=50 size=50><br>
 <%
 end if
 %>


Figure 12   CheckError


 <SCRIPT LANGUAGE=VBScript RUNAT=Server>
 function CheckError()
 Dim strerror
     if JobRequisitionNumber="" then strerror= strerror &"<li>Requisition Number"
      if JobDepartment="" then strerror= strerror &"<li>Job Department"
      if JobTitle="" then strerror= strerror &"<li>Job Title"
     if JobGrade="" then strerror= strerror &"<li>Job's Grade"
      if JobType="" then strerror= strerror &"<li>Job's Type"
      if JobSplashImage="" then strerror= strerror &"<li>Splash Image"
      if JobNeededDate="" then strerror= strerror &"<li>Date Needed"
     if Not IsDate(JobNeededDate) then
         strerror= strerror &"<li>Invalid Date Needed entry"
     end if
     if CDate(JobNeededDate) < CDate(FormatDateTime(now(), VBShortDate)) then
         strerror= strerror &"<li>Invalid Date Needed entry, date entered cannot _
             be before current date"
     end if
      if JobNumberOpen="" then strerror= strerror &"<li>Job Number Open"
      if JobReqType="" then strerror= strerror &"<li>Requirements Type"
      if JobSalaryLow="" then strerror= strerror &"<li>Lowest Salary"
      if JobSalaryHigh="" then strerror= strerror &"<li>Highest Salary"
      if JobSiteName="" then strerror= strerror &"<li>Site Name"
      if JobSiteAddress1="" then strerror= strerror &"<li>Site Address #1"
      if JobSiteCity="" then strerror= strerror &"<li>Site City"
      if JobSiteState="" then strerror= strerror &"<li>Site State"
      if JobSitezipcode="" then strerror= strerror &"<li>Site Zip Code"
      if JobShortDescription="" then strerror= strerror &"<li>Job short _
          Description"
      if JobFullDescription="" then strerror= strerror &"<li>Job Full Description"
     CheckError=strerror    
 End Function
 </script>


Figure 13   Adding a Job Request


 <SCRIPT LANGUAGE=VBScript RUNAT=Server>
 '------------------------------------------------------
 Function Add(Conn)
 Dim JobRequestID, sqlstr
         JobRequestID=GenerateTransactionID()
         sqlstr="INSERT INTO JobWeb ("
         sqlstr = sqlstr & "JobRequisitionNumber"
         sqlstr = sqlstr & ",JobDepartment"
         sqlstr = sqlstr & ",JobTitle"
         sqlstr = sqlstr & ",JobHiringManager"
         sqlstr = sqlstr & ",JobHiringManagerEmail"
         sqlstr = sqlstr & ",JobGrade"
         sqlstr = sqlstr & ",JobType"
         sqlstr = sqlstr & ",JobStatus"
         sqlstr = sqlstr & ",JobSplashImage"
         sqlstr = sqlstr & ",JobNeededDate"
         sqlstr = sqlstr & ",JobNumberOpen"
         sqlstr = sqlstr & ",JobRecruiter"
         sqlstr = sqlstr & ",JobReqType"
         sqlstr = sqlstr & ",JobSalaryLow"
         sqlstr = sqlstr & ",JobSalaryHigh"
         sqlstr = sqlstr & ",JobSiteName"
         sqlstr = sqlstr & ",JobSiteAddress1"
         sqlstr = sqlstr & ",JobSiteAddress2"
         sqlstr = sqlstr & ",JobSiteCity"
         sqlstr = sqlstr & ",JobSiteState"
         sqlstr = sqlstr & ",JobSitezipcode"
         sqlstr = sqlstr & ",JobShortDescription"
         sqlstr = sqlstr & ",JobRequestID"
         sqlstr = sqlstr & ",JobFullDescription"
         sqlstr=sqlstr & ") values ("
         sqlstr=sqlstr & "'" & SQLEncode(JobRequisitionNumber) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobDepartment) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobTitle) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobHiringManager) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobManagerEmail) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobGrade) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobType) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobStatus) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobSplashImage) & "',"
         sqlstr=sqlstr & "#" & SQLEncode(JobNeededDate) & "#,"
         sqlstr=sqlstr & "'" & SQLEncode(JobNumberOpen) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobRecruiter) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobReqType) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobSalaryLow) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobSalaryHigh) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobSiteName) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobSiteAddress1) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobSiteAddress2) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobSiteCity) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobSiteState) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobSitezipcode) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobShortDescription) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobRequestID) & "',"
         sqlstr=sqlstr & "'" & SQLEncode(JobFullDescription) & "'"
         sqlstr=sqlstr & ")"
         Conn.execute(sqlstr)
         sqlstr= "Select max(JobID) as MaxJobID From JobWeb"
 Dim rs    
         set    rs=Conn.execute(sqlstr)
         Add=rs(0)
 
 End Function
 </script>


Figure 14   Updating JobWeb


 <SCRIPT LANGUAGE=VBScript RUNAT=Server>
 '------------------------------------------------------
 Sub Update(ThisConn)
     sqlstr="Update JobWeb "
         sqlstr=sqlstr & "SET "
         sqlstr=sqlstr & "JobRequisitionNumber='" & SQLEncode(JobRequisitionNumber)
             & "'"
         sqlstr=sqlstr & ",JobDepartment='" & SQLEncode(JobDepartment) & "'"
         sqlstr=sqlstr & ",JobTitle='" & SQLEncode(JobTitle) & "'"
         sqlstr=sqlstr & ",JobHiringManager='" & SQLEncode(JobHiringManager) & "'"
         sqlstr=sqlstr & ",JobHiringManagerEmail='" & SQLEncode(JobManagerEmail) &
             "'"
         sqlstr=sqlstr & ",JobGrade='" & SQLEncode(JobGrade) & "'"
         sqlstr=sqlstr & ",JobType='" & SQLEncode(JobType) & "'"
         sqlstr=sqlstr & ",JobStatus='" & SQLEncode(JobStatus) & "'"
         sqlstr=sqlstr & ",JobSplashImage='" & SQLEncode(JobSplashImage) & "'"
         sqlstr=sqlstr & ",JobNeededDate=#" & SQLEncode(JobNeededDate) & "#"
         sqlstr=sqlstr & ",JobNumberOpen='" & SQLEncode(JobNumberOpen) & "'"
         sqlstr=sqlstr & ",JobRecruiter='" & SQLEncode(JobRecruiter) & "'"
         sqlstr=sqlstr & ",JobReqType='" & SQLEncode(JobReqType) & "'"
         sqlstr=sqlstr & ",JobSalaryLow='" & SQLEncode(JobSalaryLow) & "'"
         sqlstr=sqlstr & ",JobSalaryHigh='" & SQLEncode(JobSalaryHigh) & "'"
         sqlstr=sqlstr & ",JobSiteName='" & SQLEncode(JobSiteName) & "'"
         sqlstr=sqlstr & ",JobSiteAddress1='" & SQLEncode(JobSiteAddress1) & "'"
         sqlstr=sqlstr & ",JobSiteAddress2='" & SQLEncode(JobSiteAddress2) & "'"
         sqlstr=sqlstr & ",JobSiteCity='" & SQLEncode(JobSiteCity) & "'"
         sqlstr=sqlstr & ",JobSiteState='" & SQLEncode(JobSiteState) & "'"
         sqlstr=sqlstr & ",JobSitezipcode='" & SQLEncode(JobSitezipcode) & "'"
         sqlstr=sqlstr & ",JobShortDescription='" & SQLEncode(JobShortDescription)
             & "'"
         sqlstr=sqlstr & ",JobFullDescription='" & SQLEncode(JobFullDescription) &
             "'"
         sqlstr=sqlstr & " WHERE JobID=" & request("JobID")
         ThisConn.execute(sqlstr)
         
 End Sub
 </script>