-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
False
-
False
-
NEW
-
NEW
-
Undefined
-
Sometimes the policy for consider a process ended is not just when the process is finished but the entire hierarchy of subprocess with it. This allows a ways for partitioning.
The flag for controlling which provide should be active is (a separated commas list of fqn classes)
org.kie.jbpm.persistence.archive-provider
This won't be delivered as part of the product as it depends heavly of common table expressions and only works on a few databases supported.
The policy attached considers the full hierarchy of the process (parent, children, granchildren) as a unit of work setting the end date only when the root process finishes.
example:
CREATE TABLE example (id int, end_date date) PARTITION BY RANGE(end_date); CREATE TABLE example_active PARTITION OF example DEFAULT; CREATE TABLE example_month PARTITION OF example FOR VALUES FROM ('2021-08-01') TO ('2021-08-31'); INSERT INTO example VALUES (1, NULL); SELECT * FROM example_active; UPDATE example SET end_date = CURRENT_TIMESTAMP WHERE id = 1; SELECT * FROM example_month;