Skip to content

Adding Support for Suspend / Resume Workflows #1405

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

Merged
merged 11 commits into from
Jun 11, 2025

Conversation

salaboy
Copy link
Collaborator

@salaboy salaboy commented Jun 6, 2025

Description

Adding support for suspend/resume workflows to the Java SDK.

Issue reference

We strive to have all PR being opened based on an issue, where the problem or feature have been discussed prior to implementation.

Please reference the issue this PR will close: #1402

Checklist

Please make sure you've completed the relevant tasks for this PR, out of the following list:

  • Code compiles correctly
  • Created/updated tests
  • Extended the documentation

@salaboy salaboy requested review from a team as code owners June 6, 2025 09:04
@salaboy salaboy force-pushed the 1402-suspend-resume branch 2 times, most recently from 1c96955 to c879104 Compare June 6, 2025 09:05
@salaboy
Copy link
Collaborator Author

salaboy commented Jun 6, 2025

While waiting for CI I am adding docs and examples, do not merge yet.

@salaboy salaboy marked this pull request as draft June 6, 2025 09:53
@salaboy salaboy force-pushed the 1402-suspend-resume branch 2 times, most recently from f285dc5 to 100e8b4 Compare June 6, 2025 12:19
@salaboy salaboy marked this pull request as ready for review June 6, 2025 12:19
siri-varma
siri-varma previously approved these changes Jun 7, 2025
Copy link
Contributor

@siri-varma siri-varma left a comment

Choose a reason for hiding this comment

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

LGTM. Thank you.

@salaboy
Copy link
Collaborator Author

salaboy commented Jun 9, 2025

all comments addressed @dapr/maintainers-java-sdk

@javier-aliaga
Copy link
Contributor

LGTM

@salaboy salaboy force-pushed the 1402-suspend-resume branch from b943f9b to 18cc693 Compare June 9, 2025 13:23
@salaboy salaboy force-pushed the 1402-suspend-resume branch from 18cc693 to 078bb0d Compare June 9, 2025 16:14
@salaboy salaboy force-pushed the 1402-suspend-resume branch 2 times, most recently from 5a03d1d to 3345b58 Compare June 10, 2025 06:34
Signed-off-by: salaboy <[email protected]>
@salaboy salaboy force-pushed the 1402-suspend-resume branch from 1a2f7bf to 646268d Compare June 10, 2025 06:54
@salaboy
Copy link
Collaborator Author

salaboy commented Jun 10, 2025

all green @dapr/maintainers-java-sdk

@cicoyle cicoyle merged commit dcaca77 into dapr:master Jun 11, 2025
11 of 12 checks passed
Copy link

codecov bot commented Jun 11, 2025

Codecov Report

Attention: Patch coverage is 95.23810% with 2 lines in your changes missing coverage. Please review.

Project coverage is 78.45%. Comparing base (d759c53) to head (77936d6).
Report is 167 commits behind head on master.

Files with missing lines Patch % Lines
...xamples/wfp/suspendresume/PerformTaskActivity.java 80.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #1405      +/-   ##
============================================
+ Coverage     76.91%   78.45%   +1.53%     
- Complexity     1592     1858     +266     
============================================
  Files           145      228      +83     
  Lines          4843     5760     +917     
  Branches        562      601      +39     
============================================
+ Hits           3725     4519     +794     
- Misses          821      921     +100     
- Partials        297      320      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

cicoyle added a commit to cicoyle/java-sdk that referenced this pull request Jun 11, 2025
* adding IT test

Signed-off-by: salaboy <[email protected]>

* adding initial version of suspend/resume example

Signed-off-by: salaboy <[email protected]>

* updating README

Signed-off-by: salaboy <[email protected]>

* Update README.md

Signed-off-by: salaboy <[email protected]>

* following Javi's suggestion

Signed-off-by: salaboy <[email protected]>

* fixing wrong year in headers

Signed-off-by: salaboy <[email protected]>

* fixing paths in one more README.md file

