SAP NetWeaver Composite
Application Framework (CAF)
Disclaimer
This presentation outlines our general product direction and should not be relied on in making a purchase decision. This
presentation is not subject to your license agreement or any other agreement with SAP. SAP has no obligation to pursue any
course of business outlined in this presentation or to develop or release any functionality mentioned in this presentation. This
presentation and SAP's strategy and possible future developments are subject to change and may be changed by SAP at any
time for any reason without notice. This document is provided without a warranty of any kind, either express or implied, including
but not limited to, the implied warranties of merchantability, fitness for a particular purpose, or non-infringement. SAP assumes
no responsibility for errors or omissions in this document, except if such damages were caused by SAP intentionally or grossly
negligent.
1. Composite Application Framework (CAF) for NetWeaver CE 7.1
2. Modeling with CAF
3. Summary
Composite Application Framework (CAF)
Service
Enablement
Services
Services
Services
mySAP CRM
SAP NW BI
mySAP ERP
Composite
Process
<<Step>> Create Patient <<Step>> Request Appointment <<Step>> Create Appointment Yes <<Step>> Notify Patient Exists? No <<Step>> Find PatientBusiness
Logic
Service
Development
Service
Composition
User Interface
Name Title CheckBusiness Objects
and Services:
CAF
Service Development
Service Composition /
Mash-ups
Model Business
Objects
Compose application
logic
Consume and Expose
Web Services
SAP Composite Application Framework (CAF) is a application framework based on EE5 for
building and running composite applications.
Services – Main Building Blocks of CAF
Entity Services
Entity services provide generic access to data objects. They consist of attributes and generic access
operations. Their state is persisted in a data store. By using entity services, you take advantage of the
flexibility in accessing different types of data either locally or from distributed Backends.
External Services
External services provide access to external data sources. They act as easy to use proxies, hiding
complexity of used transport protocols and technologies to the user (RFC / WebService).
Application Services
Application Services implement the business logic of the application. Application services can use
entity and external services and furthermore provide the capability to implement custom coding.
CAF Design time
The Composite Application Framework consists of the following design time
elements:
Composite Application perspective
- Delivered with the SAP NetWeaver Developer Studio, includes the
service modeling tools for
creating and modeling business objects ,
creating and modeling application services,
service consumption and service provisioning.
Business Objects
represent the persistence layer.
Can generate local persistence with JPA and Dictionary Tables.
Can be mapped to remote external services for persistence or
Application Services
represent the business logic.
Are based on EJB 3.0.
Where you add your own custom business logic coding.
External Services
can be imported for use in Application Services or Business Objects.
CAF Designtime in SAP NetWeaver Developer
Studio
Window->Open Perspective->Other->Composite Application
You use composite application projects as the basis for your business
applications in the Composite Application Framework (CAF) environment.
When you create a new
development component
of Composite Application
type, the following projects
are automatically created
in CAF:
Dictionary
EJB Module
Metadata
Enterprise
UME Permissions
The caf.core project is a central component
delivered with CAF. It contains predefined and
commonly-used data types and services that
are easy to integrate into any composite
application
CAF Runtime Configuration
CAF Runtime Consists of Administration Tools and Testing Tools.
Administrative tools for security and external service destination configuration has been moved
to the SAP NetWeaver Administrator.
Security Configuration – configure ACLs and Business Rules.
External RFC Service Configuration – configure destinations for external services calls.
External WS Service Configuration – configure the endpoint for the WS that is being
consumed.
CAF Service Browser – Testing Your Services
The CAF Service Browser allows you to view deployed CAF services and test
them.
Found at alias /caf – allows you to test your Application Services and Business
Objects.
Speed Up Service Development –
More Modeling, Less Coding
CAF generates the same code that you would have to mostly write by hand in
Java EE.
EJBs, JPA, Logging & Tracing, Dictionary Tables, External Services, Test Harness,
Authorizations
1. Composite Application Framework (CAF) for NetWeaver CE 7.1
2. Modeling with CAF
3. Summary
CAF Service Layers
CAF can create all layers of a service (DB, Persistence, Application Logic).
BO
oBO
1Application
Service
1:n
Business Logic
Persistence
Stateless EJBs
Stateless EJBs, JPA, Java Dictionary Tables
Everything but the application logic is generated via modeling!
Diagram Editor Designer
A true modeling experience for CAF – Streamlines application modeling, Better
User Experience, and gives an application overview.
Diagram Palette Toolset
The Diagram Palette has tools to create all the different kinds of
objects, connections, and external services available in CAF.
Objects: Business Objects, Application Services, Attributes, Operations
Just select the kind of CAF object you want to create and then
click on the diagram!
External: RFC, Web Service, Web Service Provider
RFC, Web Service: Generates a proxy to call the services.
Web Service Provider: Generates a Application Service skeleton –
just add the implementation logic.
Just select the kind of CAF object you want to create and then
click on the diagram!
Connections: BON Association, AS Dependency
BON Association (Business Object Node Association) – for
associating BO’s with other BO’s.
AS Dependency – for connecting Application Services to BO’s and
External Services
Business Object Modeler
Is a tool for defining
business objects
,
attributes
and their
properties
as well as
relations
between business objects.
These objects and their definitions serve to
generate
tables, table-relations,
DDIC-elements and basic methods for reading, writing, changing, deleting &
searching data (
life-cycle methods
).
Generated methods are implemented as
EJBs
.
Distinguishes between
local
and
remote
persisted business objects
Local persistency – data is saved in composite itself via JPA
Remote persistency – data is saved in backend system
Additional infrastructure features like
authorization
, and
logging & tracing
are
integrated automatically and
interfaces
to these services are created.
Modeling Business Objects
The Diagram Editor makes modeling Business Objects easy.
Simply select the Business Object Node icon in the Palette and click on the
diagram.
To add attributes click the Add Attributes Speed Button on the business object.
To set the attribute name and type click on the attribute in the Business Object so that it
allows you to edit it
Type the Name of the attribute followed by “:” then the type of the attribute – the Intellisense
dropdown of types will be displayed.
Modeling Business Objects - Connections
Business Objects can be connected to other Business Objects in two different ways. Cross BO
connections and Child BO Connections.
To create a Child BO connection you use the Add Child BO Speed Button which will create the Child and
the Connection.
To Create a Cross BO connection you select the BON Association in the Palette. Then click on the
BO you want to associate from, to the BO you want to associate to.
Runtime Connection Differences
Child BO – if parent is deleted at runtime, then related
children are deleted – Cascading Delete.
Cross BO – If one of the BO’s in the association is
deleted, the other BO remains (does not get deleted).
Modeling Associations Between Business
Objects
Association
borrow
1 0,n
1 1
1 n
Customer
Vehicle
Car
Radio
Team
Members
An association models
relationships between objects
of same-level classes
An aggregation is a special case
of association. It is used to
represent ownership or a
whole/part relationship
A composition is a strong kind of
aggregation in which if the
aggregate is destroyed, then the
parts are destroyed as well (In
aggregation, this is not
Simple Data Types
Simple Data Types based on XSD types are available for you to use in your Business Objects. In
addition you can create your own Simple Data Types.
When you create a CAF project, an associated project named
caf.core is also created – it contains all the standard data types.
You can also reuse types associated with External Services that you
have imported.
Service Mashups with Business Objects
Business Objects can be mapped to external services to create Service Mashups.
This is done by mapping the BO CRUD operations to External Service operations.
Not all attributes need to be mapped. Those
attributes that are not mapped will be persisted
locally.
In fact, all attributes will still be persisted
locally in addition to remotely.
Just in case you want to switch back to
local persistence…you won’t lose the data.
BO
oBO
11:n
RFC
WS
Application Service Modeler – Building the
Business Logic
General
Defines general properties for the Application
Service.
Dependencies
Defines the Entities and External Services that
are used by the Application Service.
Operations
Defines the Interfaces of Operations
implemented by the Application Service
including life-cycle and custom methods.
Datasource
Implementation
Defines the Implementation of the Application
Service. Java coding is entered here to
implement each operation defined in the
Operations tab.
Testing Application Services
1) Choose “Test
Service”
2) Navigate to the
appropriate Application
Service in the CAF
Service Mashups
CAF can create “Service Mashups” AKA Composite Services which are the
combining of services to create a new or enhanced service.
Steps to creating a service mashup:
Import one to many External Services (Web Service or RFC)
Map Application Service operations to External Services or
Map Business Object CRUD operations to External Services
BO
oBO
1Application
Service
1:n
WS
RFC
WS
RFC
1. Composite Application Framework (CAF) for NetWeaver CE 7.1
2. Modeling with CAF
3. Summary
Agenda
Summary
CAF makes it easy to create Business Logic – Data + Services !
CAF is rapid development – minutes instead of days in EE 5
CAF can be used to create new services out of old services…i.e. Service Mashups.
Modeling CAF in CE 7.1 EhP1 is easier than ever with the Diagram Editor and will get even
easier in future releases.
© SAP 2008 / Page 27
Copyright 2008 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.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, Duet, Business ByDesign, ByDesign, PartnerEdge 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 and associated logos displayed are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.
The information in this document is proprietary to SAP. This document is a preliminary version and not subject to your license agreement or any other agreement with SAP. This document contains only intended strategies, developments, and functionalities of the SAP® product and is not intended to be binding upon SAP to any particular course of business, product strategy, and/or development. SAP assumes no responsibility for errors or omissions in this document. SAP does not warrant the accuracy or completeness of the information, text, graphics, links, or other items contained within this material. This document is provided without a warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability, fitness for a particular purpose, or non-infringement.
SAP shall have no liability for damages of any kind including without limitation direct, special, indirect, or consequential damages that may result from the use of these materials. This limitation shall not apply in cases of intent or gross negligence.
The statutory liability for personal injury and defective products is not affected. SAP has no control over the information that you may access through the use of hot links contained in these materials and does not endorse your use of third-party Web pages nor provide any warranty whatsoever relating to third-party Web pages
Weitergabe und Vervielfältigung dieser Publikation oder von Teilen daraus sind, zu welchem Zweck und in welcher Form auch immer, ohne die ausdrückliche schriftliche Genehmigung durch SAP AG nicht gestattet. In dieser Publikation enthaltene Informationen können ohne vorherige Ankündigung geändert werden.
Einige von der SAP AG und deren Vertriebspartnern vertriebene Softwareprodukte können Softwarekomponenten umfassen, die Eigentum anderer Softwarehersteller sind.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, Duet, Business ByDesign, ByDesign, PartnerEdge und andere in diesem Dokument erwähnte SAP-Produkte und Services sowie die dazugehörigen Logos sind Marken oder eingetragene Marken der SAP AG in Deutschland und in mehreren anderen Ländern weltweit. Alle anderen in diesem Dokument erwähnten Namen von Produkten und Services sowie die damit verbundenen Firmenlogos sind Marken der jeweiligen Unternehmen. Die Angaben im Text sind unverbindlich und dienen lediglich zu Informationszwecken. Produkte können länderspezifische Unterschiede aufweisen.
Die in diesem Dokument enthaltenen Informationen sind Eigentum von SAP. Dieses Dokument ist eine Vorabversion und unterliegt nicht Ihrer Lizenzvereinbarung oder einer anderen Vereinbarung mit SAP. Dieses Dokument enthält nur vorgesehene Strategien, Entwicklungen und Funktionen des SAP®-Produkts und ist für SAP nicht bindend, einen bestimmten Geschäftsweg, eine Produktstrategie bzw. -entwicklung einzuschlagen. SAP übernimmt keine Verantwortung für Fehler oder Auslassungen in diesen Materialien. SAP garantiert nicht die Richtigkeit oder Vollständigkeit der Informationen, Texte, Grafiken, Links oder anderer in diesen Materialien enthaltenen Elemente. Diese Publikation wird ohne jegliche Gewähr, weder ausdrücklich noch stillschweigend, bereitgestellt. Dies gilt u. a., aber nicht ausschließlich, hinsichtlich der Gewährleistung der Marktgängigkeit und der Eignung für einen bestimmten Zweck sowie für die Gewährleistung der Nichtverletzung geltenden Rechts.
SAP übernimmt keine Haftung für Schäden jeglicher Art, einschließlich und ohne Einschränkung für direkte, spezielle, indirekte oder Folgeschäden im Zusammenhang mit der Verwendung dieser Unterlagen. Diese Einschränkung gilt nicht bei Vorsatz oder grober Fahrlässigkeit.
Die gesetzliche Haftung bei Personenschäden oder die Produkthaftung bleibt unberührt. Die Informationen, auf die Sie möglicherweise über die in diesem Material enthaltenen Hotlinks zugreifen, unterliegen nicht dem Einfluss von SAP, und SAP unterstützt nicht die Nutzung von Internetseiten Dritter durch Sie und gibt keinerlei Gewährleistungen oder Zusagen über Internetseiten Dritter ab.