40
Views
13
Comments
Solved
running actions on pages after business process ends.
Question

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.


mvp_badge
MVP
Rank: #74
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

Are you using BPT?


mvp_badge
MVP
Rank: #74

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


mvp_badge
MVP
Rank: #74

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

mvp_badge
MVP
Rank: #74

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/

mvp_badge
MVP
Rank: #74
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

mvp_badge
MVP
Rank: #74

Here you go Salman.

BPTUIDemo.oml

mvp_badge
MVP
Rank: #74

You're most welcome Salman! 

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