Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINOR: Handle Flowable History Cleanup #18990

Merged
merged 1 commit into from
Dec 12, 2024
Merged

Conversation

IceS2
Copy link
Contributor

@IceS2 IceS2 commented Dec 10, 2024

This PR aims to do two different things:

  • First of all, it aims to provide a good default for keeping the flowable historic tables nice and tidy to avoid them growing way too much
    This is done by setting the following config, with the default being cleaning history of processes after 7 days they ended.

    processEngineConfiguration
        .setEnableHistoryCleaning(true)
        .setCleanInstancesEndedAfter(
            Duration.ofDays(
                workflowSettings.getHistoryCleanUpConfiguration().getCleanAfterNumberOfDays()));
  • Second, it parametrizes the main configurations that should be defined depending on the different use cases
    This was done by setting a new SystemSetting: WorkflowSetting.
    The main thing I'm not sold on is how I'm updating the ProcessEngine after a setting change is done. I'd love any inputs since it seems it is the first time we are doing this.

Type of change:

  • Improvement

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

Copy link
Contributor

@sushi30 sushi30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest having a pub/sub mechanism in the SystemRepository allowing objects like the WorkflowHandler to listen to configuration changes. So postUpdate should call all the subscribers instead of explicit objects and WorkflowHandler can choose what to do with t he update based on the SettingsType. This will keep the dependency tree linear (SystemRepository -> WorkflowHandler). This might also be useful in the context of the Application framework.

But that can be done on another iteration.

@IceS2 IceS2 enabled auto-merge (squash) December 11, 2024 15:15
@pmbrull pmbrull disabled auto-merge December 12, 2024 09:01
@pmbrull pmbrull merged commit c24bc87 into main Dec 12, 2024
11 of 18 checks passed
@pmbrull pmbrull deleted the handle-flowable-history-cleanup branch December 12, 2024 09:01
IceS2 added a commit that referenced this pull request Dec 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ingestion safe to test Add this label to run secure Github workflows on PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants