Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos


How often have you seen the following UWL UI:






and how often have you wished that you could have a UWL with a better UI like:


Many times in your portal implementation you are completely revamping the look and feel of the portal and the standard UWL just doesn't fit in. You can always take the SAP shipped PAR file and modify that to achieve the desired look & feel, however it's not easy as it'll paobably require decompiling of lots of classes and even then it can become pretty complex.


You can now make use of the UWL API released with NetWeaver 2004s SP9 to achieve this. The JavaDoc can be referenced from http://www.sdn.sap.com/irj/sdn/javadocs

    <property name="ServicesReference" value="SAPJ2EE::library:tckmcbc.uwl~api"/>




Also make sure that you have bc.uwl.service.api_api.jar file in the build path for your project. Now in the JSP proceed as follows:







The above code gets a handle to the UWL service from the portal runtime and creates a session for the current user.






The above code makes use of the Item Manager to get a collection of the worklist items for the current user.




The above code gives the items in a java.util.List object which you can iterate through to retrieve the individual items and also the other details like Subject, Due Date etc.






Now the only thing that remains is to know the URL of the individual items for being able to launch the items from the custom UWL items hyperlinks. Here it's important to know the type of the work item i.e. whether it's coming from the Adhoc Workflow or Guided procedure or R/3 workflow. To get the type of item do this:



String connectorId = item.getConnectorId();


This returns a string with value as AdHocWorkflowConnector or GuidedProceduresConnector or WebFlowConnector. The URL should be formed depending on the type of the item. For example for the AdHocWorkflowConnector the default URL is:


+
"/irj/portal?NavigationTarget=ROLES%3A//portal_content/every_user/general/uwl/com.sap.netweaver.bc.uwl.uwlSapWebDynproLaunch&System=SAP_LocalSystem&WebDynproDeployableObject=sap.com%2Ftc%7Eeu%7Ejwf%7Ewf%7Ewdtd&WebDynproApplication=JWFTaskDetail&DynamicParameter=internalId%3D" + item.getInternalId() + "%26action%3Dsubprocess%26item_type%3D" + item.getItemType() + "%26external_obj_type%3D"+ item.getExternalType() + "%26dueDate%3D" + item.getDueDate() + "%2B12%253A00%253A00.0%26appContext%3D" + item.getAppContext() + "%26System%3DSAP_LocalSystem%26launchContext%3DUWL%26subject%3D" + item.getSubject() + "%26external_obj_id%3D" + item.getExternalObjectId() + "%26item_id%3D" + item.getExternalId() + "%26wi_id%3D" + item.getExternalId() + "&NavigationContext="
+


Now when you click on the link you are presented the same work item screen that you would have got with the standard UWL.

28 Comments