1

In case we hav functions (f_1,....,f_n) which runs in this order somewhere in the future.

I would like to define a relationship between those functions such that if f_i failed due to expection then f_i+1,f_i+2,...f_n shouldn't run also. Also, the user can cancel f_i. If he does, then f_i+1,f_i+2,...f_n shouldn't run also.

I'm trying to determine the status (failed/canceled/something else) of f_i+1,f_i+2,...f_n incase:

  • f_i failed due to exception.
  • f_i canceled by the user.

Is there any convention?

4

The correct state of the f_i+1,f_i+2,...f_n would be "cancelled".

If f_i failed, you are cancelling f_i+1,f_i+2,...f_n and not failing them. A failure is from an issue internally in the function, not external.

If f_i was cancelled, you are cancelling f_i+1,f_i+2,...f_n and f_i as a set. Therefore they are all cancelled together.

  • 1
    Thanks I wanted to be sure with my assumption: A failure is from an issue internally in the function, not external =) – Stav Alfi Dec 14 '18 at 22:09
  • 1
    An argument could be made that the states of f_i+1,f_i+2,...f_n are still "pending". If the workflow ever allows f_i to rerun, then they can proceed. Depends if the user is just cancelling f_i, or the whole workflow. – user949300 Dec 14 '18 at 22:58
  • @user949300 If you have additional thoughts, please write an answer. I will love to read it! – Stav Alfi Dec 14 '18 at 23:40
  • "if f_i failed due to expection then f_i+1,f_i+2,...f_n shouldn't run also". The whole workflow is cancelled. – Aliminator Dec 15 '18 at 20:59

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.