[BPT] New API for deleting/archiving processes

[BPT] New API for deleting/archiving processes

  
Hi everyone,

With the release of 7.0.1.18 and 8.0.0.8 revision patches of the OutSystems Platform, we have extended the BPT API to allow deleting old processes and released a Forge component to demonstrate how to build an archiving process, relying on the new API.
 
Business Process Technology relies on a set of meta-model entities to record data required by your business processes:

When using BPT intensively, these entities can have a high growth rate and start affecting the performance of queries performed on them. While sometimes it is ok to delete a large portion of the old data, other times you need to keep it for logging or legal reasons, even if it is not directly accessible from your applications.

With the new revision patches we have added two new actions to the BPT_API extension (included in System Components) to allow deleting old processes:

These actions allow you to delete processes either individually or in bulk (according to a criteria). You can read more about these new actions in the Overview of the BPT API page, from Service Studio help.


Another important use case is when you need to keep the old data, even if you don’t access it frequently. A good approach is to create a separate set of entities to archive the data (this is actually a tip included in the Performance Best Practices technical note). As a proof of concept, we created a Forge component called BPT Sample Archiver. It contains extension points that allow you to easily adapt it to fit your specific needs.


If you have any question, please reply to this post.


Cheers,

Ricardo Soeiro

Ricardo, 
Thank you for the post, and for the BPT Sample Archiver component.
 
This is definitly a good improvement of the API. And could be easily missed by a lot of people without notice. Thank you for the remarks.
Hi Ricardo,

This much awaited functionality has filled a gap we had on BPT.
Great work!

João Grazina
Great work!! I started having performance issues 3 months after started using BPT. This component will help a lot!
Guys,

I'm experiencing a problem during the deploy because of BPT:
Generic SQL Error. ORA-01013: user requested cancel of current operation 
java.sql.SQLTimeoutException: ORA-01013: user requested cancel of current operation 
...
at java.lang.Thread.run(Thread.java:662) 
SQL: INSERT INTO Ossys_BPM_Activity (Tenant_Id, Activity_Def_Id, Process_Id, "NAME", Created, Status_Id, Next_Run, Precedent_Activity_Id) 
SELECT process.Tenant_Id, activityDefinition.Id TargetDefId, process.Id ProcessId, activityDefinition."NAME" ConditionalName, GETDATE(), 1, GETDATE(), MAX(startActivity.Id) PrecedentActivityId FROM OSSYS_BPM_PROCESS_DEFINITION processDefinition INNER JOIN OSSYS_BPM_ACTIVITY_DEFINITION activityDefinition ON activityDefinition.Process_Def_Id = processDefinition.Id AND ActivityDefinition.Is_Active = 1 AND activityDefinition.Kind = 9 INNER JOIN OSSYS_BPM_ACTIVITY_DEFINITION startActivityDefinition ON startActivityDefinition.Pro

I have already changed the database query timeout from 30 to 60 seconds, just for this deploy, but the error persists.

I thought this API would help us, but I can't deploy a new version because of this error, and if I'm not wrong, the better way to use the Api would be calling the Process_BulkDelete Action inside a Timer with a When Publish schedule.

Do I have another option? Such as runing scripts manually against the database (the same commands ran on Process_BulkDelete)?
Hello João
 
I'm having the same problem in a Timer where I have actions to delete and insert 3 tables in database.
 
Here we are  using Outsystems 8.
 
Did you solved this problem?
 
?Thanks regards
Patience Tiago...
 
I increased the database upgrade timeout (via configuration tool) to 1 hour and the deploy of the BPT Archiver was made successfully.
 
I've customized BPT Archiver with my Delete logic, and after some days, and many problems with a version that we weren't able to deploy, I had all the BPT metadata deleted.
 
Unfortunately, it seems the people in this forum don't work with huge volumes of data (that worries me). This problem came to us with not so many time of use (5 months), and after 500 thousand instances of processes.
 

BPT is powerful but not used that often (percentage of clients using it is probably low... my guess)

But, that being said, there are some companies who use it, that judging by their business size, probably have huge volumes of BPT. They must have faced the same issues. Try checking with support as they probably have managed similar cases.