-
Notifications
You must be signed in to change notification settings - Fork 1.2k
/
mysql5-jbpm-schema.sql
714 lines (621 loc) · 23 KB
/
mysql5-jbpm-schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
create table Attachment (
id bigint not null auto_increment,
accessType integer,
attachedAt datetime,
attachmentContentId bigint not null,
contentType varchar(255),
name varchar(255),
attachment_size integer,
attachedBy_id varchar(255),
TaskData_Attachments_Id bigint,
primary key (id)
);
create table AuditTaskImpl (
id bigint not null auto_increment,
activationTime date,
actualOwner varchar(255),
createdBy varchar(255),
createdOn date,
deploymentId varchar(255),
description varchar(255),
dueDate date,
name varchar(255),
parentId bigint not null,
priority integer not null,
processId varchar(255),
processInstanceId bigint not null,
processSessionId integer not null,
status varchar(255),
taskId bigint,
primary key (id)
);
create table BAMTaskSummary (
pk bigint not null auto_increment,
createdDate datetime,
duration bigint,
endDate datetime,
processInstanceId bigint not null,
startDate datetime,
status varchar(255),
taskId bigint not null,
taskName varchar(255),
userId varchar(255),
OPTLOCK integer,
primary key (pk)
);
create table BooleanExpression (
id bigint not null auto_increment,
expression longtext,
type varchar(255),
Escalation_Constraints_Id bigint,
primary key (id)
);
create table Content (
id bigint not null auto_increment,
content longblob,
primary key (id)
);
create table ContextMappingInfo (
mappingId bigint not null auto_increment,
CONTEXT_ID varchar(255) not null,
KSESSION_ID integer not null,
OWNER_ID varchar(255),
OPTLOCK integer,
primary key (mappingId)
);
create table CorrelationKeyInfo (
keyId bigint not null auto_increment,
name varchar(255),
processInstanceId bigint not null,
OPTLOCK integer,
primary key (keyId)
);
create table CorrelationPropertyInfo (
propertyId bigint not null auto_increment,
name varchar(255),
value varchar(255),
OPTLOCK integer,
correlationKey_keyId bigint,
primary key (propertyId)
);
create table Deadline (
id bigint not null auto_increment,
deadline_date datetime,
escalated smallint,
Deadlines_StartDeadLine_Id bigint,
Deadlines_EndDeadLine_Id bigint,
primary key (id)
);
create table Delegation_delegates (
task_id bigint not null,
entity_id varchar(255) not null
);
create table DeploymentStore (
id bigint not null auto_increment,
attributes varchar(255),
DEPLOYMENT_ID varchar(255),
deploymentUnit longtext,
state integer,
updateDate datetime,
primary key (id)
);
create table ErrorInfo (
id bigint not null auto_increment,
message varchar(255),
stacktrace varchar(5000),
timestamp datetime,
REQUEST_ID bigint not null,
primary key (id)
);
create table Escalation (
id bigint not null auto_increment,
name varchar(255),
Deadline_Escalation_Id bigint,
primary key (id)
);
create table EventTypes (
InstanceId bigint not null,
element varchar(255)
);
create table I18NText (
id bigint not null auto_increment,
language varchar(255),
shortText varchar(255),
text longtext,
Task_Subjects_Id bigint,
Task_Names_Id bigint,
Task_Descriptions_Id bigint,
Reassignment_Documentation_Id bigint,
Notification_Subjects_Id bigint,
Notification_Names_Id bigint,
Notification_Documentation_Id bigint,
Notification_Descriptions_Id bigint,
Deadline_Documentation_Id bigint,
primary key (id)
);
create table NodeInstanceLog (
id bigint not null auto_increment,
connection varchar(255),
log_date datetime,
externalId varchar(255),
nodeId varchar(255),
nodeInstanceId varchar(255),
nodeName varchar(255),
nodeType varchar(255),
processId varchar(255),
processInstanceId bigint not null,
type integer not null,
workItemId bigint,
primary key (id)
);
create table Notification (
DTYPE varchar(31) not null,
id bigint not null auto_increment,
priority integer not null,
Escalation_Notifications_Id bigint,
primary key (id)
);
create table Notification_BAs (
task_id bigint not null,
entity_id varchar(255) not null
);
create table Notification_Recipients (
task_id bigint not null,
entity_id varchar(255) not null
);
create table Notification_email_header (
Notification_id bigint not null,
emailHeaders_id bigint not null,
mapkey varchar(255) not null,
primary key (Notification_id, mapkey)
);
create table OrganizationalEntity (
DTYPE varchar(31) not null,
id varchar(255) not null,
primary key (id)
);
create table PeopleAssignments_BAs (
task_id bigint not null,
entity_id varchar(255) not null
);
create table PeopleAssignments_ExclOwners (
task_id bigint not null,
entity_id varchar(255) not null
);
create table PeopleAssignments_PotOwners (
task_id bigint not null,
entity_id varchar(255) not null
);
create table PeopleAssignments_Recipients (
task_id bigint not null,
entity_id varchar(255) not null
);
create table PeopleAssignments_Stakeholders (
task_id bigint not null,
entity_id varchar(255) not null
);
create table ProcessInstanceInfo (
InstanceId bigint not null auto_increment,
lastModificationDate datetime,
lastReadDate datetime,
processId varchar(255),
processInstanceByteArray longblob,
startDate datetime,
state integer not null,
OPTLOCK integer,
primary key (InstanceId)
);
create table ProcessInstanceLog (
id bigint not null auto_increment,
duration bigint,
end_date datetime,
externalId varchar(255),
user_identity varchar(255),
outcome varchar(255),
parentProcessInstanceId bigint,
processId varchar(255),
processInstanceDescription varchar(255),
processInstanceId bigint not null,
processName varchar(255),
processVersion varchar(255),
start_date datetime,
status integer,
primary key (id)
);
create table Reassignment (
id bigint not null auto_increment,
Escalation_Reassignments_Id bigint,
primary key (id)
);
create table Reassignment_potentialOwners (
task_id bigint not null,
entity_id varchar(255) not null
);
create table RequestInfo (
id bigint not null auto_increment,
commandName varchar(255),
deploymentId varchar(255),
executions integer not null,
businessKey varchar(255),
message varchar(255),
owner varchar(255),
requestData longblob,
responseData longblob,
retries integer not null,
status varchar(255),
timestamp datetime,
primary key (id)
);
create table SessionInfo (
id integer not null auto_increment,
lastModificationDate datetime,
rulesByteArray longblob,
startDate datetime,
OPTLOCK integer,
primary key (id)
);
create table Task (
id bigint not null auto_increment,
archived smallint,
allowedToDelegate varchar(255),
description varchar(255),
formName varchar(255),
name varchar(255),
priority integer not null,
subTaskStrategy varchar(255),
subject varchar(255),
activationTime datetime,
createdOn datetime,
deploymentId varchar(255),
documentAccessType integer,
documentContentId bigint not null,
documentType varchar(255),
expirationTime datetime,
faultAccessType integer,
faultContentId bigint not null,
faultName varchar(255),
faultType varchar(255),
outputAccessType integer,
outputContentId bigint not null,
outputType varchar(255),
parentId bigint not null,
previousStatus integer,
processId varchar(255),
processInstanceId bigint not null,
processSessionId integer not null,
skipable boolean not null,
status varchar(255),
workItemId bigint not null,
taskType varchar(255),
OPTLOCK integer,
taskInitiator_id varchar(255),
actualOwner_id varchar(255),
createdBy_id varchar(255),
primary key (id)
);
create table TaskDef (
id bigint not null auto_increment,
name varchar(255),
priority integer not null,
primary key (id)
);
create table TaskEvent (
id bigint not null auto_increment,
logTime datetime,
processInstanceId bigint,
taskId bigint,
type varchar(255),
userId varchar(255),
OPTLOCK integer,
workItemId bigint,
primary key (id)
);
create table VariableInstanceLog (
id bigint not null auto_increment,
log_date datetime,
externalId varchar(255),
oldValue varchar(255),
processId varchar(255),
processInstanceId bigint not null,
value varchar(255),
variableId varchar(255),
variableInstanceId varchar(255),
primary key (id)
);
create table WorkItemInfo (
workItemId bigint not null auto_increment,
creationDate datetime,
name varchar(255),
processInstanceId bigint not null,
state bigint not null,
OPTLOCK integer,
workItemByteArray longblob,
primary key (workItemId)
);
create table email_header (
id bigint not null auto_increment,
body longtext,
fromAddress varchar(255),
language varchar(255),
replyToAddress varchar(255),
subject varchar(255),
primary key (id)
);
create table task_comment (
id bigint not null auto_increment,
addedAt datetime,
text longtext,
addedBy_id varchar(255),
TaskData_Comments_Id bigint,
primary key (id)
);
alter table Attachment
add index FK1C93543D937BFB5 (attachedBy_id),
add constraint FK1C93543D937BFB5
foreign key (attachedBy_id)
references OrganizationalEntity (id);
alter table Attachment
add index FK1C9354333CA892A (TaskData_Attachments_Id),
add constraint FK1C9354333CA892A
foreign key (TaskData_Attachments_Id)
references Task (id);
alter table BooleanExpression
add index FKE3D208C06C97C90E (Escalation_Constraints_Id),
add constraint FKE3D208C06C97C90E
foreign key (Escalation_Constraints_Id)
references Escalation (id);
alter table CorrelationPropertyInfo
add index FK761452A5D87156ED (correlationKey_keyId),
add constraint FK761452A5D87156ED
foreign key (correlationKey_keyId)
references CorrelationKeyInfo (keyId);
alter table Deadline
add index FK21DF3E78A9FE0EF4 (Deadlines_StartDeadLine_Id),
add constraint FK21DF3E78A9FE0EF4
foreign key (Deadlines_StartDeadLine_Id)
references Task (id);
alter table Deadline
add index FK21DF3E78695E4DDB (Deadlines_EndDeadLine_Id),
add constraint FK21DF3E78695E4DDB
foreign key (Deadlines_EndDeadLine_Id)
references Task (id);
alter table Delegation_delegates
add index FK47485D5772B3A123 (entity_id),
add constraint FK47485D5772B3A123
foreign key (entity_id)
references OrganizationalEntity (id);
alter table Delegation_delegates
add index FK47485D57786553A5 (task_id),
add constraint FK47485D57786553A5
foreign key (task_id)
references Task (id);
alter table DeploymentStore
add constraint UK_DeploymentStore_1 unique (DEPLOYMENT_ID);
alter table ErrorInfo
add index FK8B1186B6724A467 (REQUEST_ID),
add constraint FK8B1186B6724A467
foreign key (REQUEST_ID)
references RequestInfo (id);
alter table Escalation
add index FK67B2C6B5D1E5CC1 (Deadline_Escalation_Id),
add constraint FK67B2C6B5D1E5CC1
foreign key (Deadline_Escalation_Id)
references Deadline (id);
alter table EventTypes
add index FKB0E5621F7665489A (InstanceId),
add constraint FKB0E5621F7665489A
foreign key (InstanceId)
references ProcessInstanceInfo (InstanceId);
alter table I18NText
add index FK2349686BF4ACCD69 (Task_Subjects_Id),
add constraint FK2349686BF4ACCD69
foreign key (Task_Subjects_Id)
references Task (id);
alter table I18NText
add index FK2349686B424B187C (Task_Names_Id),
add constraint FK2349686B424B187C
foreign key (Task_Names_Id)
references Task (id);
alter table I18NText
add index FK2349686BAB648139 (Task_Descriptions_Id),
add constraint FK2349686BAB648139
foreign key (Task_Descriptions_Id)
references Task (id);
alter table I18NText
add index FK2349686BB340A2AA (Reassignment_Documentation_Id),
add constraint FK2349686BB340A2AA
foreign key (Reassignment_Documentation_Id)
references Reassignment (id);
alter table I18NText
add index FK2349686BF0CDED35 (Notification_Subjects_Id),
add constraint FK2349686BF0CDED35
foreign key (Notification_Subjects_Id)
references Notification (id);
alter table I18NText
add index FK2349686BCC03ED3C (Notification_Names_Id),
add constraint FK2349686BCC03ED3C
foreign key (Notification_Names_Id)
references Notification (id);
alter table I18NText
add index FK2349686B77C1C08A (Notification_Documentation_Id),
add constraint FK2349686B77C1C08A
foreign key (Notification_Documentation_Id)
references Notification (id);
alter table I18NText
add index FK2349686B18DDFE05 (Notification_Descriptions_Id),
add constraint FK2349686B18DDFE05
foreign key (Notification_Descriptions_Id)
references Notification (id);
alter table I18NText
add index FK2349686B78AF072A (Deadline_Documentation_Id),
add constraint FK2349686B78AF072A
foreign key (Deadline_Documentation_Id)
references Deadline (id);
alter table Notification
add index FK2D45DD0BC0C0F29C (Escalation_Notifications_Id),
add constraint FK2D45DD0BC0C0F29C
foreign key (Escalation_Notifications_Id)
references Escalation (id);
alter table Notification_BAs
add index FK2DD68EE072B3A123 (entity_id),
add constraint FK2DD68EE072B3A123
foreign key (entity_id)
references OrganizationalEntity (id);
alter table Notification_BAs
add index FK2DD68EE093F2090B (task_id),
add constraint FK2DD68EE093F2090B
foreign key (task_id)
references Notification (id);
alter table Notification_Recipients
add index FK98FD214E72B3A123 (entity_id),
add constraint FK98FD214E72B3A123
foreign key (entity_id)
references OrganizationalEntity (id);
alter table Notification_Recipients
add index FK98FD214E93F2090B (task_id),
add constraint FK98FD214E93F2090B
foreign key (task_id)
references Notification (id);
alter table Notification_email_header
add constraint UK_F30FE3446CEA0510 unique (emailHeaders_id);
alter table Notification_email_header
add index FKF30FE3448BED1339 (emailHeaders_id),
add constraint FKF30FE3448BED1339
foreign key (emailHeaders_id)
references email_header (id);
alter table Notification_email_header
add index FKF30FE3443E3E97EB (Notification_id),
add constraint FKF30FE3443E3E97EB
foreign key (Notification_id)
references Notification (id);
alter table PeopleAssignments_BAs
add index FK9D8CF4EC72B3A123 (entity_id),
add constraint FK9D8CF4EC72B3A123
foreign key (entity_id)
references OrganizationalEntity (id);
alter table PeopleAssignments_BAs
add index FK9D8CF4EC786553A5 (task_id),
add constraint FK9D8CF4EC786553A5
foreign key (task_id)
references Task (id);
alter table PeopleAssignments_ExclOwners
add index FKC77B97E472B3A123 (entity_id),
add constraint FKC77B97E472B3A123
foreign key (entity_id)
references OrganizationalEntity (id);
alter table PeopleAssignments_ExclOwners
add index FKC77B97E4786553A5 (task_id),
add constraint FKC77B97E4786553A5
foreign key (task_id)
references Task (id);
alter table PeopleAssignments_PotOwners
add index FK1EE418D72B3A123 (entity_id),
add constraint FK1EE418D72B3A123
foreign key (entity_id)
references OrganizationalEntity (id);
alter table PeopleAssignments_PotOwners
add index FK1EE418D786553A5 (task_id),
add constraint FK1EE418D786553A5
foreign key (task_id)
references Task (id);
alter table PeopleAssignments_Recipients
add index FKC6F615C272B3A123 (entity_id),
add constraint FKC6F615C272B3A123
foreign key (entity_id)
references OrganizationalEntity (id);
alter table PeopleAssignments_Recipients
add index FKC6F615C2786553A5 (task_id),
add constraint FKC6F615C2786553A5
foreign key (task_id)
references Task (id);
alter table PeopleAssignments_Stakeholders
add index FK482F79D572B3A123 (entity_id),
add constraint FK482F79D572B3A123
foreign key (entity_id)
references OrganizationalEntity (id);
alter table PeopleAssignments_Stakeholders
add index FK482F79D5786553A5 (task_id),
add constraint FK482F79D5786553A5
foreign key (task_id)
references Task (id);
alter table Reassignment
add index FK724D056062A1E871 (Escalation_Reassignments_Id),
add constraint FK724D056062A1E871
foreign key (Escalation_Reassignments_Id)
references Escalation (id);
alter table Reassignment_potentialOwners
add index FK90B59CFF72B3A123 (entity_id),
add constraint FK90B59CFF72B3A123
foreign key (entity_id)
references OrganizationalEntity (id);
alter table Reassignment_potentialOwners
add index FK90B59CFF35D2FEE0 (task_id),
add constraint FK90B59CFF35D2FEE0
foreign key (task_id)
references Reassignment (id);
alter table Task
add index FK27A9A53C55C806 (taskInitiator_id),
add constraint FK27A9A53C55C806
foreign key (taskInitiator_id)
references OrganizationalEntity (id);
alter table Task
add index FK27A9A5B723BE8B (actualOwner_id),
add constraint FK27A9A5B723BE8B
foreign key (actualOwner_id)
references OrganizationalEntity (id);
alter table Task
add index FK27A9A55427E8F1 (createdBy_id),
add constraint FK27A9A55427E8F1
foreign key (createdBy_id)
references OrganizationalEntity (id);
alter table task_comment
add index FK61F475A57A3215D9 (addedBy_id),
add constraint FK61F475A57A3215D9
foreign key (addedBy_id)
references OrganizationalEntity (id);
alter table task_comment
add index FK61F475A5F510CB46 (TaskData_Comments_Id),
add constraint FK61F475A5F510CB46
foreign key (TaskData_Comments_Id)
references Task (id);
create index IDX_Attachment_Id ON Attachment(TaskData_Attachments_Id);
create index IDX_EventTypes_Id ON EventTypes(InstanceId);
create index IDX_I18NText_Subj on I18NText(Task_Subjects_Id);
create index IDX_I18NText_Name on I18NText(Task_Names_Id);
create index IDX_I18NText_Descr on I18NText(Task_Descriptions_Id);
create index IDX_I18NText_Notif on I18NText(Notification_Documentation_Id);
create index IDX_PA_PotOwners_TaskId on PeopleAssignments_PotOwners(task_id);
create index IDX_Task_processInstanceId on Task(processInstanceId);
create index IDX_Task_processId on Task(processId);
create index IDX_Task_status on Task(status);
create index IDX_Task_archived on Task(archived);
create index IDX_Task_workItemId on Task(workItemId);
create index IDX_EventTypes_element ON EventTypes(element);
create index IDX_CMI_Context ON ContextMappingInfo(CONTEXT_ID);
create index IDX_CMI_KSession ON ContextMappingInfo(KSESSION_ID);
create index IDX_CMI_Owner ON ContextMappingInfo(OWNER_ID);
create index IND_RequestInfo_status ON RequestInfo(status);
create index IND_RequestInfo_timestamp ON RequestInfo(timestamp);
create index IND_RequestInfo_owner ON RequestInfo(owner);
create index IDX_BAMTaskSumm_createdDate on BAMTaskSummary(createdDate);
create index IDX_BAMTaskSumm_duration on BAMTaskSummary(duration);
create index IDX_BAMTaskSumm_endDate on BAMTaskSummary(endDate);
create index IDX_BAMTaskSumm_pInstId on BAMTaskSummary(processInstanceId);
create index IDX_BAMTaskSumm_startDate on BAMTaskSummary(startDate);
create index IDX_BAMTaskSumm_status on BAMTaskSummary(status);
create index IDX_BAMTaskSumm_taskId on BAMTaskSummary(taskId);
create index IDX_BAMTaskSumm_taskName on BAMTaskSummary(taskName);
create index IDX_BAMTaskSumm_userId on BAMTaskSummary(userId);
create index IDX_PInstLog_duration on ProcessInstanceLog(duration);
create index IDX_PInstLog_end_date on ProcessInstanceLog(end_date);
create index IDX_PInstLog_extId on ProcessInstanceLog(externalId);
create index IDX_PInstLog_user_identity on ProcessInstanceLog(user_identity);
create index IDX_PInstLog_outcome on ProcessInstanceLog(outcome);
create index IDX_PInstLog_parentPInstId on ProcessInstanceLog(parentProcessInstanceId);
create index IDX_PInstLog_pId on ProcessInstanceLog(processId);
create index IDX_PInstLog_pInsteDescr on ProcessInstanceLog(processInstanceDescription);
create index IDX_PInstLog_pInstId on ProcessInstanceLog(processInstanceId);
create index IDX_PInstLog_pName on ProcessInstanceLog(processName);
create index IDX_PInstLog_pVersion on ProcessInstanceLog(processVersion);
create index IDX_PInstLog_start_date on ProcessInstanceLog(start_date);
create index IDX_PInstLog_status on ProcessInstanceLog(status);