IP Library Granted Patent US 10,453,010
Granted Patent B2
US 10,453,010 · App. 15/153,204 · Granted Oct 22, 2019

Computer device, method, and apparatus for scheduling business flow

Inventors: Junjie Zhou (Nanjing, CN); Vemana Narasimha Murthy (Shenzhen, CN); Upasana Haveri (Shenzhen, CN)
Assignee: HUAWEI TECHNOLOGIES CO., LTD.
G06Q10/06311G06F9/4843
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 10,453,010
App. No.
15/153,204
Granted
Oct 22, 2019
Kind
B2
Abstract

A computer device, a method, and an apparatus for business flow scheduling. The method for business flow scheduling includes determining that a transaction savepoint is configured on a to-be-scheduled node, creating an asynchronous task according to the transaction savepoint, where the asynchronous task includes a to-be-scheduled task that is on the to-be-scheduled node and that is after the transaction savepoint, using a first thread to execute a transaction that includes a task in the flow other than the asynchronous task, and submitting the transaction executed by the first thread in order to ensure data consistency, and using a second thread to execute the asynchronous task in order to implement transaction splitting between task nodes.

Claims (58)

1. A flow scheduling apparatus configured to execute a flow, wherein the flow comprises at least two tasks, and wherein the flow scheduling apparatus comprises:

a memory comprising instructions; and

a processor coupled to the memory and configured to execute the instructions, which causes the processor to:

determine that a transaction savepoint is in the flow;

create an asynchronous task according to the transaction savepoint, wherein the asynchronous task comprises a to-be-scheduled task, and wherein the to-be-scheduled task is scheduled after the transaction savepoint;

execute, by a first thread, a first transaction comprising a first task in the flow, wherein the first task is scheduled before the transaction savepoint in the flow;

register a transaction submission event callback listener for the first transaction;

submit the first transaction executed by the first thread;

place, by the first thread, the asynchronous task into a to-be-scheduled task queue by listening according to the registered transaction submission event callback listener indicating that the first transaction is submitted successfully;

obtain, by a second thread, the asynchronous task from the to-be-scheduled task queue;

execute, by the second thread, a second transaction comprising the asynchronous task;

persist the asynchronous task;

store the persisted asynchronous task in a database after the first transaction executed by the first thread is submitted;

acquire, by a second flow engine process, the asynchronous task from the database when a first flow engine process terminates exceptionally before execution of the asynchronous task is completed, wherein the second thread belongs to the first flow engine process;

schedule, by the second flow engine process, the asynchronous task; and

execute, by the second flow engine process, the asynchronous task.

2. The flow scheduling apparatus according to claim 1 , wherein the instructions further cause the processor to be configured to:

remove the asynchronous task from the to-be-scheduled task queue when the second thread terminates exceptionally before execution of the asynchronous task is completed; and

execute, by a third thread, the asynchronous task.

3. The flow scheduling apparatus according to claim 1 , wherein the instructions further cause the processor to be configured to store the transaction savepoint in a flow definition in the database.

4. The flow scheduling apparatus according to claim 1 , wherein the transaction is a declarative transaction.

5. A method for scheduling a business flow, wherein the flow comprises at least two tasks, and wherein the method comprises:

determining that a transaction savepoint is in the flow;

creating an asynchronous task according to the transaction savepoint, wherein the asynchronous task comprises a to-be-scheduled task, and wherein the to-be-scheduled task is scheduled after the transaction savepoint;

executing, by a first thread, a first transaction comprising a first task in the flow, wherein the first task is scheduled before the transaction savepoint in the flow;

registering a transaction submission event callback listener for the first transaction;

submitting the first transaction executed by the first thread;

placing, by the first thread, the asynchronous task into a to-be-scheduled task queue by listening according to the registered transaction submission event callback listener indicating that the first transaction is submitted successfully;

obtaining, by a second thread, the asynchronous task from the to-be-scheduled task queue;

executing, by the second thread, a second transaction comprising the asynchronous task;

persisting the asynchronous task;

