How do workflows stop?

Have a workflow that starts on a “Next Task” button which will have a timer on it with actions after it. Also, have a workflow On Page Load with a timer on it with similar actions after it. If I hit the Next Task button and start a timer, and then refresh the page, both workflows will be in progress and so will the timers, thus the both set of following actions will complete.

Is there a way to cancel one timer + workflow if another one starts?

Not really beside adding a check between each action of your workflow and not continue if a variable has changed for exemple

1 Like

@Luke What you mean with that

Have a workflow that starts on a “Next Task” button which will have a timer on it with actions after it.

@IKR - There are 2 workflows that have timers to send a “Completed Task” API to backend and to enable the “Next Task” button highlighted in the screenshot.

  1. Page loads and timer begins (length of time dependent on what course is loaded)
  2. “Next Task” button is enabled when course has completed (timer completes from page load or previous #2 action) and user clicks it, starting another timer.

Does this make sense?

Makes sense.
But i do not understand the logic.

First you have two timers which are working independent but you need to time it.
As well you are calling the backend.

50000 people watching at the same time, good luck.

In my opinion, make a own workflow for the timers, put the result in a variable so you can control the button.

For the API calls, try to save as much as possible in local storage, unless it’s sensitive data from the user. e.g. email, i’d/s, address etc.

Basically, shrimp your “Workflows”, less is more.

But if you don’t want to change, you still can make another workflow to control your timers.

Thank you so much for the advice! I have to send to backend for another requirement, so saving in local storage is not possible for this use case.

Totally agree with less is more. Though, I am unsure what you mean by make one workflow for the timers. How would there only be one workflow for the timers if theres two ways a user can flow through the courses - 1) On page load and 2) Next Task Button?

TL;DR
To solve the use case with two workflows with timers, I added a BOOL Var which is turned on when the Page Loads and a timer starts (turned off when timer ends). Then set a pass through condition for the Next Task button workflow which won’t send API and enable the button if that Var is turned on (essentially the On Page Load takes precedence and avoids there being two timers enabling the Next Task button)

I mean you can build a general logic, which will control your usually used data.
Like someone is attending a class, but there are also other people.
which means “problem” (problem can be discussed).
But the idea doesn’t sound real.
how do you store videos/records?