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?

1 Answer 1

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.

4
  • 1
    Thanks I wanted to be sure with my assumption: A failure is from an issue internally in the function, not external =) Commented Dec 14, 2018 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. Commented Dec 14, 2018 at 22:58
  • @user949300 If you have additional thoughts, please write an answer. I will love to read it! Commented Dec 14, 2018 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. Commented Dec 15, 2018 at 20:59

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.