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

Jira/iwf 273 Add/fix javadocs for exception thrown #265

Merged
merged 3 commits into from
Nov 15, 2024
Merged

Conversation

longquanzheng
Copy link
Contributor

@longquanzheng longquanzheng commented Nov 14, 2024

Description

Checklist

  • Code compiles correctly
  • Tests for the changes have been added
  • All tests passing
  • This PR change is backwards-compatible
  • This PR CONTAINS a (planned) breaking change (it is NOT backwards-compatible)

Related Issue

Closes #<issue_number>

import io.iworkflow.core.ClientSideException;

/**
* A friendly named exception to indicate that the workflow does not exist
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@lwolczynski I want to remove the deprecated one becaue I believe no one is using it(should be the same for OSS users).
But I realized that we need this WorkflowNotExistsException as well as NoRunningWorkflowException, because in some cases either one makes sense.

For example, for signalWorkflow API, the exception is thrown because the workflow is not open, or not exists, so NoRunningWorkflowException makes sense, but not WorkflowNotExistsException.
For getDataAttribute API, the exception is only thrown when the workflow not exists, so NoRunningWorkflowException doesn't make sense.

Comment on lines +133 to +135
* If using WorkflowAlreadyStartedOptions in WorkflowOptions, the error will be ignored if ignoreAlreadyStartedError is true.
* If ignoreAlreadyStartedError is true and also requestId is set, the requestId will be used to identify the request. The error
* will only be thrown if the requestId is different from the requestId of the existing workflow.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

* @return the requestId that is used to start the child workflow from state method.
* Only applicable for state methods (waitUntil or execute)
*/
public abstract Optional<String> getChildWorkflowRequestId();
Copy link
Contributor Author

@longquanzheng longquanzheng Nov 14, 2024

Choose a reason for hiding this comment

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

cc @lwolczynski This is a helper for using the requestId feature in AlreadyStartedOption, so that it can hide some details there (see an internal link in iwf-samples)

@longquanzheng longquanzheng merged commit fc0d00e into main Nov 15, 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