Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-9850

Provide archiving policy for end date for pgsql for the entire hierarchy.

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • 7.59.0.Final
    • None
    • None
    • None
    • False
    • False
    • NEW
    • NEW
    • Undefined

    Description

      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;
      

      Attachments

        Activity

          People

            elguardian@gmail.com Enrique González Martínez (Inactive)
            elguardian@gmail.com Enrique González Martínez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: