Call process on Entity create & update

I have an Entity in my application . Requirement is to launch a process on any insert or update happens to any of the records in the Entity. I see BPT can be called only in Create action, but is there any straightforward way to trigger the process on Update action as well

Hi Niahr,

you can call BPT in server action also.

create a server action for update and call  Process here.

like below image


Here i am calling BPT process in server action.


Hope this will help you.

Regards

Rahul Sahu

Thanks Rahul.

This is the other alternative. Actually the issue here is the updates happen across modules in different places, hence was trying any way to trigger the process at entity level without having to do code changes in multiple places.

Regards

Nihar

Hi Nihar,

You can create an action in a core module to update your entity and then call your process manually, like in the image below.

Then, instead of using the Update action from the database, you can use your custom one.


Hope this helps,

Pedro

Thanks Pedro. But this is what I am trying to avoid, the code being very scattered/brittle. Is there anything we can do at the Entity level ? If there is nothing then I need to follow the approach that you suggested. 

BR

Nihar

Solution

Nahir,

I think you can achieve this with a conditional start.


Here's a link with a video from nextstep that explains this with more detail: https://www.outsystems.com/nextstep/2019/?wchannelid=lxt52ix89e&wvideoid=zow8f0qc8q

Hope this helps,


Pedro

Solution

Thanks Pedro. This really helped. Let me try it out ..

Need to plan properly so that we dont encounter issues w.r.t the Main process. 

Regards

Nihar


Glad to hear it :)

Let me know if it works out

Thanks Pedro.

Got it to work. Regarding the real implementation i need to plan it in my design especially from deployment & maintenance perspective.


Regards

Nihar