Proper way of return to A-flow from B-flow with collected File info and proceeding A flow

(AlexPtv) #1

Greetings all,

I believe my question is almost similar to Back to the main flow after capturing files but seems I need more simple words way help proactively while now studying Metadata/Attributes/Response Paths on at the moment :nerd_face:, so:

Got 2 flows:

  • flow A is the big main process and starting with New Message trigger; it questions the user and then sending collected info of his answers to specified email address;
  • flow B is the user file collector and is activated if user wants to add a file to bot (yes, that file URL is also should be procceded as URL address string in message body sending in flow A) and starts with New File trigger. This flow only takes a file and supposed then to get back to flow A.

As I understand the logic and it is seems to be affirmed in case issued above, when user agrees to add a file on a specified step in flow A, I use Trigger a flow for flow B as next step in A flow.
(In test run the Flow B is well activated from A flow and getting the file from user - after it comes the following issue).

:point_up:Easy point of my issue is I know at what step the B flow is triggered from flow A and with this I just eventually want the user to return from B flow to (next undone step) in flow A - how could and should I arrange this?

I tried to include in the end of B flow a Trigger a flow command to start flow A, and multitested various Filter/Label/Goto combinations in A flow, but the result works improper so I suppose I have the lack of understanding:

  1. What commands should be used here for describing collected info (a user file URL) in B flow and how this info should be collected in B flow right way and then transferred back to Flow A ?
  2. How and where should this info be got (meet) in flow A and processed (I believe in Filter section) properly?
  3. How should look like the string in email message body of A flow addressed to collected user file URL?

Great thanks in advance, going back to study tutorials.

*UPD Unfortunately found no useful solution yet, question pending.

(Nathan Stults) #2

Hi Alex,

Ideally, you would split your flow into several pieces, one before the file request, and one after, and not try to transfer control back to Flow A, but simply end Flow A and have your remaining logic in Flow B or even a Flow C.

However, what you want might still be possible, if you were to trigger Flow A with metadata (this is something you can set in the Trigger a Flow task) and use filters or a label to skip past the initial part of Flow A. But this will end up being rather complicated. Is there a reason not just to have the logic that follows accepting a file in a separate flow, and not try to transfer control back to the middle of Flow A?

(AlexPtv) #3

Dear Nathan,

Appreciate your advice, meanwhile I have already thinking of 3 flow logic in that case due to Restarting the original flow
Yes, after examining similar issues where second flow was file upload trigger, I agree that just passing to next flow logic seems to be best/clear solution if we need user to upload files to bot with other actions.

In my work, the file upload to the bot (single) is the option for the user, so I think this could be a bit awkwardly managed in second flow B (starting trigger with the file) where information already gain in flow A should be transferred (is it possible with metadata or attributes, whats the better way?).
I thought about that alternative way, but waited for some guru answers.

(Nathan Stults) #4

Yes, you should be able to store data in the users attributes that will carry over to the second flow. And we agree it’s a bit awkward - we’re looking at a few ideas for making this easier, the preferred one being to make it possible to request a file in a single flow without having to create a new one. However in the meantime attributes are a good way to share data between the main flow and the flow that receives the file.

1 Like