The present invention relates to business software and in particular to the processing of business objects.
Unless otherwise indicated herein, the approaches described in this section are not prior art to the claims in this application and are not admitted to be prior art by inclusion in this section.
A business enterprise typically employs several business applications in order to manage the large amounts of data in the enterprise. A business application is usually designed to handle a specific aspect of the enterprise; e.g., a customer relationship management (CRM) business application may support the activities of the sales department, a product production system (PPS) may be used to manage production, and so on. Business objects represent individual classes of data that a business application may manage. For instance, in a car rental system, the following business objects may be created:
A service provider is part of the access layer that provides external access to the business object's data via the interface. The service provider provides access to the methods of that business object for functionality such as common instance handling, event handing, error handling, state management of the business object, and so on. For example, all business objects provide a common set of core services in order to create, read, update, and delete business object instances (business object node instances); e.g., MODIFY may be a core service that is common to all business objects for creating, updating, and deletion. In addition, business objects may provide services (referred to herein as ACTIONS) that are specific to the business object.
The service provider may also provide auxiliary services such as performance analysis, tracing, and so on. Since many business users (e.g., sale manager, sales person, and so on) may need to access a business object at any one time, it can be appreciated that users are not given direct access to business objects or even to the service providers.
Instead, access to the service provider and hence to the business object itself is provided via a service manager. The service manager is responsible for transaction control such as multiple access requests to a business object. The service manager may provide security and data integrity functionality to ensure against inconsistent and erratic runtime behavior. The service manager typically presents a client proxy (e.g., using a Web Services agent) that the business user can interface to within the application layer. The client proxy is typically able to provide batch processing of business objects. For example, a table of business object identifiers can be provided to the client proxy along with one or more actions (e.g., RETRIEVE) to be performed on each business object.
The service manager 104 communicates the modify operations received from the service consumer 102 to the service provider 106 to make the modifications. The service consumer 102 triggers a Save phase, for example, by calling a save method in the service manager 104. The service manager 104, in turn, calls a check method in the service provider 106 to trigger “check” processing to verify the modifications made to the business objects. If the service provider 106 does not issue an error, then the service manager 104 calls the save method in the service provider to begin “save” processing.
A method for processing business objects includes receiving batch job information from a client system which identifies a plurality of business objects and one or more operations to be performed on the business objects. In embodiments, the operations may include core services provided by the business object and services (actions) specific to the business object. The operations are recorded, without being executed.
In response to receiving a trigger from the client system, the business objects are altered in accordance with the recorded operations. Error checking is performed subsequent to altering the business objects. Successfully altered business objects proceed on to being saved. Business objects which failed may be reprocessed, including performing corrective action(s) and altering in accordance with their associated recorded operations.
In the following description, for purposes of explanation, numerous examples and specific details are set forth in order to provide a thorough understanding of the present invention. It will be evident, however, to one skilled in the art that the present invention as defined by the claims may include some or all of the features in these examples alone or in combination with other features described below, and may further include modifications and equivalents of the features and concepts described herein.
In embodiments, a work flow, such as illustrated by the sequence diagram in
In the batch receiving step 210, the service consumer 202 submits a “batch container” (batch job) for processing a set of business object instances. A batch container logically represents a number N of business object instances along with one or more operations to be performed on each business object instance. For example, suppose at the end of a business week, customer record business objects from a retail location of a business may need to be updated in the business' master data. The service consumer 202 may be a business application that communicates with the service manager 204 (e.g., via a Web Services interface) to submit the batch container to the service manager. The set of operations performed on a business object instance may vary from one business object instance to another.
In a step 212, the service consumer 202 issues a BeginBatch command to the service manager 204 to process a batch job. The BeginBatch command signals the service manager 204 to open or create a new batch container. The service manager 204 may issue a response (e.g., OK) to the service consumer 202 to indicate that the BeginBatch command has been successfully processed. The batch job may be communicated to the service manager 204 by any suitable manner. For example, the service consumer 202 may generate a batch file which is then made known to the service manager 204 (e.g., the file is sent to the service manager, the location of the file is made known to the service manager, etc.) The batch file may list the business object instances and corresponding operations. The operations may include core services that each business object provides (e.g., MODIFY, RETRIEVE, and so on) and may include specific services that are unique to each business object (e.g., ACTION). The service consumer 202 may communicate the batch job to the service manager 204, one business object instance at a time along with the desired operations to be performed on the business object instance.
In accordance with the present invention, the service manager 204 records each MODIFY operation (step 214), without making modifications to the business object instance. Likewise, service manager 204 records the information pertaining to desired ACTIONS (step 216), without making modifications to the business object instance. Further details of this aspect of the present invention may be found in U.S. Pat. No. 7,536,673.
In a step 218, the service consumer 202 issues an EndBatch command to the service manager 204. The EndBatch command signals the service manager 204 to close the batch container. The service manager 204 may issue a response (e.g., OK) to the service consumer 202 to indicate that the batch container has been successfully created.
The service consumer 202 may then repeat steps 212-218 for another batch container. For example, the business application may submit one batch job for updating customer records and another batch job for updating inventory records. Repeating steps 212-218 will create in the service manager 204 another batch container for processing another batch job. In embodiments, when the service consumer 202 has submitted all its batch jobs, it may then issue an ExecuteBatch command to the service manager 204. The ExecuteBatch command will trigger the batch processing step 220.
In the batch processing step 220, the service manager 204 coordinates between the batch coordinator 206 and the service provider 208 in order to process one or more batch containers submitted by the service consumer 202. In embodiments, the batch processing step 220 is performed for each batch container that was created in the batch receiving step 210. In particular, steps 222-238 may be performed for each batch container. As will be explained below, the actual processing of business object instances in a batch container in accordance with the present invention is partitioned into specific processing stages with error checking and error processing for each processing stage.
In embodiments, one processing stage is the processing of core services on the business object instances in the batch container, performed in a modify step 222. The core service operations for each business object instance recorded above in step 214 are performed by making suitable calls to the service provider 208. In particular, the service manager 204 communicates with the service provider 208 to invoke the core service methods of the business object to perform the operations on the business object instance. The service provider 208 may respond to the service manager 204 with a result code indicating whether or not the core services were successfully performed on the business object instances.
In a step 232, the service manager 204 may invoke an error checking method in the batch coordinator 206. Results from batch processing in the modify step 222 (e.g., business object name, node identifiers, error messages, and so on) may be passed to the batch coordinator 206. In some embodiments, the service manager 204 may invoke a callback method (e.g., a CHECKBATCH method) to the batch coordinator 206. The batch coordinator 206 may then decide how to proceed. For example, the batch coordinator 206 may identify those business object instances which failed while being processed in step 222, and provide a list of failed business object instances to the service manager 204. In an embodiment, for example, results from the modify step 222 may be expressed using a result code for each core service operation performed for each business object instance. For each such result code, the batch coordinator 206 may be programmed (e.g., using a SWITCH statement) to mark the business object instance as PASS, FAIL, or to take some corrective action. If a result code is not recognized, the batch coordinator 206 may log the business object instance (e.g., its ID), the result code, and any related information in an error log (e.g., data store 314 shown in
In the next processing stage, actions are executed for the business object instances in a step 224. The service manager 204 receives results of the error checking of step 232. If all of the business object instances were processed in step 222 without error, then processing of the batch container continues with processing of actions that are specific to the business object instances. The actions recorded above in step 216 that are specific to the business object instance are performed by making suitable calls to the service provider 208. In particular, the service manager 204 makes calls (e.g., ACTION calls) to the service provider 208 to invoke the specific methods of the business object to execute the actions. The service provider 208 may respond to the service manager 204 with a result code indicating whether or not the actions were successfully performed on the business object instances.
On the other hand, if some business object instances failed in step 222, then those business object instances will not proceed to step 224. Instead, the service manager 204 may perform a “transaction cleanup” on the failed business object instances, and repeat step 222 and step 232. For example, suppose a number of modifications are made to a business object. In some embodiments, the modifications may be stored in a transactional buffer (e.g., one or more internal data tables associated with the business object), to be saved in a later step (e.g., step 228). If a failure subsequently occurs (e.g., in an ACTION call), then the transactional buffer may be cleared (e.g., because the data may deemed to be invalid). This is an example of a transaction cleanup.
It can be appreciated that by filtering out the failed business object instances, the service manager 204 can forward business object instances that were successfully processed in step 222 on to the next processing stage, namely step 224, thus avoiding having to abort the entire batch job due to the occurrence of one or more failed business object instances. At the same time, the service manager 204 may re-process a failed business object instance if transaction cleanup can be performed. Otherwise, the service manager 204 may log the business object instance to an error log and no further processing is performed.
In a step 234, the service manager 204 may invoke the error checking method in the batch coordinator 206 (e.g., the CHECKBATCH method described in step 232) to process the results of the execute actions step 224. Results from batch processing in the service provider 208 in the execute actions step 224 may be passed to the batch coordinator 206. The batch coordinator 206 identifies those business object instances that failed and provides a list to the service manager 204. In an embodiment, for example, results from the execute actions step 224 may be expressed via a result code for each method that is performed for each business object instance. For each such result code, the batch coordinator 206 may be programmed (e.g., using a SWITCH statement) to mark the business object instance as PASS, FAIL, or to take some other action. If a result code is not recognized, the batch coordinator 206 may log the business object instance (e.g., its ID), the result code, and any related information in an error log. The batch coordinator 206 sends a list of the failed business object instances to the service manager 204.
In the next processing stage, a final check of the modified business object instances in the batch container is made in a step 226; e.g., by invoking a CHECK method of the business object. The service manager 204 receives results of the error checking from step 234. If all of the business object instances were processed in step 224 without error, then the modified business object instances are checked. In particular, the service manager 204 may invoke the service provider 208 to call a suitable CHECK method for each business object instance. The service provider 208 may respond to the service manager 204 with a result code indicating whether or not the business object instances passed the check processing step or not.
For example, the CHECK method may be invoked by the service manager 204 on the business object service provider 208 to trigger “Consistency” checks. This means that the business objects check their transactional states/buffers to determine whether it is possible and permitted to store their data in the database. If there is any inconsistency in the business object state/buffer then the BO service provider 208 can indicate a rejection (e.g., via a return value of the CHECK method) and the transaction will not be saved by the service manager 204. Typically, error messages may be generated and these error messages may then be displayed in a user interface, if the consumer is a user interface. In an embodiment, the error messages may be stored in an error log (e.g., data store 314 shown in
On the other hand, if some business object instances failed in step 224, then those business object instances will not proceed to step 226. Instead, the service manager 204 may perform a transaction cleanup on the failed business object instances, and repeat step 224 and step 234. It can be appreciated that by filtering out the failed business object instances, the service manager 204 can forward business object instances that were successfully processed in the execute actions step 224 on to the next processing stage, namely the check step 226. At the same time, the service manager 204 may re-process a failed business object instance if transaction cleanup can be performed. Otherwise, the service manager 204 may log the business object instance to an error log and no further processing is performed.
In a step 236, the service manager 204 may invoke the error checking method in the batch coordinator 206 to process the results of the check step 226. Results from the check step 226 may be passed to the batch coordinator 206. The batch coordinator 206 identifies those business object instances that failed and provides a list to the service manager 204. In an embodiment, for example, results from the check step 226 may be expressed via a result code for each method that is performed for each business object instance. For each such result code, the batch coordinator 206 may be programmed (e.g., using a SWITCH statement) to mark the business object instance as PASS, FAIL, or to take some other action. If a result code is not recognized, the batch coordinator 206 may log the business object instance (e.g., its ID), the result code, and any related information in an error log. The batch coordinator 206 sends a list of the failed business object instances to the service manager 204.
In the next processing stage, the modified and verified business object instances in the batch container are saved in a step 228 (e.g., written out to a data store). The service manager 204 receives results of the error checking from step 236. If all of the business object instances were checked in step 226 as having no errors, then all of the modified business object instances may be saved. In particular, the service manager 204 may invoke the service provider 208 to call a suitable save method for each business object instance; e.g., to write the modified business object instance to a database. The service provider 208 may respond to the service manager 204 with a result code indicating whether or not the business object instances were verified.
On the other hand, if some business object instances were not checked in step 226 (i.e., failed check processing), then those business object instances will not proceed to the save step 228. Instead, the service manager 204 may perform a transaction cleanup on the failed business object instances, and repeat step 226 and step 236. By filtering out the failed business object instances, the service manager 204 can forward business object instances that were successfully processed in the check step 226 on to the next processing stage. At the same time, the service manager 204 may re-process a failed business object instance if transaction cleanup can be performed. Otherwise, the service manager 204 may log the business object instance to an error log and no further processing is performed.
In a step 238, the service manager 204 may invoke an error checking method in the batch coordinator 206 to check the results of the save step 228. The results may be passed to the error checking method in the batch coordinator 206. The batch coordinator 206 identifies those business object instances that failed and provides a list to the service manager 204. In an embodiment, for example, results from the save step 228 may be expressed via a result code for each method that is performed for each business object instance. For each such result code, the batch coordinator 206 may be programmed (e.g., using a SWITCH statement) to mark the business object instance as PASS, FAIL, or to take some other action. If a result code is not recognized, the batch coordinator 206 may log the business object instance (e.g., its ID), the result code, and any related information in an error log. The batch coordinator 206 sends a list of the failed business object instance instances to the service manager 204.
The service manager 204 may respond to the service consumer 202 with a result code. In embodiments, the code may indicate that all the business object instances were successfully updated and saved, or that some of the business object instances were successfully updated and saved, or that none of the business object instances were successfully updated and saved. In addition, a report may be provided that lists the failed business object instances, and at which processing stage the failure occurred. The report may include information about retries and other auxiliary information. If there is another batch container to be processed by the service manager 204, the foregoing steps 222-238 may be repeated.
Referring back to step 220, when the service consumer 202 issues the ExecuteBatch command to the service manager 204, the service consumer may indicate to the service manager 204 to process the batch job (batch container) in a single transaction. This is the scenario that is illustrated in the
The batch receiving step 210 shown in
In a step 322, the service manager frontend 304a communicates with the task handler frontend 332a to instantiate one or more processes 312a-312n. As explained above, the service consumer 202 may dictate how to partition each batch job into two or more transactions. Alternatively, the service manager frontend 304a may make that determination independently of the service consumer 202. In an embodiment, the task handler frontend 332a may partition a batch container into two or more transactions by a process called serialization, which is disclosed in more detail in U.S. Pat. No. 7,536,673. The task handler frontend 332a instantiates a process 312a for each transaction. The task handler frontend 332a communicates (e.g., via inter-process communication) with the task handler backend 332b in each instantiated process 312a to set up processing of the portion of the batch container corresponding to its associated transaction. In a step 324, the task handler backend 332b deserializes the batch container portion for processing by the service manager backend 304b in accordance with the processing block B shown and described in
When a processing in the process block B completes, errors accumulated during the processing may be collected by the task handler backend 332b. In an embodiment, the task handler backend 332b can log failures to the error log 314 for further evaluation. For example, in an embodiment, a separate task (process) may be scheduled on a regular basis to check the error log 314, and create a workflow to assess and otherwise resolve the errors.
Referring to
A computer system 400 may comprise a data processor subsystem 401 of one or more data processing units. A memory subsystem 402 may comprise random access memory (usually volatile memory such as DRAM) and non-volatile memory such as FLASH memory, ROM, and so on. A storage subsystem 403 may comprise one or more mass storage devices such as hard disk drives and the like. The storage subsystem 403 may include remote storage systems; e.g., for data minoring, remote backup and such. A network interface subsystem 404 can provide users with access to the computer system 400, for example over a telecommunication network. A system of buses 405 can interconnect the foregoing subsystems, providing control lines, data lines, and/or voltage supply lines to/from the various subsystems. The computer system 400 may include a suitable display(s) 412 and input devices 411 such as a keyboard and a mouse input device.
The memory subsystem 402 may have stored in the non-volatile memory computer executable programs, which when executed can cause the data processing subsystem 401 to operate in accordance with aspects of the present invention. For example, the memory subsystem 402 may include computer executable programs that constitute the service manager 204 (304a, 304b), the batch coordinator 206, the service provider 208, and the task handler (332a, 332b). The storage subsystem 403 may provide storage for the various database components such as the error log 314.
The above description illustrates various embodiments of the present invention along with examples of how aspects of the present invention may be implemented. The above examples and embodiments should not be deemed to be the only embodiments, and are presented to illustrate the flexibility and advantages of the present invention as defined by the following claims. Based on the above disclosure and the following claims, other arrangements, embodiments, implementations and equivalents will be evident to those skilled in the art and may be employed without departing from the spirit and scope of the invention as defined by the claims.
The present disclosure is related to U.S. Pat. No. 7,536,673 and to U.S. Pat. No. 7,801,996, both of which are incorporated herein by reference in their entirety for all purposes.