Signed-off-by: salaboy <[email protected]>

* adding output validation

Signed-off-by: salaboy <[email protected]>

* adding missing port

Signed-off-by: salaboy <[email protected]>

* fixing check conditions

Signed-off-by: salaboy <[email protected]>

---------

Signed-off-by: salaboy <[email protected]>
Co-authored-by: Cassie Coyle <[email protected]>
cicoyle added a commit that referenced this pull request Jun 11, 2025
* Compensation example for Workflows (#1333)

* add basic compensation example for wf

Signed-off-by: Cassandra Coyle <[email protected]>

* update commands to run + wf id

Signed-off-by: Cassandra Coyle <[email protected]>

* update readme + add mechanical markdown

Signed-off-by: Cassandra Coyle <[email protected]>

* fix import

Signed-off-by: Cassandra Coyle <[email protected]>

* fix mechanical markdown + add how to test it locally

Signed-off-by: Cassandra Coyle <[email protected]>

* move compensation example readme to workflows readme

Signed-off-by: Cassandra Coyle <[email protected]>

* Update BookCarActivity.java

Signed-off-by: artur-ciocanu <[email protected]>

* Update BookFlightActivity.java

Signed-off-by: artur-ciocanu <[email protected]>

* Update BookHotelActivity.java

Signed-off-by: artur-ciocanu <[email protected]>

* Update BookTripClient.java

Signed-off-by: artur-ciocanu <[email protected]>

* Update BookTripWorker.java

Signed-off-by: artur-ciocanu <[email protected]>

* Update BookTripWorkflow.java

Signed-off-by: artur-ciocanu <[email protected]>

* Update CancelCarActivity.java

Signed-off-by: artur-ciocanu <[email protected]>

* Update CancelFlightActivity.java

Signed-off-by: artur-ciocanu <[email protected]>

* Update CancelHotelActivity.java

Signed-off-by: artur-ciocanu <[email protected]>

* add retry IT tests and catch TaskFailedException

Signed-off-by: Cassandra Coyle <[email protected]>

* add test for no compensation if successful and assert attempts

Signed-off-by: Cassandra Coyle <[email protected]>

* update mechanical markdown

Signed-off-by: Cassandra Coyle <[email protected]>

* add back pubsub... but this should be removed long term

Signed-off-by: Cassandra Coyle <[email protected]>

* try adding waitforsidecar

Signed-off-by: Cassandra Coyle <[email protected]>

* rm tests from examples pr

Signed-off-by: Cassandra Coyle <[email protected]>

* reset unintended changes

Signed-off-by: Cassandra Coyle <[email protected]>

---------

Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: artur-ciocanu <[email protected]>
Co-authored-by: artur-ciocanu <[email protected]>

* Adding Support for Suspend / Resume Workflows (#1405)

* adding IT test

Signed-off-by: salaboy <[email protected]>

* adding initial version of suspend/resume example

Signed-off-by: salaboy <[email protected]>

* updating README

Signed-off-by: salaboy <[email protected]>

* Update README.md

Signed-off-by: salaboy <[email protected]>

* following Javi's suggestion

Signed-off-by: salaboy <[email protected]>

* fixing wrong year in headers

Signed-off-by: salaboy <[email protected]>

* fixing paths in one more README.md file

Signed-off-by: salaboy <[email protected]>

* adding output validation

Signed-off-by: salaboy <[email protected]>

* adding missing port

Signed-off-by: salaboy <[email protected]>

* fixing check conditions

Signed-off-by: salaboy <[email protected]>

---------

Signed-off-by: salaboy <[email protected]>
Co-authored-by: Cassie Coyle <[email protected]>

---------

Signed-off-by: Cassandra Coyle <[email protected]>
Signed-off-by: artur-ciocanu <[email protected]>
Signed-off-by: salaboy <[email protected]>
Co-authored-by: artur-ciocanu <[email protected]>
Co-authored-by: salaboy <[email protected]>
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.

Implement suspend/resume operations for workflows
4 participants