By nitkal on May 12, 2008
The expense-report widget, that is delivered as a part of the Project WebSynergy bundle, models a typical workflow scenario where SAW (Simple API for Workflow) could be used. In an organization, employees raise expense reports and submit them to the managers to be approved or rejected. Once submitted, the report triggers a workflow process(in a workflow engine like JavaCAPS), and becomes a pending task for the associated manager. When the manager approves/rejects the report, the report goes to the next step in the workflow process.
This widget has been integrated with a simple JavaCAPS workflow process. If a workflow engine is unavailable, the SAW calls to the Workflow engine can be disabled using the preferences. If the call to the workflow engine is enabled without configuring the engine, it results in a system error.
In addition to Workflow, this widget has the following features:
- JMaki - Uses JMaki Yahoo Datatable
- Usage of ServeResource feature of JSR286 portlets for Ajax requests (For Displaying Report Details)
An Expense Report is a report comprising details of the expenses (like
Business Travel, Relocation, BroadBand Bills Claim) incurred by an
employee that he could reclaim from the organisation with the manager
approval. The typical claim process works like this:
Creating a New Expense Report
1. Employee (say Paul) logs in to websynergy, navigates to the sunspace tab to the expense report widget, and creates a new expense report, providing details of individual items of the report.
2. He can choose to either save the report or submit the report on creation.
Viewing Reports Summary
3. On login, Paul can view the summary of Saved(to be submitted by him) Reports and Pending(to be approved by the manager) Reports that are raised by him.
4. On clicking a particular Report ID, he can view the details of the report including the individual item details (Viewing Report details is done without a page refresh through Ajax calls).
Submitting Saved Reports
5. When he views a Saved Report Detail, he has an option to Submit it. When a report is submitted, a workflow process is triggered in JCAPS through a web service call.
6. When Paul's manager (Mary)logs in, she can see a list of pending reports that he has raised (in the first table) and a list of pending reports raised by her reportees (second table), waiting for his approval.
7. The list of Pending tasks is obtained from the JCAPS through SAW API
Approval and Rejection of Reports
8. On clicking on any report that is waiting for her approval, she can view the details of the report (without page refresh) and approve or reject it.
Here is a step-by-step screencast showcasing the widget.