A portion of the disclosure of this patent document contains material which is subject to copyright protection. The copyright owner has no objection to the facsimile reproduction by anyone of the patent document of the patent disclosure, as it appears in the Patent and Trademark Office patent file or records, but otherwise reserves all copyright rights whatsoever.
The following applications are cross-referenced and incorporated herein by reference:
U.S. Provisional Patent Application No. 60/376,906 entitled “COLLABORATIVE BUSINESS PLUG-IN FRAMEWORK,” by Mike Blevins, filed May 1, 2002;
U.S. Provisional Patent Application No. 60/377,157 entitled “SYSTEM AND METHOD FOR COLLABORATIVE BUSINESS PLUG-INS” by Mike Blevins, filed May 1, 2002.
U.S. Provisional Patent Application No. 60/450,074 entitled “SYSTEMS AND METHODS UTILIZING A WORKFLOW DEFINITION LANGUAGE” by Pal Takacsi-Nagy, filed Feb. 25, 2003.
The present invention relates to the filtering of messages in a subscription-based messaging model.
In a normal transaction management approach, a first transaction for a first application is “followed” by a second transaction for either the first application or for a second application. Any resources that the first application is holding against a database or resource manager are deleted when the first transaction completes. Further, any context for the first transaction is deleted upon completion. When the second transaction begins, all resources for that transaction must be re-established, including any resources used for the first transaction. This can be inefficient if any of those resources are being used by multiple transactions.
Systems and methods in accordance with one embodiment of the present invention overcome deficiencies in existing transaction management systems by taking advantage of transaction chaining. A transaction management engine, such as a business process management (BPM) engine, can allow an application to define transaction demarcations in order to ensure that portions of a workflow are processed atomically.
Other features, aspects, and objects of the invention can be obtained from a review of the specification, the figures, and the claims.
Transaction managers can be used to provide atomicity for a transaction. The “atomicity” of a transaction refers to the fact that a transaction should be done as a single “atomic” unit of work, such that the entire transaction either commits or fails. If a transaction includes multiple updates to a database table, for example, a transaction manager can be used to ensure that either all of the updates get committed to the database, or that none of the updates get committed. Ensuring atomicity through a transaction manager can be substantially more complicated, however, as a transaction manager can be responsible for managing multiple, distributed transactions on a number of databases distributed throughout a system or across a network or server cluster.
Systems and methods in accordance with the present invention provide a transaction manager with the ability to manage a “chained” transaction, or a transaction chain. When allowing for a transaction chain, a transaction manager can maintain certain resources, or can maintain a transaction context, for subsequent transactions. A transaction management engine, such as a business process management (BPM) engine, can allow an application to define transaction demarcations. For example, two tasks can be completed in a business process that transfers money between accounts. First, a specific amount of money needs to be deducted from a first account. Second, that money needs to be transferred into a second account. Assuming that these are separate items of work, it can be desirable to bracket these two activities in a transaction to be an atomic work item, such that either both work items process or neither of them process. It would be undesirable to deduct money from the first account if the money did not actually get added to the second account, and it would not be desirable to add money to the second account if that money was not actually taken out of the first account.
Systems and methods in accordance with one embodiment of the present invention utilize an entity bean to implement this BPM, which can take advantage of transaction bracketing. By utilizing an entity bean, transactions can be managed by an EJB container. When demarcating a transaction boundary for application activities within BPM, the transaction can simply continue to process normally until a transaction bracket is encountered. When a bracket is encountered, a persistent message is queued to the system, such as a JMS message. The queued JMS message allows the system to store context for the transaction. This allows the system to know that, upon the next transaction invoke, the system should start with the next activity within the transaction boundary. In other words, the system is processing the first transaction, then queuing a context that can be picked up and used by the next transaction.
An inbound message bean, or message-drive bean (MDB), can be created if this context is persisted through JMS. The MDB can pull this JMS message from the queue and invoke the BPM with the appropriate message. That message can include information about the next activity that to be executed as part of the transaction, allowing the transaction to maintain context.
If a J2EE-compliant system is being utilized, a mechanism such as a J2EE API could be used for suspending and resuming transactions. When encountering a transaction bracket, the system could suspend the first transaction, process those tasks included within the brackets in the new transaction, commit the new transaction, and resume the original transaction. A problem with such an approach exists, however, as the original transaction can fail after being resumed. The system has then processed an activity beyond the execution path, with no way to automatically undo or rollback the successfully committed transaction when the original transaction rolls back.
In an example shown in
When a message is queued as part of the transaction, the transaction can be paused to start a new transaction, in order to implement a new transaction block. If the new transaction fails, since the JMS message is in the first queue, the JMS message can be resent. This can ensure that the transaction manager always continues from the correct location. Since the JMS message is queued, an object is only sent to get that message if the transaction commits. If the queued JMS message and the transaction roll back, the system is basically one step behind and can again attempt to go forward along the path of execution. An example of one such execution path is given in
A transaction manager can be configured to control the number of retries, or the period of time for retrying a transaction. Attributes in the workflow can be used to specify, for example, a retry count. The transaction itself can also have a retry count. If a JMS message is queued and the message does not commit, the system can generate a callback due to the failure, and that message can have a retry count. So even if the first attempt failed, the user can indicate how many times the message should be retried. These transactions can be implemented as an annotation of a Java Web service (JWS) file in the workflow language (WFL).
When a workflow is implemented in J2EE as an entity bean with container-managed transactions, it can be desirable to have a mechanism to demarcate parts of the workflow as atomic units of work. In other words, it is desirable to commit the existing container-initiated transaction and start a new transaction in order to perform the next unit of work. An example of such a workflow is shown in
In order to achieve atomicity, a JMS message can be queued to the workflow as part of the existing transaction. If the existing transaction commits, the transaction ensures that the workflow will be invoked, due to the queued JMS message, in a different transaction that can allow the workflow to perform the next unit of work in the newly initiated transaction. When the unit of work is completed, the workflow can queue another JMS message. If this transaction commits, the transaction can ensure that the unit of work has executed in a transaction. When the workflow is invoked again, due to the second JMS message, the workflow can continue its operation in a different transaction.
A transaction can have a tag called <transaction>. A user can include tasks to be performed atomically within the transaction tags. The implication is that all the tasks to be performed should be executed under a single transaction. For example, consider the following workflow:
In the above example, someMethod will be executed in a first transaction. The methods method1 and method2 will be executed in a second transaction, demarcated by the opening and closing <transaction> tags. Yet another transaction can be used to execute someOtherMethod. When the workflow encounters a <transaction> tag, the workflow can queue a JMS message containing the information as to the next activity that needs to be executed. Queuing a JMS message as part of an existing transaction also ensures that the workflow will continue only if that transaction commits. The next unit of work is then “chained” to the previous work in the process.
The <transaction> tags ensure that method1 and method2 can be executed atomically. Without such a mechanism, there is no way to demarcate method1 and method2 as a single unit of work using J2EE transactional APIs. It is not possible to simply suspend the current transaction, start a new transaction to do the unit of work, and resume the original transaction, as there will be problems if the new transaction commits and the original transaction rolls back.
Transaction blocks not only can ensure that all operations within a transaction block are performed atomically, but a transaction block can also provide a timeout value for the operations to complete. A transaction block can also provide for retrying the operations in case of failures or timeouts. For example, as shown in
Atomic Transactions
Atomic transactions are known as “all-or-nothing” transactions. Actions taken prior to committing an atomic transaction are considered to be tentative or pending, and not persistent or visible to other activities. When an application finishes, the application can make a request to a coordination component to determine an outcome for the transaction. The coordination component can determine whether any of the units of work failed, such as by asking the processes doing those units of work to “vote” or reply whether or not the work items processed successfully. If all the processes vote indicate successful execution, the coordination component can commit all the actions taken. If a process indicates an aborted execution, or does not respond to the request, the coordination component can abort all actions and roll back the transaction. A commit operation makes the tentative actions persistent and visible to other transactions, while a rollback makes the tentative actions appear as if the actions never happened. Atomic transactions can provide consistent failure and recovery semantics, so applications do not need to deal with the mechanics of determining a mutually agreed outcome decision or to figure out how to recover from a large number of possible inconsistent states.
The foregoing description of preferred embodiments of the present invention has been provided for the purposes of illustration and description. It is not intended to be exhaustive or to limit the invention to the precise forms disclosed. Many modifications and variations will be apparent to one of ordinary skill in the art. The embodiments were chosen and described in order to best explain the principles of the invention and its practical application, thereby enabling others skilled in the art to understand the invention for various embodiments and with various modifications that are suited to the particular use contemplated. It is intended that the scope of the invention be defined by the following claims and their equivalence.
This application claims priority to U.S. Patent Provisional Application 60/449,925 entitled “SYSTEMS AND METHODS FOR TRANSACTION CHAINING,” by Gondi et al., filed Feb. 25, 2003.
| Number | Name | Date | Kind |
|---|---|---|---|
| 5469562 | Saether | Nov 1995 | A |
| 5604860 | McLaughlin et al. | Feb 1997 | A |
| 5630131 | Palevich et al. | May 1997 | A |
| 5680610 | Smith et al. | Oct 1997 | A |
| 5872971 | Knapman et al. | Feb 1999 | A |
| 5944794 | Okamoto et al. | Aug 1999 | A |
| 5946316 | Chen et al. | Aug 1999 | A |
| 5966535 | Benedikt et al. | Oct 1999 | A |
| 6009405 | Leymann et al. | Dec 1999 | A |
| 6012083 | Savitzky et al. | Jan 2000 | A |
| 6012094 | Leymann et al. | Jan 2000 | A |
| 6016495 | McKeehan et al. | Jan 2000 | A |
| 6018730 | Nichols et al. | Jan 2000 | A |
| 6023578 | Birsan et al. | Feb 2000 | A |
| 6029000 | Woolsey et al. | Feb 2000 | A |
| 6067623 | Blakley et al. | May 2000 | A |
| 6070184 | Blount et al. | May 2000 | A |
| 6141701 | Whitney | Oct 2000 | A |
| 6148336 | Thomas et al. | Nov 2000 | A |
| 6212546 | Starkovich et al. | Apr 2001 | B1 |
| 6219666 | Krishnaswamy et al. | Apr 2001 | B1 |
| 6222533 | Notani et al. | Apr 2001 | B1 |
| 6243737 | Flanagan et al. | Jun 2001 | B1 |
| 6243778 | Fung et al. | Jun 2001 | B1 |
| 6292932 | Baisley et al. | Sep 2001 | B1 |
| 6311327 | O'Brien et al. | Oct 2001 | B1 |
| 6330569 | Baisley et al. | Dec 2001 | B1 |
| 6334114 | Jacobs et al. | Dec 2001 | B1 |
| 6343265 | Glebov et al. | Jan 2002 | B1 |
| 6360358 | Elsbree et al. | Mar 2002 | B1 |
| 6367068 | Vaidyanathan et al. | Apr 2002 | B1 |
| 6377939 | Young | Apr 2002 | B1 |
| 6408311 | Baisley et al. | Jun 2002 | B1 |
| 6411698 | Bauer et al. | Jun 2002 | B1 |
| 6445711 | Scheel et al. | Sep 2002 | B1 |
| 6470364 | Prinzing | Oct 2002 | B1 |
| 6516322 | Meredith | Feb 2003 | B1 |
| 6560769 | Moore et al. | May 2003 | B1 |
| 6584454 | Hummel et al. | Jun 2003 | B1 |
| 6594700 | Graham et al. | Jul 2003 | B1 |
| 6601113 | Koistinen et al. | Jul 2003 | B1 |
| 6609115 | Mehring et al. | Aug 2003 | B1 |
| 6615258 | Barry et al. | Sep 2003 | B1 |
| 6625602 | Meredith et al. | Sep 2003 | B1 |
| 6636491 | Kari et al. | Oct 2003 | B1 |
| 6637020 | Hammond | Oct 2003 | B1 |
| 6654932 | Bahrs et al. | Nov 2003 | B1 |
| 6678518 | Eerola | Jan 2004 | B2 |
| 6684388 | Gupta et al. | Jan 2004 | B1 |
| 6687702 | Vaitheeswaran et al. | Feb 2004 | B2 |
| 6687848 | Najmi | Feb 2004 | B1 |
| 6721740 | Skinner et al. | Apr 2004 | B1 |
| 6721779 | Maffeis | Apr 2004 | B1 |
| 6748420 | Quatrano et al. | Jun 2004 | B1 |
| 6754884 | Lucas et al. | Jun 2004 | B1 |
| 6789054 | Makhlouf | Sep 2004 | B1 |
| 6804686 | Stone et al. | Oct 2004 | B1 |
| 6823495 | Vedula et al. | Nov 2004 | B1 |
| 6832238 | Sharma et al. | Dec 2004 | B1 |
| 6836883 | Abrams et al. | Dec 2004 | B1 |
| 6847981 | Song et al. | Jan 2005 | B2 |
| 6850979 | Saulpaugh et al. | Feb 2005 | B1 |
| 6853876 | Wehrung et al. | Feb 2005 | B2 |
| 6859180 | Rivera | Feb 2005 | B1 |
| 6874143 | Murray et al. | Mar 2005 | B1 |
| 6889244 | Gaither et al. | May 2005 | B1 |
| 6915519 | Williamson et al. | Jul 2005 | B2 |
| 6918053 | Thatte et al. | Jul 2005 | B1 |
| 6918084 | Slaughter et al. | Jul 2005 | B1 |
| 6922792 | Moser et al. | Jul 2005 | B2 |
| 6922827 | Vasilik et al. | Jul 2005 | B2 |
| 6950872 | Todd, II | Sep 2005 | B2 |
| 6963914 | Breitbart et al. | Nov 2005 | B1 |
| 6971096 | Ankireddipally et al. | Nov 2005 | B1 |
| 6973657 | Ahmad et al. | Dec 2005 | B1 |
| 6976086 | Sadeghi et al. | Dec 2005 | B2 |
| 6988099 | Wiser et al. | Jan 2006 | B2 |
| 7000219 | Barrett et al. | Feb 2006 | B2 |
| 7017146 | Dellarocas et al. | Mar 2006 | B2 |
| 7039671 | Cullen | May 2006 | B2 |
| 7043722 | Bau, III | May 2006 | B2 |
| 7051316 | Charisius et al. | May 2006 | B2 |
| 7054858 | Sutherland | May 2006 | B2 |
| 7062718 | Kodosky et al. | Jun 2006 | B2 |
| 7069507 | Alcazar et al. | Jun 2006 | B1 |
| 7072934 | Helgeson et al. | Jul 2006 | B2 |
| 7073167 | Iwashita | Jul 2006 | B2 |
| 7076772 | Zatloukal | Jul 2006 | B2 |
| 7096422 | Rothschiller et al. | Aug 2006 | B2 |
| 7107578 | Alpern | Sep 2006 | B1 |
| 7111243 | Ballard et al. | Sep 2006 | B1 |
| 7117214 | Wiser et al. | Oct 2006 | B2 |
| 7117504 | Smith et al. | Oct 2006 | B2 |
| 7127704 | Van De Vanter et al. | Oct 2006 | B2 |
| 7143186 | Stewart et al. | Nov 2006 | B2 |
| 7146422 | Marlatt et al. | Dec 2006 | B1 |
| 7155705 | Hershberg et al. | Dec 2006 | B1 |
| 7184967 | Mital et al. | Feb 2007 | B1 |
| 7206805 | McLaughlin, Jr. | Apr 2007 | B1 |
| 7240331 | Vion-Dury et al. | Jul 2007 | B2 |
| 7260599 | Bauch et al. | Aug 2007 | B2 |
| 7380166 | Thatte et al. | May 2008 | B2 |
| 7391735 | Johnson | Jun 2008 | B2 |
| 20020004848 | Sudarshan et al. | Jan 2002 | A1 |
| 20020010781 | Tuatini | Jan 2002 | A1 |
| 20020010803 | Oberstein et al. | Jan 2002 | A1 |
| 20020035604 | Cohen et al. | Mar 2002 | A1 |
| 20020049788 | Lipkin et al. | Apr 2002 | A1 |
| 20020073236 | Helgeson et al. | Jun 2002 | A1 |
| 20020073396 | Crupi et al. | Jun 2002 | A1 |
| 20020083075 | Brummel et al. | Jun 2002 | A1 |
| 20020111922 | Young et al. | Aug 2002 | A1 |
| 20020120685 | Srivastava et al. | Aug 2002 | A1 |
| 20020143960 | Goren et al. | Oct 2002 | A1 |
| 20020152106 | Stoxen et al. | Oct 2002 | A1 |
| 20020161826 | Arteaga et al. | Oct 2002 | A1 |
| 20020174178 | Stawikowski | Nov 2002 | A1 |
| 20020174241 | Beged-Dov et al. | Nov 2002 | A1 |
| 20020184610 | Chong et al. | Dec 2002 | A1 |
| 20020194244 | Raventos | Dec 2002 | A1 |
| 20020194267 | Flesner et al. | Dec 2002 | A1 |
| 20020194495 | Gladstone et al. | Dec 2002 | A1 |
| 20030004746 | Kheirolomoom et al. | Jan 2003 | A1 |
| 20030005181 | Bau et al. | Jan 2003 | A1 |
| 20030014439 | Boughannam | Jan 2003 | A1 |
| 20030018661 | Darugar | Jan 2003 | A1 |
| 20030018832 | Amirisetty et al. | Jan 2003 | A1 |
| 20030023957 | Bau et al. | Jan 2003 | A1 |
| 20030028364 | Chan et al. | Feb 2003 | A1 |
| 20030028579 | Kulkarni et al. | Feb 2003 | A1 |
| 20030043191 | Tinsley et al. | Mar 2003 | A1 |
| 20030046591 | Asghari-Kamrani et al. | Mar 2003 | A1 |
| 20030051066 | Pace et al. | Mar 2003 | A1 |
| 20030055868 | Fletcher et al. | Mar 2003 | A1 |
| 20030055878 | Fletcher et al. | Mar 2003 | A1 |
| 20030074217 | Beisiegel et al. | Apr 2003 | A1 |
| 20030079029 | Garimella et al. | Apr 2003 | A1 |
| 20030110446 | Nemer | Jun 2003 | A1 |
| 20030120593 | Bansal et al. | Jun 2003 | A1 |
| 20030126136 | Omoigui | Jul 2003 | A1 |
| 20030149791 | Kane et al. | Aug 2003 | A1 |
| 20030167358 | Marvin et al. | Sep 2003 | A1 |
| 20030196168 | Hu | Oct 2003 | A1 |
| 20040019645 | Goodman et al. | Jan 2004 | A1 |
| 20040019684 | Potter et al. | Jan 2004 | A1 |
| 20040025169 | Wiser et al. | Feb 2004 | A1 |
| 20040040011 | Bosworth et al. | Feb 2004 | A1 |
| 20040078373 | Ghoneimy et al. | Apr 2004 | A1 |
| 20040103406 | Patel | May 2004 | A1 |
| 20040148336 | Hubbard et al. | Jul 2004 | A1 |
| 20040204976 | Oyama et al. | Oct 2004 | A1 |
| 20040216086 | Bau | Oct 2004 | A1 |
| 20040260715 | Mongeon | Dec 2004 | A1 |
| 20050050068 | Vaschillo et al. | Mar 2005 | A1 |
| 20050144170 | Wiser et al. | Jun 2005 | A1 |
| 20050278585 | Spencer | Dec 2005 | A1 |
| 20060206856 | Breeden et al. | Sep 2006 | A1 |
| 20060234678 | Juitt et al. | Oct 2006 | A1 |
| 20070038500 | Hammitt et al. | Feb 2007 | A1 |
| Number | Date | Country |
|---|---|---|
| 2248634 | Mar 2000 | CA |
| 10069418 | Mar 1998 | JP |
| 2001188696 | Jul 2001 | JP |
| WO 9923558 | May 1999 | WO |
| WO 0029924 | May 2000 | WO |
| Number | Date | Country | |
|---|---|---|---|
| 20040187127 A1 | Sep 2004 | US |
| Number | Date | Country | |
|---|---|---|---|
| 60449925 | Feb 2003 | US |