How to realize a delayed redirect in a web interface

108 views
Skip to first unread message

oliver....@est.fujitsu.com

unread,
Oct 30, 2013, 4:50:45 AM10/30/13
to suppor...@runmyprocess.com
Hi!

Our last web interface screen contains an "Approve" button with a defined "Redirect" as on-click event. This "Redirect" will display the main application screen afterwards. As usual the underlying process will continue and perform some remaining process steps.

Now the question:
I it possible to delay the "Redirect" until the process has been finished?
We want to ensure that the main application screen is only displayed after the process has performed all necessary tasks.
Or is there any other way to achieve this result?

Thanks,
Oliver

Richard Manga

unread,
Oct 30, 2013, 5:43:46 AM10/30/13
to suppor...@runmyprocess.com
Hi Oliver.

It is possible to redirect after the proces has been finished. So, what you should do is to use a proces listener.

In the following link, you will find the instructions about the creation of process listener: http://docs.runmyprocess.com/Developer_Guide/Web_Interface/Design/Process_Listener

More in details, the action of your "Approve" button should be "Execute script".  In this script, the only thing you should do 
is to modify the value of the variable that is listened by the process listener (variable that starts process listener). The following script will help you to do this task: RMPApplication.setVariable("variable_listened_by_process",Math.random());

It is also recommanded to use a spinner, as suggested in the link above.

Finally, you will also add a button that will be "not visible". The action to associate to this button will be "Execute script" (this script will be empty). The action associated to "On click" event of this button will be "Redirect". So, you will redirect with this button. The "clik event" will be made by a javascript code  that you will associate to "Completed" event of process listener (ButtonID.setOnClickAction(action)).

Note: The design of your process listener will be all the steps you want to perform after the submit event.

Best regards,


Richard Manga.



  

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/b17aa0e9-85ce-4eef-82df-9f9ea095e2ca%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/groups/opt_out.

oliver....@est.fujitsu.com

unread,
Oct 30, 2013, 5:55:16 AM10/30/13
to suppor...@runmyprocess.com
Hi Richard!

Thanks for that advice.. I understood!

But isn't that against the "Best Practice" approach of RMP? I thought it's not recommended to use process listeners for starting workflow processes?

It also would "break" my main process instance:
- we have one web interface with a launch screen
- the submit button triggers a process which has some manual tasks in between
- now after the final confirmation screen we would trigger another new process instance by using the proposed process listener
=> As result I have two seperate process instances for one workflow

Preferable we would like to maintain only one process instance for every workflow.

Thanks for any comments!
Oliver

Richard Manga

unread,
Oct 30, 2013, 6:21:43 AM10/30/13
to suppor...@runmyprocess.com
Hi Oliver,

The other thing I can suggest you tu use is an API Composite. In fact, API Composite is more compliant with RMP "BEST PRACTICE". 


The above link is not present in the new userguide, but we will add it very soon.

Best regards,

Richard Manga
Oliver

--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "RunMyProcess Support Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum...@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at http://groups.google.com/a/runmyprocess.com/group/supportforum/.

oliver....@est.fujitsu.com

unread,
Oct 30, 2013, 7:23:44 AM10/30/13
to suppor...@runmyprocess.com
Dear Richard!

OK, thanks!
We will give it a try ..

Kind regards,
Oliver

Reply all
Reply to author
Forward
0 new messages