166
Views
3
Comments
Solved
Starting a BPT process from a different module
Question

Hi All,

Consider this scenario:

A customer can put in a work order with us and can also cancel said order. When he cancels his order and that was the only order that he had with us we need to delete/anonymize his data after 7 days according to the data protection law. If he inputs another work order with us within those 7 days the deletion is cancelled.

Regarding this scenario I have two questions:

1. How can I start the BPT proces from within the flow of another module when it isn't triggered by an update or delete?

2. How can I stop the proces when it depends on a specific create or update rather than a general update or create?

Kind regards and thanks in advance,

Bart 

2025-08-22 10-19-44
Pramod Jain
 
MVP
Solution

Hi Bart ,

I see following options here.

1. As Dorine mentioned create a process make it public and launch it from  the update or delete action itself.

2. To top the process when it depends on a specific create or update you need to keep the process id stored somewhere and then you can use the Terminate Process system action which requires the process id to stop the running process.

Also to delete the data  after 7 days according to the data protection law you can create one timer and schedule it to run daily . This timer will check if there is any customer who cancels his order and that was the only order for him and its been 7 days now then you can delete the customer data.


Regards,

-PJ-

2021-09-06 15-09-53
Dorine Boudry
 
MVP

Hi Bart,


@1, i'd say make the process public, and in your cancel operation, call the launch action of the process

@2, maybe the easiest is to not stop the process, and at the moment the delete step executed after 7 days, have a last check if no new orders have come in, if not, go ahead with the deletion. (but I'm just saying that because I don't know the aswer :-)

Dorine

2025-08-22 10-19-44
Pramod Jain
 
MVP
Solution

Hi Bart ,

I see following options here.

1. As Dorine mentioned create a process make it public and launch it from  the update or delete action itself.

2. To top the process when it depends on a specific create or update you need to keep the process id stored somewhere and then you can use the Terminate Process system action which requires the process id to stop the running process.

Also to delete the data  after 7 days according to the data protection law you can create one timer and schedule it to run daily . This timer will check if there is any customer who cancels his order and that was the only order for him and its been 7 days now then you can delete the customer data.


Regards,

-PJ-

UserImage.jpg
Bart van Orizande

Hi Dorine and Pramod,

Thanks for your clear answers, I will implement them in my application :)

Kind regards,

Bart van Orizande

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.