Some embodiments relate to business objects supported by a business process platform. More specifically, some embodiments relate to functional extensions for business objects within a business process platform.
A business object is a software entity representing real-world items used during the transaction of business. For example, a business object may represent a business document such as a sales order, a purchase order, or an invoice. A business object may also represent items such as a product, a business partner, or a piece of equipment.
A business object may include business logic and/or data having any suitable structure. The structure of a business object may be determined based on the requirements of a business scenario in which the business object is to be deployed. A business solution for a particular business scenario may include many business objects, where the structure of each business object has been determined based on the requirements of the particular business scenario.
A customer deploying a business solution may desire changes to the business objects included in the business solution. For example, a customer may require additional business logic (i.e., functional extensions) associated with fields of a business object.
Commonly-assigned and co-pending patent application serial nos. (Dynamic Extension Fields for Business Objects, attorney docket no. 2008P00087US) and (Dynamic Node Extensions and Extension Fields for Business Objects, attorney docket no. 2008P00088US) describe systems for adding extension fields to a business object. A customer may require functional extensions associated with the extension fields, such as logic to calculate the value of an extension field based on other fields of the business object (e.g., a value of extension field “OverallAmount” of the “PurchaseOrder” business object). Functional extensions may also be desired for performing integrity checks on the extension fields, and/or for persistency handling related to the extension fields.
Conventionally, functional extensions are added to a business object by employing class extensions at the technical implementation level. Components of the database system relating to the extensions must be recompiled to effect such a change, and the change occurs globally with respect to all instantiations of the business object within the system. In some scenarios, particularly service-on-demand scenarios, multiple customers (tenants) receive services from a single application platform. If one of the multiple tenants adds functional extensions to a business object using class extensions, each other tenant would be forced to adapt to the additional extension logic.
Systems for adding functional extensions to a business object are desired. Such a system may reduce a need for recompiling the application platform, may enable one or more tenants to add respective functional extensions, and/or may provide tenant-specific views provided by tenant-specific functional extensions.
Business process platform 110 may provide services based on business objects as described above. Metadata 112 may include information defining the structure and attributes of these business objects. UI service layer 116 may use metadata 112 to access and manipulate business object data stored in data store 118.
An operator (e.g., a key user) may manipulate user interface 120 to interact with UI service layer 116 according to some embodiments. Such interactions may include requesting business object views, modifying business object data, and defining business object views. User interface 120 may be displayed by any suitable device. For example, the device may include any necessary software to support a proprietary interface (e.g., a proprietary client application) or execution engine (e.g., a Web browser). A device to display the user interfaces is capable of communication (including sporadic communication—e.g., mobile devices) with business process platform 110.
A functional extension may comprise executable program code. In some embodiments, a functional extension may comprise one or more Advanced Business Application Programming (ABAP) classes providing associated functionality. The functionality may incorporate extension fields as mentioned above, core fields, and any other information available to platform 110. A functional extension may implement one or more interfaces to provide such functionality.
A developer may populate the fields of area 210 to define a new functional extension node. According to the illustrated embodiment, the fields allow a developer to define a name of the functional extension and to identify a business object and related core service with which the functional extension node is associated. Area 210 may include other or different fields according to some embodiments, and such fields may be populated using drop-down menus or any other input mechanism.
In response to the manipulation of dialog 200, metadata 112 is changed to associate the functional extension with the business object. Many systems and approaches may be employed to represent the functional extension within metadata 112. For each functional extension, metadata 112 may include an extension name and a name of a business object with which the functional extension is associated. Metadata 112 may also include a technical (e.g., ABAP) name of the functional extension.
Initially, extension metadata is generated at S310. The extension metadata defines a functional extension associated with a business object. According to some embodiments, the extension metadata is generated by a development tool during design time.
The extension metadata may comprise a functional extension name, and a name of a business object with which the functional extension is associated. The extension metadata may also include a technical name of the functional extension, and may be generated and stored in a tenant-specific manner. According to some embodiments of S310, the extension metadata is generated and stored within extension repository 411 of business process platform 410. The extension metadata may be stored in any other entity within application platform 410.
The extension metadata may be generated at S310 during execution of platform 410. In this regard, enterprise services repository 420 may include business object models for use by platform 410. For each business object model, a business object proxy 412 including core business object metadata is generated in platform 410.
A runtime metadata buffer including enhanced metadata is generated at S320. The enhanced metadata is based on core metadata of a business object and the extension metadata of the business object generated at S310. In the
Next, at S330, a service request associated with the business object is received. For example, business process platform 410 may receive a “modify” or “retrieve” request from user interface 430 at S330. The request is directed to ESF framework 414.
According to conventional operation, ESF framework 414 then calls an appropriate core service provider via adapter class 415 based on metadata associated with the business object in buffer 413. Next, and in contrast to conventional operation, it is determined at S340 whether the received service request is associated with the functional extension.
In some embodiments of S340, generic wrapper 416 is instantiated directly after processing INIT_PROVIDER of adapter class 415. Generic wrapper 416 determines whether the received service request is associated with the functional extension based on the enhanced metadata of extension repository 411, and/or on similarly-enhanced metadata stored in an extension registry (not shown). Flow proceeds to S350 if it is determined that the service request is associated with the functional extension.
At S350, an extension service associated with the functional extension is provided.
Extension service provider 417 may comprise a class implementing a set of well-defined interfaces. The interfaces of extension service provider 417 may provide initialization of the extension in order to obtain an instance of a local client proxy (LCP) to communicate with core service provider 418. As mentioned above, the interfaces may implement pre- and post-exits for existing core services. For example:
Generally, signatures of the foregoing methods may be derived from the signature of the corresponding core services (e.g., EXPORTING parameters become CHANGING parameters). In some implementations additional parameters are added to the functional extension. For example, for PRE_EXECUTE_ACTION the additional parameter OUT_DO_NOT_EXECUTE_ACTION is added. This additional parameter may be set to ‘X’ to prevent execution of the associated core service.
Core service provider 418 is called at S350 to provide a core service. The core service is associated with extension data of the extension node. More specifically, extension service provider 417 may use an LCP instance to request a core service from core service provider 418. The core service may support extension data of one or more extension fields of the extension node.
Returning to S340, generic wrapper 416 may determine that the service request is not associated with the functional extension. Flow then proceeds to S360, at which point generic wrapper 416 directly calls core service provider 418 to provide a core service associated with the core data of the business object. Core service provider 418 may access core data 419a to provide core services based on the request. In the illustrated example, core data 419a is stored separately from extension data 419b.
Each system described herein may be implemented by any number of devices in communication via any number of other public and/or private networks. Two or more of devices of may be located remote from one another and may communicate with one another via any known manner of network(s) and/or a dedicated connection. Moreover, each device may comprise any number of hardware and/or software elements suitable to provide the functions described herein as well as any other functions. Other topologies may be used in conjunction with other embodiments.
All systems and processes discussed herein may be embodied in program code stored on one or more computer-readable media. Such media may include, for example, a floppy disk, a CD-ROM, a DVD-ROM, a Zip™ disk, magnetic tape, and solid state RAM or ROM memories. Embodiments are therefore not limited to any specific combination of hardware and software.
The embodiments described herein are solely for the purpose of illustration. Those in the art will recognize other embodiments may be practiced with modifications and alterations limited only by the claims.