storing the persisted asynchronous task in a database after the first transaction executed by the first thread is submitted;

acquiring, by a second flow engine process, the asynchronous task from the database when a first flow engine process terminates exceptionally before execution of the asynchronous task is completed, wherein the second thread belongs to the first flow engine process;

scheduling, by the second flow engine process, the asynchronous task; and

executing, by the second flow engine process, the asynchronous task.

6. The method according to claim 5 , further comprising:

removing the asynchronous task from the to-be-scheduled task queue when the second thread terminates exceptionally before execution of the asynchronous task is completed; and

executing, by a third thread, the asynchronous task.

7. The method according to claim 5 , further comprising storing the transaction savepoint in a flow definition in the database.

8. A computer program product comprising computer executable instructions stored on a non-transitory computer readable medium such that when executed by a processor, cause the processor to execute a method for scheduling a flow comprising at least two tasks, wherein the method comprises:

determining that a transaction savepoint is in the flow;

creating an asynchronous task according to the transaction savepoint, wherein the asynchronous task comprises a to-be-scheduled task, and wherein the asynchronous task is scheduled after the transaction savepoint;

executing, by a first thread, a first transaction that comprises a first task in the flow, wherein the first task is scheduled before the transaction savepoint in the flow;

registering a transaction submission event callback listener for the first transaction;

submitting the first transaction executed by the first thread;

placing, by the first thread, the asynchronous task into a to-be-scheduled task queue by listening according to the registered transaction submission event callback listener indicating that the first transaction is submitted successfully;

obtain, by a second thread, the asynchronous task from the to-be-scheduled task queue;

executing, by the second thread, a second transaction comprising the asynchronous task;

persisting the asynchronous task;

storing the persisted asynchronous task in a database after the first transaction executed by the first thread is submitted;

acquiring, by a second flow engine process, the asynchronous task from the database when a first flow engine process terminates exceptionally before execution of the asynchronous task is completed, wherein the second thread belongs to the first flow engine process;

scheduling, by the second flow engine process, the asynchronous task; and

executing, by the second flow engine process, the asynchronous task.

9. The computer program product according to claim 8 , wherein the method further comprises:

removing the asynchronous task from the to-be-scheduled task queue when the second thread terminates exceptionally before execution of the asynchronous task is completed; and

executing, by a third thread, the asynchronous task.

10. The computer program product according to claim 8 , wherein the method further comprises storing the transaction savepoint in a flow definition in the database.

11. The computer program product according to claim 8 , wherein the transaction is a declarative transaction.

Assignments (6)
FORECLOSURE ASSIGMENT Recorded Feb 4, 2020
From: SHELFBUCKS, INC.
To: CAC, LLC
Reel/Frame 051799/0818 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 31, 2020
From: SHELFBUCKS, INC.
To: CAC, LLC
Reel/Frame 051765/0674 →
CORRECTION BY DECLARATION TO CORRECT THE PATENT APPLICATION NO. 15/153,204 IN THE PATENT SECURITY AGREEMENT PREVIOUSLY RECORDED ON REEL 048876 FRAME 0698 Recorded Sep 11, 2019
From: SHELFBUCKS, INC.
To: DAMMEYER, TOM
Reel/Frame 051425/0075 →
PATENT SECURITY AGREEMENT Recorded May 21, 2019
From: SHELFBUCKS, INC.
To: DAMMEYER, TOM
Reel/Frame 049239/0839 →
SECURITY INTEREST Recorded Apr 11, 2019
From: SHELFBUCKS, INC.
To: DAMMEYER, TOM
Reel/Frame 048876/0698 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jan 27, 2017
From: ZHOU, JUNJIE; MURTHY, VEMANA NARASIMHA; HAVERI, UPASANA
To: HUAWEI TECHNOLOGIES CO., LTD.
Reel/Frame 041099/0046 →
Priority Claims (1)
CN 2013 1 0567968 · Nov 14, 2013 · national
Continuity (2)
Continuation PCTCN2014089703 · Oct 28, 2014
Related Publication 20160260040A1 · Sep 8, 2016