Giter Club home page Giter Club logo

bonita-purge-tool's Introduction

bonita-purge-tool

Build

This tool provides the capability to purge finished (archived) process instances from Bonita Runtime environment. By default, all archives are preserved forever in Bonita runtime, but if your functional context allows you to remove old unused process instances, as example, if you only need to keep a history of last 6 months, use this tool to cleanup your Bonita database.

How to use this tool

Build this tool

Bonita Purge Tool uses gradle & spring boot to build. Before building, it's recommended to modify the application.properties file located in src/main/resources to enter your database connection information.

Make sure you have Java 8+ installed and simply run: ./gradlew bootDistZip

Run the tool

# Unzip the previously built tool:
unzip -d . build/distributions/bonita-purge-tool.zip
# go to the tool folder:
cd bonita-purge-tool/
# run the command-line tool:
bin/bonita-purge-tool(.bat) <PROCESS_DEFINITION_ID> <OLDEST_DATE_TIMESTAMP> [<TENANT_ID>]

This command will delete all archived process instances belonging to the process identified by PROCESS_DEFINITION_ID, that are finished since at least OLDEST_DATE_TIMESTAMP.

An optional TENANT_ID parameter can be given if the platform uses multiple tenants to specify on which tenant should the process instances be deleted. If multi-tenancy is used and the TENANT_ID is not set, an error is issued and the program stops.

OLDEST_DATE_TIMESTAMP must be a Timestamp (in milliseconds) from which all process instances that finished before that date will be deleted. Unfinished process instances and process instances that finished after that date will not be affected. Its format is a standard Java timestamp since EPOCH (in milliseconds). You can use websites such as Epoch Converter to format such a timestamp.

Developer's corner

Run the unit tests

./gradlew test

Run the integration tests

Integration tests rely on database docker images that are only available for internal Bonitasofter's for now.

./gradlew integrationTest

or

./gradlew iT

to specify the database vendor on which to run the integration tests add -Ddb.vendor=<DB_VENDOR>. For instance:

./gradlew iT -Ddb.vendor=mysql

valid DB vendor values are: mysql | oracle | postgres | sqlserver.
If not specified, it will start a Postgres docker container and run tests against it.

Run the tool without building the whole package

./gradlew bootRun -Pargs=8901055312492483521,165000000,1

It runs on PostgreSQL by default. Change the default database parameters to run it on your database.

Database deletion volume testing reference

This reference page provides the tests run on all supported databases.

bonita-purge-tool's People

Contributors

educhastenier avatar danila-m avatar passga avatar pabloalonso avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.