Redirect to a custom popup page from sub microflow where REST API got 401

0
Hi,  I have 2 microflows. In 1st Microflow I am iterating a list. I am calling a 2nd microflow from the loop , in that  sub microflow I am having a REST call . Now I want to redirect to login page or my custom message page , if i got 401 ( Unauthorized ) error. But I can’t redirect to my custom page. because of parent microflow its continueing the  iteration. in my case , even i am able to open a custom page, its opened based on the list size. let say if list having  5 objects , then 5 pop pages opened. How we can open a page from sub microflow and stop parent microflows  execution
asked
1 answers
0

Hi there,

If your child microflow is not currently returning anything, then you can have the child microflow return a boolean, based on whether it was successfully executed.

If your child microflow is currently returning something, you can throw an exception, using the ‘throw exception’ Java action available in the Community Commons-module. You can then catch this error in the parent microflow, from which you can redirect the user to the desired page.

Hope it helps

answered