Status Monitor Pop Up

Since the days of client-server and the desktop installed application, PeopleSoft has struggled with how to treat a pop up window. In the old days, the trusty DoModal let you ask the user for a small amount of info while keeping the main page clear of the details. Running in a browser, however, the DoModal function doesn't provide a good user experience.

There are a few ways to address this. You can launch new browser windows without the PeopleSoft portal navigation on the left. That provides a slimmer pop up. You can even get fancy with your JavaScript and remove the menu bar and tool bar. However, you've really just done a transfer to a new component. You're no longer part of the original component.

Then along comes the Status Monitor in the Approval Workflow Engine. A brief over view: The status monitor is an html area on the page that shows you the approval steps for the transaction. It's a nice, big and bright visual representation of the process. Additionally, it lets you add approvers to the transaction. If you click on the plus icon, up pops a small browser window asking you for a new approver. When you enter the approver and click OK, the window goes away and the Status Monitor back on the original page gets updated with the new approver.

How does it do it? How did it solve the pop up problem? I'm glad you asked, because I think the answer is a pretty slick solution.

When the plus button gets clicked, JavaScript opens up a new pop up window (there's no server trip here for the main component). The url of the pop up window is an iScript. The iScript returns html to create a small form in the pop up window.

So far, so good, but here's where it gets interesting. When the OK button on the pop up is clicked, two things happen. The first is a submit to another iScript containing the info the user filled out. That iScript post loads the submitted data into a global variable. The second thing that happens is in the response from the iScript. The response includes JavaScript that calls back to the main page then closes the pop up.

The call back to the main page is a function that sets a field then submits the main page. The field that was updated (a work field on the Status Monitor subpage) has FieldChange PeopleCode on it. When that FieldChange runs, it checks the global variable and adds the new approver. When the main page comes back, it has the new approver in the Status Monitor.

When I saw the feature I was impressed. When I dug into the code I was even more impressed. I have to tip my cap to the folks behind this one. They took tools we're all familiar with and put them together to build something new.

Post a Comment:
Comments are closed for this entry.