A Real World Example of Flexible User Interface Part 1
I’m writing this as I’m sat in a plane flying over the Atlantic Ocean on my way to do a customer specific EP300 course for a client in the US. EP300 is a 5 day SAP course all about Knowledge Management and Collaboration. Particularly when I do customer specific courses (where the instructor comes to your workplace to do the course) I get specific requests about how to do things that that particular company wants to do. So, I thought I would give a real world example of flexible UI as requested on one of these courses. I have split this weblog into two parts, simply because it is quite long. A company I taught EP300 are using XML forms to enter data. XML forms are easy to use forms to save data in XML format, using XSL files (XML stylesheets) to convert the XML into a pretty form using HTML, with different views depending on how you are viewing it (for example the form will be different if you are editing it compared with if you are viewing it). Example XML forms in the portal are news and FAQs. In knowledge management we also have an approval process, also sometimes known as approval workflow. It has nothing to do with SAP workflow that we have in R/3 / ERP, however the principle is similar. The notifications for approval appear in the Universal Work list alongside the SAP workflow items. The idea behind approval workflow is that documents will not appear to end users until the document has been approved. For example we all have access to the HR procedures in our companies. If a new procedure is being drafted (or an existing one updated), the HR department do not want us to see the new version until it is finished and approved. So until the document has been approved, it will not appear to the end users. The company using XML forms wanted to use approval workflow with their forms. However, as standard the XML forms iviews do not have and approval menu on them. So we needed to add the approval menu to these iviews. This can be done using the Flexible User Interface. In flexible user interface, the object that sets the layout and menus is the layout set. Almost all KM iviews are based on a KM navigation iview, with a layout set specified in the properties of the iview. The two standard layout sets used within XML forms are NewsBrowser (for display only) and NewsExplorer (for creating and editing XML forms). So the layout set we need to add the approval menu to is the NewsExplorer. Now, in order to stop our changes being overwritten when we apply an SP-stack, we need to copy the standard NewsExplorer Layout Set. So I’ve gone into system administration -> system configuration -> knowledge management -> content management -> user interface -> settings. This is where almost all of this weblog will be configured. So first we duplicate the standard NewsExplorer. I’m calling mine NewsExplorer_Approve. In a layout set we have a layout controller, which sets things like how many frames it has and where they are e.g. tree at the side. We have a collection renderer, which sets how the folders and documents overall are displayed. We then finally have the resource renderer, which sets how the individual files and folders are displayed. We are going to change the collection renderer, so we need to take a duplicate of that. So in resource renderer setting, I have duplicated NewsResourceRenderer to NewsResourceRenderer_Approve. In our resource renderers we then have command groups. Command groups are groups of commands….. i.e. menus. Since we want to add approval to our menu we need to change our command groups. We also have command groups for resources (files), folders and links. We only need to change the group for resources, but they all use the same command group as standard. It is using a group called NewsGroup. This is the one we will duplicate. In the image below we can see that the command group is specified in the Resource Renderer. So I duplicate NewsGroup to NewsGroup_Approve. In NewsGroup_Approve I then add in another command group called StatemanagementGroup. This is the command group that contains the approval menu items. Approval is also known as statemanagement, hence the name. To find this I basically looked through the list of commands to find it. I have also kept the standard menu items edit_xml_forms and delete. You could also add any other command you wanted here. So at this point we have created a layout set, a resource renderer and a command group. These are the main elements of flexible user interface. We now need to link these elements together and assign them to an iview. That will be in my next weblog.