# US 12,223,298 B2 · Automatic workflow generation

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 12,223,298 B2
- Document ID: US12223298B2
- Status: Granted
- Kind: B2
- Application number: 18/166,301
- Filed: 2023-02-08
- Published: 2023-06-15
- Granted: 2025-02-11
- Earliest claimed: 2021-09-09
- Assignees: eBay Inc.
- Applicants: eBay Inc.
- Inventors: Tianyou Li; Pan Deng; Gavin Zhu
- Web page: https://patentgrep.com/patent/US12223298B2

## CPC

- G06F 8/433: {Dependency analysis; Data or control flow analysis}
- G06F 8/427: {Parsing}
- G06F 8/45: {Exploiting coarse grain parallelism in compilation, i.e. parallelism between groups of instructions}
- G06F 9/4881: {Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues}
- G06F 16/254: {Extract, transform and load [ETL] procedures, e.g. ETL data flows in data warehouses}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Automatic workflow generation is described. One or more files containing code statements for accessing and modifying information in a destination database is received. The code statements are parsed from the one or more files and dependencies between the code statements are determined. A dependency graph is built by arranging the code statements according to the dependencies between the code statements. The dependency graph is partitioned by identifying at least one barrier code statement having an unclear dependency and dividing the dependency graph between code statements occurring prior to the at least one barrier code statement and code statements occurring after the at least one barrier code statement. Jobs are scheduled based on the partitioned dependency graph, and the code statements are annotated according to the scheduled jobs. A workflow is then automatically generated based on the annotated code statements.

## Claims

### Claim 1

A computer-implemented method comprising:
determining dependencies between code statements;
building a dependency graph by arranging the code statements according to the dependencies between the code statements;
dividing the dependency graph between code statements occurring prior to a barrier code statement and code statements occurring after the barrier code statement;
validating, by a validator, the divided dependency graph;
scheduling jobs based on the divided dependency graph;
annotating the code statements according to the scheduled jobs by automatically embedding annotations into comments of the code statements, wherein the annotations include a job identifier indicating the scheduled jobs associated with a respective code statement and a dependency indicator identifying dependencies to other scheduled jobs; and
automatically generating a workflow based on the annotated code statements.

### Claim 2 (depends on 1)

The computer-implemented method of claim 1, wherein the code statements comprise SQL code statements.

### Claim 3 (depends on 1)

The computer-implemented method of claim 1, wherein the workflow is automatically generated according to the annotations.

### Claim 4 (depends on 1)

The computer-implemented method of claim 1, further comprising serializing the annotated code statements into files.

### Claim 5 (depends on 1)

The computer-implemented method of claim 1, wherein the workflow is automatically generated without accessing table schemas.

### Claim 6 (depends on 1)

The computer-implemented method of claim 1, wherein the validator is configured to output error information if an error is identified in the divided dependency graph.

### Claim 7 (depends on 1)

The computer-implemented method of claim 1, wherein automatically generating the workflow includes accessing the annotations embedded into the comments of the code statements.

### Claim 8

A workflow system for automatically generating a workflow from one or more files containing code statements for accessing and modifying information in a destination database, the workflow system comprising:
at least a memory and a processor to perform operations comprising:
determining dependencies between code statements;
building a dependency graph by arranging the code statements according to the dependencies between the code statements;
dividing the dependency graph between code statements occurring prior to a barrier code statement and code statements occurring after the barrier code statement;
validating, by a validator, the divided dependency graph;
scheduling jobs based on the divided dependency graph;
annotating the code statements according to the scheduled jobs by automatically embedding annotations into comments of the code statements, wherein the annotations include a job identifier indicating the scheduled jobs associated with a respective code statement and a dependency indicator identifying dependencies to other scheduled jobs; and
automatically generating a workflow based on the annotated code statements.

### Claim 9 (depends on 8)

The workflow system of claim 8, wherein the code statements comprise SQL code statements.

### Claim 10 (depends on 8)

The workflow system of claim 8, wherein the workflow is automatically generated according to the annotations.

### Claim 11 (depends on 8)

The workflow system of claim 8, further comprising serializing the annotated code statements into files.

### Claim 12 (depends on 8)

The workflow system of claim 8, wherein the workflow is automatically generated without accessing table schemas.

### Claim 13 (depends on 8)

The workflow system of claim 8, wherein the validator is configured to output error information if an error is identified in the divided dependency graph.

### Claim 14 (depends on 8)

The workflow system of claim 8, wherein automatically generating the workflow includes accessing the annotations embedded into the comments of the code statements.

### Claim 15

One or more computer-readable storage media comprising instructions stored thereon that, responsive to execution by one or more processors, perform operations comprising:
determining dependencies between code statements;
building a dependency graph by arranging the code statements according to the dependencies between the code statements;
dividing the dependency graph between code statements occurring prior to a barrier code statement and code statements occurring after the barrier code statement;
validating, by a validator, the divided dependency graph;
scheduling jobs based on the divided dependency graph;
annotating the code statements according to the scheduled jobs by automatically embedding annotations into comments of the code statements, wherein the annotations include a job identifier indicating the scheduled jobs associated with a respective code statement and a dependency indicator identifying dependencies to other scheduled jobs; and
automatically generating a workflow based on the annotated code statements.

### Claim 16 (depends on 15)

The one or more computer-readable storage media of claim 15, wherein the code statements comprise SQL code statements.

### Claim 17 (depends on 15)

The one or more computer-readable storage media of claim 15, wherein the workflow is automatically generated according to the annotations.

### Claim 18 (depends on 15)

The one or more computer-readable storage media of claim 15, wherein the operations further comprise serializing the annotated code statements into files.

### Claim 19 (depends on 15)

The one or more computer-readable storage media of claim 15, wherein the validator is configured to output error information if an error is identified in the divided dependency graph.

### Claim 20 (depends on 15)

The one or more computer-readable storage media of claim 15, wherein automatically generating the workflow includes accessing the annotations embedded into the comments of the code statements.
