https://github.com/onify/blueprint-onify-purge-processes
Purge processes in Onify
https://github.com/onify/blueprint-onify-purge-processes
flow onify onify-blueprint onify-blueprints processes
Last synced: 6 months ago
JSON representation
Purge processes in Onify
- Host: GitHub
- URL: https://github.com/onify/blueprint-onify-purge-processes
- Owner: onify
- License: mit
- Created: 2023-04-28T12:47:19.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-10-10T19:02:59.000Z (over 1 year ago)
- Last Synced: 2025-02-16T17:57:04.448Z (over 1 year ago)
- Topics: flow, onify, onify-blueprint, onify-blueprints, processes
- Language: JavaScript
- Homepage: https://onify.co
- Size: 409 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README

[](https://www.repostatus.org/#wip)

# Onify Blueprint: Purge processes in Onify
This blueprint show how we easy can purge processes in Onify based on process tags (`tag:purge`). It is scheduled to run every 30 minutes. See below for information how to set it up.

## Requirements
* [Onify Hub](https://github.com/onify/install) (API version 2.14.1 or higher)
* [Camunda Modeler](https://camunda.com/download/modeler/)
## Setup
To start purging processes you first need to start tagging the process. This can either be done via the workflow where the tags will be inherited to the process once you start a process. Or you can in a process set the tags.
Each process that should be purged needs the following tags:
* `purge` - This is required to be part of the purge process
* `purge:{hours}:{status}:{type}` - This is the part where you specify when and how a process should be purged. `status` is a list of statuses that is separated with a comma.
> Important: The hours is calculated by the enddate. **This means that processes missing enddate (eg. Running) will not be purged.**
> Note: Setting `hours` to `0` will purge the process immediately.
Purge types:
* `full` (default) - Delete the process permanently
* `data` - Only purge process data (Remove `flowstate` and `bpmn` data (useful for saving disk space))
### Examples
* `purge:0:Completed` - Delete the process immediately if the status is Completed
* `purge:24:Completed` - Delete the process after 24 hours if the status is Completed
* `purge:1:Completed,Stopped` - Delete the process after 1 hour if the status is Completed or Stopped
* `purge:168:Stopped` - Delete the process after 1 week if the status is Stopped
* `purge:2190:Completed,Stopped:full` - Delete the process after 3 months if the status is Completed or Stopped
* `purge:48:Completed,Stopped:data` - Partial (delete data) purge process after 48 hours if the status is Completed or Stopped
## Deploy
1. Open the BPMN diagram in Camunda Modeler.
2. Deploy the BPMN diagram (click `Deploy current diagram` and follow the steps).
> NOTE: You can check the process output for some stats...
## Support
* Community/forum: https://support.onify.co/discuss
* Documentation: https://support.onify.co/docs
* Support and SLA: https://support.onify.co/docs/get-support
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.