Cleanup process of the BpmnProcess Table

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • esendino
    Senior Member
    • May 2019
    • 161

    #1

    Cleanup process of the BpmnProcess Table

    I frequently use sub-Processes and call-activities in my BPM processes.

    As I understand it, each time I execute a BPM one record is created in the BpmnProcess table. And another record is added for each sub-Processes and call-activities.

    In my case, that means that typically 4 records are added for each BPM execution (1 for the main execution and 3 other for subprocesses)

    I was expecting that when I delete process records (I mean delete in the espocrm User Interface - /#BpmnProcess) and later run the cleanup process then all the related records to main deleted BPM will be deleted.

    But seems to me that the cleanup process only removes the main records.

    Is this correct?

    If it is true, then how can I remove the related records?
  • heint
    Junior Member
    • Jun 2025
    • 26

    #2
    Greetings,esendino,

    I could recommend you use the following workflow to delete all Ended processes in your system for further clearing it with cron.

    Firstly, you need to create the List Report with the Process entity type and filter the completed processes; please see the screenshot attached:

    Click image for larger version  Name:	image.png Views:	0 Size:	18.0 KB ID:	121653Click image for larger version  Name:	image.png Views:	0 Size:	6.4 KB ID:	121654

    After, create a workflow to delete these records; in this example, once every Monday at 09:00:

    Click image for larger version

Name:	image.png
Views:	0
Size:	53.0 KB
ID:	121657

    ​​This functionality could be adjusted depending on your needs.
    Last edited by heint; 09-26-2025, 12:04 PM.

    Comment

    Working...