-
Notifications
You must be signed in to change notification settings - Fork 159
Group End
and Transition
properties into an Outcome
object
#706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
End
and Transition
properties into an Outcome
object
@cdavernas still WIP? |
End
and Transition
properties into an Outcome
objectEnd
and Transition
properties into an Outcome
object
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@ricardozanini Yes it it. I'm now waiting for #768 to be merged as I'd prefer to avoid having to cherry pick changes to the specification.md 😆 |
End
and Transition
properties into an Outcome
objectEnd
and Transition
properties into an Outcome
object
Outcome schema is incomplete as far as I can see.
Not sure, but I'm now thinking the second way makes more sense (unhappilly 😭). @ricardozanini @tsurdilo WDYT? |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
@ricardozanini @JBBianchi @fjtirado @ElanHasson The PR's stale, I'll reword it. In the meanwhile, what do you guys prefer?
outcome:
end:
terminate: true | false
produceEvents: {}
compensate: true | false
transition:
nextState: some-state-name
produceEvents: {}
compensate: true | false
outcome:
type: end | transition
produceEvents: {}
compensate: true | false
terminate: true | false #only if type `end`
nextState: some-state-name #only if type `transition` |
Furthermore, I'd like to take the opportunity to rename the transition:
to: my-next-state vs transition:
nextState: my-next-state |
My preference goes to the second option, merging everything into one outcome object. In that case, |
@cdavernas @JBBianchi
or
And you can add |
@fjtirado I love fluent/call to action terminology too, but we should then use it accross the whole state(s) concept (instead of What about? outcome:
transitionTo: my-state-name
compensate: true or outcome:
end: {} #we cannot use terminate here, because end also defines continueAs
compensate: true |
@cdavernas ok, lets use substantives ;)
or
At the end of the day, ending is transitioning to the end ;) |
@fjtirado What about flow:
to: my-state or flow:
end: {} I think we still need to address the proper definition of what is The reason I speak of this is because I believe that what states are is a foggy mix of I think this simple problem clearly shows some crack in the consistency of core "components" of the spec which we will need to address at some point anyways. Why not now? |
Yes, I think we should separate states from flow control. |
Yes, exactly! Something like:
Right? Where should we even start 😭 |
That should be done for a 0.10 version since it is a quite huge change that will break many things :D |
Hi, I'm ok with that change @cdavernas. I don't think it necessarily matters what it's called but My mental model is very different from the way the spec seems to be written. I view each state as a function with an input tuple of state (data) and the prior states output and an output tuple of flow control (function ptr), new state (data), and output (data). |
Many thanks for submitting your Pull Request ❤️!
Please specify parts of this PR update:
Discussion or Issue link:
#684
What this PR does / why we need it:
What?
Group End and Transition properties, in such way that we can address it as an (activity | state | workflow) outcome.
Why?
Because End and Transition properties are mutually exclusive, and implicitly defines the outcome of an (activity | state | workflow), it makes sense to call is as such. In addition, it simplifies processing of the whole definition, by checking that an outcome has been specified instead of having to do checks on multiple properties.
Special notes for reviewers:
Work In Progress. Will require thorough reviewing as this requires a ton of little changes in the specification.md, for instance.