Going back to the parent flow

39 views
Skip to first unread message

Ramesh Krishnamoorthy

unread,
Aug 10, 2021, 10:32:00 AM8/10/21
to rapidpro-dev
I have a child flow (some kind of reusable flow)  that I want to use in multiple parent flows. When the user enters the child flow, at some point I want to take the user back to the parent floe they came from. Since they can enter the child flow from any of the parent flows, how can I take the user back to the correct parent flow? "Enter a Flow" action doesn't allow any function or variable name. Is this possible?

Rudi Giesler

unread,
Aug 10, 2021, 10:41:39 AM8/10/21
to Ramesh Krishnamoorthy, rapidpro-dev
If the child flow just exits, it will go back to the parent flow. So you just need to attach something to the red dots under the "Enter a Flow" action in the parent flow.

Regards,
Rudi.

On Tue, Aug 10, 2021 at 4:32 PM Ramesh Krishnamoorthy <ram...@udhyam.org> wrote:
I have a child flow (some kind of reusable flow)  that I want to use in multiple parent flows. When the user enters the child flow, at some point I want to take the user back to the parent floe they came from. Since they can enter the child flow from any of the parent flows, how can I take the user back to the correct parent flow? "Enter a Flow" action doesn't allow any function or variable name. Is this possible?

--
You received this message because you are subscribed to the Google Groups "rapidpro-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rapidpro-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rapidpro-dev/fd313e0b-57ea-4055-8c69-38ab3e61f1a9n%40googlegroups.com.

Ramesh Krishnamoorthy

unread,
Aug 10, 2021, 11:11:55 AM8/10/21
to rapidpro-dev
Hi Rudi,

Thanks for the quick response. 

Need some clarification: How will the child flow exit? 

If the last node in the child flow is expecting a response from the user and saves to a result as below, result A is supposed to go back to the parent menu where it branched off. Is that possible? How? Thanls



Screenshot 2021-08-10 203825.png

Rowan Seymour

unread,
Aug 10, 2021, 11:25:41 AM8/10/21
to Ramesh Krishnamoorthy, rapidpro-dev
Are you trying to build your own flow engine or run RapidPro? RapidPro has supported subflows and accessing child results in parent flows for years.

-Rowan



--
Rowan Seymour | +593 979099233 | @rowanseymour

Ramesh Krishnamoorthy

unread,
Aug 10, 2021, 11:32:46 AM8/10/21
to rapidpro-dev
I am not denying that in anyway Rowan. I am just not understanding how. If you can help, it will be great. Thx

Rowan Seymour

unread,
Aug 10, 2021, 11:40:33 AM8/10/21
to Ramesh Krishnamoorthy, rapidpro-dev
I'm just trying to understand what you are asking - how to use RapidPro to create subflows or how to implement subflows in a different engine using the RapidPro flow editor. If it's the latter then you're probably best taking a good look at the code behind the RapidPro engine at https://github.com/nyaruka/goflow.

-Rowan

Ramesh Krishnamoorthy

unread,
Aug 10, 2021, 12:02:33 PM8/10/21
to Rowan Seymour, rapidpro-dev
I am NOT creating a new flow engine. I am just trying to use RapidPro as is. Just wanted to know how to get back to the parent from a child flow cleanly to the place where the child flow branched off. I am trying this for the first time so just needed guidance. Thx

Ramesh Krishnamoorthy

unread,
Aug 10, 2021, 12:27:11 PM8/10/21
to rapidpro-dev
Just to clarify, in the screen shot I have shared above, if the user picks option A,  I just want to save it and exit to the parent flow. How to do that? I don't want the child flow to expire, but rather I want to go to the parent flow as soon as the user picks 'A'. Is that possible?

Rowan Seymour

unread,
Aug 10, 2021, 12:29:34 PM8/10/21
to Ramesh Krishnamoorthy, rapidpro-dev
As soon as the contact sends A, you'll go to the connected Send Message, and then the child flow will end. Then the parent flow will resume from the Enter Flow action where it initiated the child flow.

-Rowan

Ramesh Krishnamoorthy

unread,
Aug 10, 2021, 12:51:56 PM8/10/21
to rapidpro-dev
Ok, got it. Will give it a try with multiple parent flows and see if I am able to get back to the branch off point in each parent. Thanks for your patience and assistance.
Reply all
Reply to author
Forward
0 new messages