Systems and methods for transaction chaining
First Claim
1. A method for ensuring atomicity in a workflow, comprising:
- demarcating tasks in the workflow to be processed atomically using transaction tags;
suspending a first transaction and executing a task from the demarcated tasks in a new transaction when the workflow encounters the transaction tags indicating the new transaction;
retrying the task for a configurable number of retries or period of time if the task is not performed successfully within a configurable timeout period;
resuming the first transaction when the task in the new transaction is executed using a processor;
wherein when one of the transaction tags is encountered, a context relating to the first transaction is queued as a Java Messaging Service (JMS) message as part of the first transaction;
wherein the JMS message is queued as part of the first transaction, the first transaction is paused to start the new transaction;
wherein if the new transaction fails, the new transaction rolls back and the queued JMS message is resent from the JMS queue;
wherein after the new transaction rolls back due to failure and the JMS message is resent, the transaction attempts again to go forward along a path of execution;
wherein the JMS message is obtained from the queue if the new transaction commits; and
wherein the transaction tags indicate which tasks are to be performed as a group.
2 Assignments
0 Petitions
Accused Products
Abstract
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. In one such system, a JMS message is queued to the workflow as part of an existing transaction. If that transaction commits, the queued JMS message ensures that the workflow will be invoked in a new transaction that allows the workflow to perform the next unit of work in the newly initiated transaction. When the unit of work is completed, the workflow queues another JMS message. If this transaction commits, the transaction ensures 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.
184 Citations
6 Claims
-
1. A method for ensuring atomicity in a workflow, comprising:
-
demarcating tasks in the workflow to be processed atomically using transaction tags; suspending a first transaction and executing a task from the demarcated tasks in a new transaction when the workflow encounters the transaction tags indicating the new transaction; retrying the task for a configurable number of retries or period of time if the task is not performed successfully within a configurable timeout period; resuming the first transaction when the task in the new transaction is executed using a processor; wherein when one of the transaction tags is encountered, a context relating to the first transaction is queued as a Java Messaging Service (JMS) message as part of the first transaction; wherein the JMS message is queued as part of the first transaction, the first transaction is paused to start the new transaction; wherein if the new transaction fails, the new transaction rolls back and the queued JMS message is resent from the JMS queue; wherein after the new transaction rolls back due to failure and the JMS message is resent, the transaction attempts again to go forward along a path of execution; wherein the JMS message is obtained from the queue if the new transaction commits; and wherein the transaction tags indicate which tasks are to be performed as a group. - View Dependent Claims (2, 3)
-
-
4. A computer program product stored in a storage medium in a general purpose or a specialized digital computer or microprocessor for ensuring atomicity in a workflow, comprising:
-
computer code for demarcating tasks in the workflow to be processed atomically using transaction tags; computer code for suspending a first transaction and executing a task from the demarcated tasks in a new transaction when the workflow encounters one of the transaction tags indicating the new transaction; computer code for retrying the task for a configurable number of retries or period of time if the task is not performed successfully within a configurable timeout period; computer code for atomically processing the task; computer code resuming the first transaction when the task in the new transaction is executed; wherein when one of the transaction tags is encountered, a context relating to the first transaction is queued as a Java Messaging Service (JMS) message as part of the first transaction; wherein the JMS message is queued as part of the first transaction, the first transaction is paused to start the new transaction; wherein if the new transaction fails, the new transaction rolls back and the queued JMS message is resent from the JMS queue; wherein after the new transaction rolls back due to failure and the JMS message is resent, the transaction attempts again to go forward along a path of execution; wherein the JMS message is obtained from the queue if the new transaction commits; and wherein the transaction tags indicate which tasks are to be performed as a group.
-
-
5. A computer implemented system comprising a processor for ensuring atomicity in a workflow, comprising:
-
means for demarcating tasks in the workflow to be processed atomically using transaction tags; means for suspending a first transaction and executing a task from the demarcated tasks in a new transaction when the workflow encounters the transaction tags indicating the new transaction; means for retrying the task for a configurable number of retries or period of time if the task is not performed successfully within a configurable timeout period means for atomically processing the task; means for resuming the first transaction when the task in the new transaction is executed; wherein when one of the transaction tags is encountered, a context relating to the first transaction is queued as a Java Messaging Service (JMS) message as part of the first transaction; wherein the JMS message is queued as part of the first transaction, the first transaction is paused to start the new transaction; wherein if the new transaction fails, the new transaction rolls back and the queued JMS message is resent from the JMS queue; wherein after the new transaction rolls back due to failure and the JMS message is resent, the transaction attempts again to go forward along a path of execution; wherein the JMS message is obtained from the queue if the new transaction commits; and wherein the transaction tags indicate which tasks are to be performed as a group.
-
-
6. A computer system comprising:
-
a processor; object code executed by said processor, said object code configured to; demarcate tasks in a workflow to be processed atomically using transaction tags to indicate the new transaction; suspend a first transaction and execute a task from the demarcated tasks in a new transaction when the workflow encounters one of the transaction tags indicating the new transaction; retry the task for configurable number of retries or period of time if the task is not performed successfully within a configurable timeout period; atomically process the task; resume the first transaction when the task in the new transaction is executed; wherein when one of the transaction tags is encountered, a context relating to the first transaction is queued as a Java Messaging Service (JMS) message as part of the first transaction; wherein the JMS message is queued as part of the first transaction, the first transaction is paused to start the new transaction; wherein if the new transaction fails, the new transaction rolls back and the queued JMS message is resent from the JMS queue; wherein after the new transaction rolls back due to failure and the JMS message is resent, the transaction attempts again to go forward along a path of execution; wherein the JMS message is obtained from the queue if the new transaction commits; and wherein the transaction tags indicate which tasks are to be performed as a group.
-
Specification