Skip to content
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

Add singleNextStateUntypedInput #225

Merged
merged 1 commit into from
May 1, 2024
Merged

Add singleNextStateUntypedInput #225

merged 1 commit into from
May 1, 2024

Conversation

longquanzheng
Copy link
Contributor

No description provided.

@longquanzheng longquanzheng requested a review from lanespade April 29, 2024 21:40
* @param stateId required. StateId of next state
* @param stateInput optional, can be null. Input for next state
* @param stateOptionsOverride optional, can be null. It is used to override the defined one in the State class
* @return state decision
*/
public static <I> StateDecision singleNextState(final String stateId, final I stateInput, final WorkflowStateOptions stateOptionsOverride) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove because the generic type <I> here is useless

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is it useless? It allows strongly typing on the state input?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh this one is different -- the StateId is a string, not the state class. So there is no usage of restricting the input type(from the state class)

* @param stateId required
* @param stateInput optional, can be null
* @param stateOptionsOverride optional, can be null. It is used to override the defined one in the State class
* @return state movement
*/
public static <I> StateMovement create(final String stateId, final I stateInput, final WorkflowStateOptions stateOptionsOverride) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same. Remove because the generic type <I> here is useless

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How is it useless? It allows strongly typing on the state input?

Copy link
Contributor Author

@longquanzheng longquanzheng Apr 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above. the stateId is a string(as raw usage), not a state class

@longquanzheng longquanzheng merged commit a0e12b1 into main May 1, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants