CAF KM UI Patterns

Embed Size (px)

Citation preview

  • 8/6/2019 CAF KM UI Patterns

    1/21

    Version 1.00 July 2006

    SAP Composite ApplicationSAP Composite ApplicationSAP Composite ApplicationSAP Composite Application

    FrameworkFrameworkFrameworkFramework

    Integrating KM withIntegrating KM withIntegrating KM withIntegrating KM with

    CAF UI PatternsCAF UI PatternsCAF UI PatternsCAF UI Patterns

  • 8/6/2019 CAF KM UI Patterns

    2/21

    SAP AGSAP AGSAP AGSAP AGNeurottstrae 1669190 WalldorfGermanyT +49/18 05/34 34 24F +49/18 05/34 34 20www.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.

    Microsoft, Windows, Outlook, and PowerPoint are registered

    trademarks of Microsoft Corporation.

    IBM, DB2, DB2 Universal Database, OS/2, Parallel Sysplex,

    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.

    Oracle is a registered trademark of Oracle Corporation.

    UNIX, X/Open, OSF/1, and Motif are registered trademarks of

    the Open Group.

    Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame,

    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.

    Java is a registered trademark of Sun Microsystems, Inc.

    JavaScript is a registered trademark of Sun Microsystems, Inc.,

    used under license for technology invented and implemented by

    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.

    These materials are subject to change without notice. These

    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 SAPs Support Services and may not be modified or

    altered in any way.

  • 8/6/2019 CAF KM UI Patterns

    3/21

    T y p o g r a p h ic C o n v e n t io n s

    Type Style Represents

    Example Text Words or characters quoted fromthe screen. These include fieldnames, screen titles,pushbuttons labels, menunames, menu paths, and menuoptions.

    Cross-references to other

    documentation.

    Example text Emphasized words or phrases inbody text, graphic titles, andtable titles.

    EXAMPLE TEXT Technical names of systemobjects. These include reportnames, program names,transaction codes, table names,and key concepts of aprogramming language whenthey are surrounded by bodytext, for example, SELECT and

    INCLUDE.

    Example text Output on the screen. Thisincludes file and directory namesand their paths, messages,names of variables andparameters, source text, andnames of installation, upgradeand database tools.

    Example text Exact user entry. These arewords or characters that youenter in the system exactly asthey appear in thedocumentation.

    Variable user entry. Anglebrackets indicate that youreplace these words andcharacters with appropriateentries to make entries in thesystem.

    EXAMPLE TEXT Keys on the keyboard, forexample, F2 or ENTER.

    I c o n s

    Icon Meaning

    Caution

    Example

    Note

    Recommendation

    Syntax

  • 8/6/2019 CAF KM UI Patterns

    4/21

    Contents

    Prerequisites.............................................................................................................................. 1

    Applicable Releases........................................................................................................... 1Disclaimer........................................................................................................................... 1

    CAF Runtime Property Settings ................................................................................................ 1

    Enterprise Portal Settings.......................................................................................................... 3

    Integrating CAF with KM............................................................................................................ 6

  • 8/6/2019 CAF KM UI Patterns

    5/21

    - 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 andConfiguration Guide.

    Applicable ReleasesThis tutorial is compatible with the following releases:

    SAP NetWeaver 04s

    SAP Composite Application Framework (CAF) 7.0

    DisclaimerAny software coding and/or code lines / strings ("Code") included in this documentation are onlyexamples and are not intended to be used in a productive system environment. The Code is onlyintended 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 beliable for errors or damages caused by the usage of the Code, except if such damages werecaused 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 toconfigure 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.

  • 8/6/2019 CAF KM UI Patterns

    6/21

    - 2 -

    2) Switch to Edit mode and open the properties file Propertysheetapplication.global.properties .

  • 8/6/2019 CAF KM UI Patterns

    7/21

    - 3 -

    Enter custom values for the following entries.

    Field Value

    KM_MACHINE_ADDRESS The address of the machine where KM is installed

    KM_MACHINE_PORT The KM Port

    KM_REPOSITORY /caf-

    IDX_PREFIX CAF-

    Save the settings and restart the J2EE engine.

    Enterprise Portal Settings

    Now we need to perform some configurations of the KM Server for the CAF to communicate tothe 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 fromCAF.

    Navigate to the pages System Administration -> System Configuration -> KnowledgeManagement -> Content Management.

    Switch to the Advanced mode (using the menu on the top). Go to Repository

    Managers -> Security Managers->CAF Security Manager.

  • 8/6/2019 CAF KM UI Patterns

    8/21

    - 4 -

    Create a new CAF Security Manager and enter the following settings.

    Field Value

    Name CAFSecurityManager__ (e.g.

    CAFSecurityManager_EPMWXXX_C03)PermissionRenderingClass

    com.sapportals.wcm.control.security.DefaultPermissionControl

    List ofinvisiblebusinessobjects

    sap.com/caf.core/Document

    URL of CAFWeb Service

    http://:/CAFDataService/Config?style=rpc_enc

    Note: Ensure that the J2EE machine name and port are correct.

    List of Userswith fullaccess.

    Add the portal (km) user name here

    Use this field only in case you want to explore the CAF Repositorythrough Portal.

    Save the changes.

    2) The next step is to setup a CAF Repository Manager.

    Navigate to the page System Administration -> System Configuration -> KnowledgeManagement -> Configura-tion -> Content Management -> Repository Managers ->CAF Repository

    Create a new CAF Repository with the following settings.

    Field Value

    Repositoryname

    caf-

    Note: This is the same as that of the KM_REPOSITORY property thatwe entered in the J2EE engine, without forward slash.

    Prefix /caf-

  • 8/6/2019 CAF KM UI Patterns

    9/21

    - 5 -

    Note: This is the same as that of the KM_REPOSITORY property thatwe entered in the J2EE engine.

    URL of CAFWeb Service

    http://:/CAFDataService/Config?style=rpc_enc

    Note: Ensure that the J2EE machine name and port are correct.

    URL for CAFObject Editor

    http://:/webdynpro/dispatcher/sap.com/caf~UI~ptn~objecteditor/ObjectEditor?app.parameter1=&app.parameter2=E&app.configName=

    Active(Checkbox)

    selected

    SecurityManager

    Select the security manager that we created in the Section 2.

    List ofobjects that

    are editableview CAFObject Editor

    sap.com/caf.core/Document

    Save the changes.

  • 8/6/2019 CAF KM UI Patterns

    10/21

    - 6 -

    Integrating CAF with KM

    In the following sections we will discuss how to use different KM related UI Patternsand attach documents to the CAF Entities. We will consider a business scenariowhere 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.

  • 8/6/2019 CAF KM UI Patterns

    11/21

    - 7 -

    2) Save, generate project code, build and deploy the DC.

    3) Now we will create UI patterns to deal with documents.

    Launch the URLhttp://:/webdynpro/dispatcher/sap.com/caf~UI~configbrowser/ConfigBrowser

    Select Attachmentsfrom the Pattern list and click on the button New Configuration.

    Enter the following values and click the button Show Attachment Attributes.

  • 8/6/2019 CAF KM UI Patterns

    12/21

    - 8 -

    Field Value

    ConfigurationName

    travel_Itinerary

    ServiceModule

    sap.com/carpool/TravelService

    Aspect forobject

    Travel

    Relation Namefor attachment

    itinerary

    Related ObjectName

    sap.com/carpool/Travel

    The list if attributes of Document entity will be displayed.

    Select the fields title, link and description.

    Select Popupas New Attachment Mode. This will lead to the new attachment windowopened as a popup.

    Select the checkbox Allow Document Edit.

  • 8/6/2019 CAF KM UI Patterns

    13/21

    - 9 -

    Enter Attach Itinerary in the Terminology for Attachmentfield. This is the title of theAttachment list screen.

    Enter 5in Number of Visible Rowsfield.

    4) The next step is to configure the New Attachment pattern.

    Enter the name newAttachItineraryin the Configuration Name for New Attachmentfield. Click on the Configure button.

    The New Attachment pattern screen will be opened.

  • 8/6/2019 CAF KM UI Patterns

    14/21

    - 10 -

    The New Profilesection defines the data source of the document. Select all the threecheckboxes.

    Enter the TitleSelect Itinerary.

    Enter browse_km_Itineraryas the Browse UI to select KM resourceandbrowse_km_Targetas the Browse UI to select target KM folder.

    Click on the first Configure button. The File Select pattern for browse_km_Itinerarywill be displayed. Enter the following.

  • 8/6/2019 CAF KM UI Patterns

    15/21

    - 11 -

    Name for Top level label: KM

    Start Directory: /documents_xapps

    Max number of rows to be displayed: 10

    Select File.

    Save the settings and return to the New Attachmentsscreen.

    Click on the second Configure button. The File Select pattern for browse_km_Targetwill be displayed. Enter the following.

    Name for Top level label: KM

    Start Directory: /documents_xapps

    Max number of rows to be displayed: 10

    Select Directory.

    Save the settings and return to New Attachmentsscreen.

  • 8/6/2019 CAF KM UI Patterns

    16/21

    - 12 -

    Save the New Attachment configurations and return to the Attachmentsscreen.

    Save the Attachmentconfiguration.

    5) Now we need to add this Attachmentpattern to an Object Editorpattern for Travel.

    Create a new Object Editorconfiguration for Travelentity with the following settings.

    Field Value

    ConfigurationName

    create_TravelWithItinerary

    Service sap.com/carpool/TravelService

    Header Aspect Travel

    Fields to beshown inObject Editor

    ID, Start Date

    Button Name Submit

    Title of Objectto appear inheader

    Create Travel and Attach Itinerary

    Add a tab to the object editor for the associated Aspect itinerary, with the followingsettings:

    Field Value

    Name toappear on Tab

    Travel Itinerary

    Associated

    Aspect

    Itinerary

    Component com.sap.caf.ui.ptn.objecteditor.tabcomp.DummyComponent

  • 8/6/2019 CAF KM UI Patterns

    17/21

    - 13 -

    Name

    DevelopmentComponent

    sap.com/caf~UI~ptn~attachments

    ConfigurationName

    Travel_itinerary

    Select the newly added tab and click on the Save and Returnbutton.

    This completes the configuration for the KM UI pattern.

    6) Now let us test the UI pattern. Preview the pattern or launch the URLhttp://:/webdynpro/dispatcher/sap.com/caf~UI~ptn~objecteditor/ObjectEditor?app.configName=create_TravelWithItinerary

    Enter an ID (36 digits) and a Start Date. Click on the Add button. The File selectpopup will be displayed.

  • 8/6/2019 CAF KM UI Patterns

    18/21

    - 14 -

    Select a file from your file server and click on OK. Here the source of the file is yourlocal 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, asthis name will be used to form an URL.

  • 8/6/2019 CAF KM UI Patterns

    19/21

    - 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, createinstances of Document entity, attach them to the Travel instance and check thedocument into the KM server.

  • 8/6/2019 CAF KM UI Patterns

    20/21

    - 16 -

  • 8/6/2019 CAF KM UI Patterns

    21/21

    www.sap.com/netweaver