1. Description
“Unapproved Items” is a usual Sheer UI portlet. Its purpose is to show all the items which are created by the currently logged in user and are not approved yet (the items that didn’t pass all stages of the workflow). It provides a convenient interface to look through the items created by you which aren’t approved so far. It shows the current workflow state the item is in, the user who locked the item, and the total time the item has been in this state.
No special skills are required to work with this portlet – after the package installation and restarting the client you should open the Content editor, switch to the Overview mode, add content using the Portal panel and select this portlet. It is essential not to forget to add the entries into web.config file (please, see readme section of the installation wizard) for correct working of the portlet.
2. Installation guide
“Unapproved Items” portlet is distributed as a standard Sitecore package. Please, refer to the 'Installing Modules and Packages' article if you are not familiar with the standard Packager tool of Sitecore. After the package installation please restart the Sitecore client. Pay attention to the Readme step of the installation wizard: it contains the list of files and items installed and thus it provides you with the information required for uninstalling.
3. User Manual
After successful installation of the package and client restart, open Content editor, switch to the Overview mode and select Add content in Portal pane. All the portlets you see right after switching to this mode have the checkbox Default checked in the appropriate item in Core database. Thus, they are opened by default. Default checkbox isn’t checked in “Unapproved Items” portlet, that’s why you should check it manually.
“Unapproved Items” is a portlet which provides you with the information about the items that are created by you (the user you have logged in as), but have not reached the final state of the workflow; in other words – they are not approved by “workflow administrator”. The portlet shows the current workflow state the item is in, the user who locked the item, and the total time the item has been in this state. You can open the chosen item by double clicking on it in the Portlet body. Press Refresh button from time to time if you want to retrieve the exact time the item stays in its current state or to watch any changes since the last refresh.
4. Architectural Notes
The main functionality of the portlet is placed in the GetNotApprovedItems() method of the TreeScanner class. We take the context workflow provider, retrieve all the existing workflows from this provider, get all the items in these workflows except for those that are in the final state or not created by the currently logged in user. Afterwards the needed information about item state is taken and output in the appropriate form. There is no sense in the additional cache implementation (like in My Locked Items portlet), since it would give no performance improvement (by the task statement the scanning of the whole content tree is never needed).