Skip to content

Commit cf05696

Browse files
cppwfsmminella
authored andcommitted
Updated schema documentation
1 parent 98ba2dc commit cf05696

File tree

3 files changed

+77
-0
lines changed

3 files changed

+77
-0
lines changed

spring-cloud-task-docs/src/main/asciidoc/appendix-task-repository-schema.adoc

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,79 @@ This appendix provides an ERD for the database schema used in the task repositor
77
--
88

99
image::task_schema.png[]
10+
11+
=== Table Information
12+
--
13+
14+
.TASK_EXECUTION
15+
Stores the task execution information.
16+
[width="80%", cols="1,1,1,1,10", options="header"]
17+
|=========================================================
18+
|Column Name |Required |Type |Field Length |Notes
19+
20+
|TASK_EXECUTION_ID |TRUE |BIGINT | X |
21+
Spring Cloud Task Framework at app startup establishes the next available id as obtained from the `TASK_SEQ`. Or if the record is created outside of task then the value must be populated at record creation time.
22+
23+
|START_TIME |FALSE | DATETIME | X | Spring Cloud Task Framework at app startup establishes the value.
24+
25+
|END_TIME |FALSE | DATETIME | X | Spring Cloud Task Framework at app exit establishes the value.
26+
27+
|TASK_NAME |FALSE | VARCHAR | 100 | Spring Cloud Task Framework at app startup will set this to "Application" unless user establish the name using the spring.cloud.task.name as discussed <<features-task-name,here>>
28+
29+
|EXIT_CODE |FALSE | INTEGER | X | Follows Spring Boot defaults unless overridden by the user as discussed https://docs.spring.io/spring-cloud-task/docs/current/reference/#features-lifecycle-exit-codes[here].
30+
31+
|EXIT_MESSAGE |FALSE | VARCHAR | 2500 | User Defined as discussed https://docs.spring.io/spring-cloud-task/docs/current/reference/#features-task-execution-listener-exit-messages[here].
32+
33+
|ERROR_MESSAGE |FALSE | VARCHAR | 2500 | Spring Cloud Task Framework at app exit establishes the value.
34+
35+
|LAST_UPDATED |TRUE | DATETIME | X | Spring Cloud Task Framework at app startup establishes the value. Or if the record is created outside of task then the value must be populated at record creation time.
36+
37+
|EXTERNAL_EXECUTION_ID |FALSE | VARCHAR | 250 | If the `spring.cloud.task.external-execution-id` property is set then Spring Cloud Task Framework at app startup will set this to the value specified. More information can be found <<features-external_task_id,here>>
38+
39+
|PARENT_TASK_EXECUTION_ID |FALSE |BIGINT | X | If the `spring.cloud.task.parent-execution-id` property is set then Spring Cloud Task Framework at app startup will set this to the value specified. More information can be found <<features-parent_task_id,here>>
40+
41+
|=========================================================
42+
43+
.TASK_EXECUTION_PARAMS
44+
Stores the parameters used for a task execution
45+
[width="80%", cols="1,1,1,1", options="header"]
46+
|=========================================================
47+
|Column Name |Required |Type |Field Length
48+
|TASK_EXECUTION_ID |TRUE |BIGINT | X |
49+
50+
|TASK_PARAM |FALSE | VARCHAR | 2500 |
51+
52+
|=========================================================
53+
54+
.TASK_TASK_BATCH
55+
Used to link the task execution to the batch execution.
56+
[width="80%", cols="1,1,1,1", options="header"]
57+
|=========================================================
58+
|Column Name |Required |Type |Field Length
59+
60+
|TASK_EXECUTION_ID |TRUE |BIGINT | X |
61+
62+
|JOB_EXECUTION_ID |TRUE | BIGINT | X |
63+
64+
|=========================================================
65+
66+
67+
.TASK_LOCK
68+
Used for the `single-instance-enabled` feature discussed <<features-single-instance-enabled,here>>.
69+
[width="80%", cols="1,1,1,1,10", options="header"]
70+
|=========================================================
71+
|Column Name |Required |Type | Field Length |Notes
72+
73+
|LOCK_KEY |TRUE |CHAR | 36 | UUID for the this lock
74+
75+
|REGION |TRUE | VARCHAR | 100 | User can establish a group of locks using this field.
76+
77+
|CLIENT_ID |TRUE | CHAR | 36 | The task execution id that contains the name of the app to lock.
78+
79+
|CREATED_DATE |TRUE | DATETIME | X | The date that the entry was created
80+
81+
|=========================================================
82+
83+
84+
NOTE: The DDL for setting up tables for each database type can be found https://github.com/spring-cloud/spring-cloud-task/tree/master/spring-cloud-task-core/src/main/java/org/springframework/cloud/task/repository/database/support[here].
85+
--

spring-cloud-task-docs/src/main/asciidoc/features.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -355,6 +355,7 @@ the `onTaskFailed` is stored. Also if you set the `exitMessage` with an
355355
`onTaskEnd` listener, the `exitMessage` from the `onTaskEnd` supersedes
356356
the exit messages from both the `onTaskStartup` and `onTaskFailed`.
357357

358+
[[features-single-instance-enabled]]
358359
=== Restricting Spring Cloud Task Instances
359360

360361
Spring Cloud Task lets you establish that only one task with a given task name can be run
15.5 KB
Loading

0 commit comments

Comments
 (0)