Skip to content

To state or not to state? #660

Answered by ricardozanini
giorgosera asked this question in Q&A
Discussion options

You must be logged in to vote

Hi there! Sorry for the long winter I hope you can still see value on my answer.

I guess my question is when should I group my actions under one state vs spreading them to different states?
e.g. Why would I have an operation state with two actions AFTER an event state when I can put those actions under the event state and get rid of the operation state? I am failing to understand when to choose the one over the other.

There's no correct answer. You can group actions in a state when it makes sense to you. For example, when the actions complement each other.

In the new DSL, each task is responsible for a single operation:

do:
  - task1
  - task2
  - task3

In your example, you would have a l…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by cdavernas
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants