21
Version 1.00 – July 2006 SAP Composite Application SAP Composite Application SAP Composite Application SAP Composite Application Framework Framework Framework Framework Integrating KM with Integrating KM with Integrating KM with Integrating KM with CAF UI Patterns CAF UI Patterns CAF UI Patterns CAF UI Patterns

Integrating KM with CAF UI Patterns

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

CAF_HO~2FrameworkFrameworkFrameworkFramework
Integrating KM with Integrating KM with Integrating KM with Integrating KM with
CAF UI PatternsCAF UI PatternsCAF UI PatternsCAF UI Patterns
SAP AGSAP AGSAP AGSAP AG Neurottstraße 16 69190 Walldorf Germany T +49/18 05/34 34 24 F +49/18 05/34 34 20 www.sap.comwww.sap.comwww.sap.comwww.sap.com
© Copyright 2005 SAP AG. All rights reserved.
No part of this publication may be reproduced or transmitted in
any form or for any purpose without the express permission of
SAP AG. The information contained herein may be changed
without prior notice.
Some software products marketed by SAP AG and its distributors
contain proprietary software components of other software
vendors.
trademarks of Microsoft Corporation.
MVS/ESA, AIX, S/390, AS/400, OS/390, OS/400, iSeries,
pSeries, xSeries, zSeries, z/OS, AFP, Intelligent Miner,
WebSphere, Netfinity, Tivoli, and Informix are trademarks or
registered trademarks of IBM Corporation in the United States
and/or other countries.
UNIX, X/Open, OSF/1, and Motif are registered trademarks of
the Open Group.
VideoFrame, and MultiWin are trademarks or registered
trademarks of Citrix Systems, Inc.
HTML, XML, XHTML and W3C are trademarks or registered
trademarks of W3C®, World Wide Web Consortium,
Massachusetts Institute of Technology.
Netscape.
MaxDB is a trademark of MySQL AB, Sweden.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver,
and other SAP products and services mentioned herein as well as
their respective logos are trademarks or registered trademarks of
SAP AG in Germany and in several other countries all over the
world. All other product and service names mentioned are the
trademarks of their respective companies. Data contained in this
document serves informational purposes only. National product
specifications may vary.
materials are provided by SAP AG and its affiliated companies
("SAP Group") for informational purposes
only, without representation or warranty of any kind, and SAP
Group shall not be liable for errors or omissions with respect to
the materials. The only warranties for SAP Group products and
services are those that are set forth in the express warranty
statements accompanying such products and services, if any.
Nothing herein should be construed as constituting an additional
warranty.
Disclaimer
Some components of this product are based on Java™. Any code
change in these components may cause unpredictable and severe
malfunctions and is therefore expressively prohibited, as is any
decompilation of these components.
Any Java™ Source Code delivered with this product is only to be
used by SAP’s Support Services and may not be modified or
altered in any way.
T yp o g r a p h i c C o n v e n t i o n s
Type Style Represents
Example Text Words or characters quoted from the screen. These include field names, screen titles, pushbuttons labels, menu names, menu paths, and menu options.
Cross-references to other documentation.
Example text Emphasized words or phrases in body text, graphic titles, and table titles.
EXAMPLE TEXT Technical names of system objects. These include report names, program names, transaction codes, table names, and key concepts of a programming language when they are surrounded by body text, for example, SELECT and INCLUDE.
Example text Output on the screen. This includes file and directory names and their paths, messages, names of variables and parameters, source text, and names of installation, upgrade and database tools.
Example text Exact user entry. These are words or characters that you enter in the system exactly as they appear in the documentation.
<Example text> Variable user entry. Angle brackets indicate that you replace these words and characters with appropriate entries to make entries in the system.
EXAMPLE TEXT Keys on the keyboard, for example, F2 or ENTER.
I c o n s
Icon Meaning
Enterprise Portal Settings.......................................................................................................... 3
- 1 -
Prerequisites
Before you start with this tutorial you should have installed the following Software:
• SAP Web Application Server Java 7.0 • Portal / KM Server • SAP NetWeaver Developer Studio 7.0
This tutorial is based on the following How-to Guides:
• Create an Application Service
Additionally you should have configured CAF as described in the How-to Guide “Installation and Configuration Guide”.
Applicable Releases This tutorial is compatible with the following releases:
• SAP NetWeaver ’04s
• SAP Composite Application Framework (CAF) 7.0
Disclaimer Any software coding and/or code lines / strings ("Code") included in this documentation are only examples and are not intended to be used in a productive system environment. The Code is only intended better explain and visualize the syntax and phrasing rules of certain coding. SAP does not warrant the correctness and completeness of the Code given herein, and SAP shall not be liable for errors or damages caused by the usage of the Code, except if such damages were caused by SAP intentionally or grossly negligent.
CAF Runtime Property Settings
If the CAF and the KM are installed on the same J2EE engine, follow the steps given below to configure the CAF and KM.
1) Launch the J2EE Visual Admin Tool. Navigate to Services->Configuration Adapter. Go to the tab Runtime -> Display Configuration. Navigate to Configuration -> apps -> sap.com -> caf~runtime~ear -> appcfg.
- 2 -
2) Switch to Edit mode and open the properties file Propertysheet
application.global.properties.
- 3 -
Field Value
KM_MACHINE_ADDRESS The address of the machine where KM is installed
KM_MACHINE_PORT The KM Port
Enterprise Portal Settings
Now we need to perform some configurations of the KM Server for the CAF to communicate to the KM.
1) Launch the Portal (KM) and login with the User who has System Administration role.
First we will setup a CAF Security Manager which regulates the access of KM from CAF.
Navigate to the pages System Administration -> System Configuration -> Knowledge Management -> Content Management.
Switch to the Advanced mode (using the menu on the top). Go to Repository Managers -> Security Managers->CAF Security Manager.
- 4 -
Create a new CAF Security Manager and enter the following settings.
Field Value
Permission Rendering Class
sap.com/caf.core/Document
http://<J2EE_MACHINE_NAME>:<PORT>/CAFDataService/Config?styl e=rpc_enc
Note: Ensure that the J2EE machine name and port are correct.
List of Users with full access.
Add the portal (km) user name here
Use this field only in case you want to explore the CAF Repository through Portal.
Save the changes.
2) The next step is to setup a CAF Repository Manager.
Navigate to the page System Administration -> System Configuration -> Knowledge Management -> Configura-tion -> Content Management -> Repository Managers -> CAF Repository
Create a new CAF Repository with the following settings.
Field Value
Repository name
caf-<J2EE_MACHINE>
Note: This is the same as that of the KM_REPOSITORY property that we entered in the J2EE engine, without forward slash.
Prefix /caf-<J2EE_MACHINE>
- 5 -
Note: This is the same as that of the KM_REPOSITORY property that we entered in the J2EE engine.
URL of CAF Web Service
http://<J2EE_MACHINE >:<PORT>/CAFDataService/Config?style=rpc_enc
Note: Ensure that the J2EE machine name and port are correct.
URL for CAF Object Editor
http://<J2EE_MACHINE >:<PORT>/webdynpro/dispatcher/sap.com/caf~UI~ptn~objecteditor/Obj ectEditor?app.parameter1=<guid>&app.parameter2=E&app.configName =<configuration>
Active (Checkbox)
Security Manager
Select the security manager that we created in the Section 2.
List of objects that are editable view CAF Object Editor
sap.com/caf.core/Document
Integrating CAF with KM
In the following sections we will discuss how to use different KM related UI Patterns and attach documents to the CAF Entities. We will consider a business scenario where we attach a Travel Itinerary document to instances of Travel entity services.
1) For attaching documents, we use the CAF core entity service called Document (sap.com/caf.core/Document).
In the NetWeaver IDE, open the Travel Entity service. Switch to the Attributes tab.
Add Document as a related entity to the Travel entity.
Change the name of the related entity to itinerary, and description to Itinerary.
- 7 -
2) Save, generate project code, build and deploy the DC.
3) Now we will create UI patterns to deal with documents.
Launch the URL http://<was_host>:<was_port>/webdynpro/dispatcher/sap.com/caf~UI~configbrowser/ ConfigBrowser
Select Attachments from the Pattern list and click on the button New Configuration.
Enter the following values and click the button Show Attachment Attributes.
- 8 -
The list if attributes of Document entity will be displayed.
Select the field’s title, link and description.
Select Popup as New Attachment Mode. This will lead to the new attachment window opened as a popup.
Select the checkbox Allow Document Edit.
- 9 -
Enter “Attach Itinerary” in the Terminology for Attachment field. This is the title of the Attachment list screen.
Enter 5 in Number of Visible Rows field.
4) The next step is to configure the New Attachment pattern.
Enter the name newAttachItinerary in the Configuration Name for New Attachment field. Click on the Configure button.
The New Attachment pattern screen will be opened.
- 10 -
The New Profile section defines the data source of the document. Select all the three checkboxes.
Enter the Title “Select Itinerary”.
Enter browse_km_Itinerary as the Browse UI to select KM resource and browse_km_Target as the Browse UI to select target KM folder.
Click on the first Configure button. The File Select pattern for browse_km_Itinerary will be displayed. Enter the following.
- 11 -
Start Directory: /documents_xapps
Select File.
Save the settings and return to the New Attachments screen.
Click on the second Configure button. The File Select pattern for browse_km_Target will be displayed. Enter the following.
Name for Top level label: KM
Start Directory: /documents_xapps
Select Directory.
- 12 -
Save the New Attachment configurations and return to the Attachments screen.
Save the Attachment configuration.
5) Now we need to add this Attachment pattern to an Object Editor pattern for Travel.
Create a new Object Editor configuration for Travel entity with the following settings.
Field Value
Configuration Name
ID, Start Date
Button Name Submit
Create Travel and Attach Itinerary
Add a tab to the object editor for the associated Aspect itinerary, with the following settings:
Field Value
Travel Itinerary
Associated Aspect
Travel_itinerary
Select the newly added tab and click on the Save and Return button.
This completes the configuration for the KM UI pattern.
6) Now let us test the UI pattern. Preview the pattern or launch the URL
http://<was_host>:<was_port>/webdynpro/dispatcher/sap.com/caf~UI~ptn~objectedit or/ObjectEditor?app.configName=create_TravelWithItinerary
Enter an ID (36 digits) and a Start Date. Click on the Add button. The File select popup will be displayed.
- 14 -
Select a file from your file server and click on OK. Here the source of the file is your local computer.
Click on the Add button again. This time select World Wide Web as the File Source. Enter the following details.
World Wide Web: http://www.sap.com
Name: testLink
Please note that the name should not contain any spaces or special characters, as this name will be used to form an URL.
- 15 -
Click OK. The link will be added to the document list.
Click on the Submit button. This will now create an instance of Travel entity, create instances of Document entity, attach them to the Travel instance and check the document into the KM server.
- 16 -
- 17 -
www.sap.com/netweaver