Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In this tutorial we will get all the submission XMLs for this workflow from the frevvo submission database. Then we will parse the submission XMLs to extract the required data (StartDate, NumberOfDays, TypeOfLeave and IApproveThisVacationRequest fields) for a particular Employee and display this data as a vacation report for that Employee on an HTML page.

Our Vacation Report will look like this:

Image Removed

Please see the submission-report-tutorial.war file of the web application that we are going to create.

...

  1. Download and copy the war file to <frevvo-install-dir>\frevvo\tomcat\webapps directory.
  2. Re-start frevvo. This will expand the war.
  3. Edit the <frevvo-install-dir>\frevvo\tomcat\webapps\submission-report-tutorial\showReport.jsp file.
  4. On line number 20, change

    Code Block
    service.login ("designer@tutorial", "qa");

    to

    Code Block
    service.login ("<your-designer-user>@<your-tenant>", "<designer-user-password>");
  5. Save the file and re-start frevvo. 

Execute the Example Application

  1. Download the Leave Approval Workflow and upload it in your designer user.
  2. To check if your web application is working, browse http://<your frevvo server host>:<port>/submission-report-tutorial/showReport.jsp in your browser, E.g. http://localhost:8082/submission-report-tutorial/showReport.jsp. You should see a blank report like this:
  3. Now, to see the vacation report of an employee:
    1. As the Tenant Admin
      1. Create a manager user.
      2. Create an employee user with the User Id 'demoemployee' and set the Reports To field for this employee user to the manager user that you created above. This will correctly route the flow from employee to manager.
      3. Create a Role "HR" and another user who has the role "HR." This is where the third step of the workflow will route.
    2. Login as the employee user and browse the Share URL of your Leave Approval workflow. Then enter details for the leave request and submit the form.
    3. Login as the manager user and from the manager's task list approve the pending leave approval task for employee.
    4. Login as the HR user and approve the pending leave approval task.
  4. A submission was created and you should be able to open it from your workflow's submission repository.
  5. Browse http://localhost:8082/submission-report-tutorial/showReport.jsp?username=demoemployee. You should see the this submission in the employee's Vacation Report. 

    Note

    Note the '''username=''' parameter that is appended to this URL. This shows submissions for a specific employee. Replace 'demoemployee' with any valid user Id.

...