running actions on pages after business process ends.

Hello,

i am trying to reload the page after the business process finishes as well as prompting a success message only after the process is finished.

Can this be done? if so will this be done within the process or somewhere else?

Thanks.


Are you using BPT?


Hi Salman,

I have added a sample module in this post that shows how you can accomplish this for Traditional Web.

Same can be done for Reactive Web, but works a little different. More information can be found here.

Let me know for which type of application you are trying to implement this.

Regards,

Nordin


Maria da Graça Peixoto wrote:

Are you using BPT?


yes i am


Nordin Ahdi wrote:

Hi Salman,

I have added a sample module in this post that shows how you can accomplish this for Traditional Web.

Same can be done for Reactive Web, but works a little different. More information can be found here.

Let me know for which type of application you are trying to implement this.

Regards,

Nordin


im submitting a form to be uploaded into the database in the BPT. After it has been inserted i wanted the table to update and show the new details and only show the success message after form has been inserted in the database.


Are developing a Traditional Web Application or a Reactive Web Application?

Nordin Ahdi wrote:

Are developing a Traditional Web Application or a Reactive Web Application?


traditional

Did you see the sample module I have attached in this post

This works if you launch the process from the screen. Using a FakeNotify widget on your screen that is triggered by some Javascript, it executes the OnNotify screen action every few seconds in which you can check the status of the process using the Process metadata entities after which you can refresh the screen accordingly.

You can try a demo here:

https://nordinahdi.outsystemscloud.com/BPTUIDemo/

Nordin Ahdi wrote:

Did you see the sample module I have attached in this post

This works if you launch the process from the screen. Using a FakeNotify widget on your screen that is triggered by some Javascript, it executes the OnNotify screen action in which you can check the status of the process using the Process metadata entities after which you can refresh the screen accordingly.

You can try a demo here:

https://nordinahdi.outsystemscloud.com/BPTUIDemo/


Yes i saw this but i have minimal javascript knowledge and how to implment it in outsystems. Can you send me the javascript code you used for the demo?

Solution

You can open the sample module in Service Studio to view the logic.

In the Preparation of the screen you find a RunJavascript server action containing the following code:

"setInterval(function(){OsNotifyWidget('"+ ProcessFakeNotify.Id +"', '')}, 3000)"

The 'ProcessFakeNotify.Id' used in the code is the Name of the FakeNotify webblock

Hope this helps.

Regards,

Nordin

Solution

Nordin Ahdi wrote:

You can open the sample module in Service Studio to view the logic.

In the Preparation of the screen you find a RunJavascript server action containing the following code:

"setInterval(function(){OsNotifyWidget('"+ ProcessFakeNotify.Id +"', '')}, 3000)"

The 'ProcessFakeNotify.Id' used in the code is the Name of the FakeNotify webblock

Hope this helps.

Regards,

Nordin

Thanks for this. But i cant seem to find the sample module to download and open in service studio. 

Here you go Salman.

Nordin Ahdi wrote:

Here you go Salman.

Thank you and sorry for bothering you this much :)


You're most welcome Salman! 

And you are not bothering at all. It's called learning and we're happy to help :).