Skip to content

Add CronoverlapPolicy support to java client #1018

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

timl3136
Copy link
Member

@timl3136 timl3136 commented Aug 12, 2025

What changed?
Added cronOverlapPolicy field to support cron workflow overlap policies in:

  • WorkflowOptions - field with getter, setter, equals, hashCode, toString, merge
  • StartWorkflowExecutionParameters - field with CRUD operations and propagation
  • StartChildWorkflowExecutionParameters - field with CRUD operations
  • ChildWorkflowOptions - field with getter, setter, merge
  • SyncDecisionContext - updated to pass field to child workflow parameters

However, this feature is not yet working since idl related change is not merged (will be added in a later pr)

Why?
need to add corresponding logic for cronOverlapPolicy that is already implemented in server and go client

How did you test it?
unit tests

Potential risks

Release notes

Documentation Changes

@@ -86,6 +87,8 @@ public static final class Builder {

private String cronSchedule;

private int cronOverlapPolicy;
Copy link
Member

Choose a reason for hiding this comment

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

use thrift entity similar to WorkflowIdReusePolicy

@@ -56,6 +56,8 @@ public final class StartWorkflowExecutionParameters {

private Duration delayStart;

private int cronOverlapPolicy;
Copy link
Member

Choose a reason for hiding this comment

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

use thrift entity

@@ -51,6 +51,8 @@ public static final class Builder {

private String cronSchedule;

private int cronOverlapPolicy;
Copy link
Member

Choose a reason for hiding this comment

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

use thrift entity

@@ -64,6 +64,7 @@ public static WorkflowOptions merge(
.setRetryOptions(RetryOptions.merge(methodRetry, o.getRetryOptions()))
.setCronSchedule(OptionsUtils.merge(cronAnnotation, o.getCronSchedule(), String.class))
.setMemo(o.getMemo())
.setCronOverlapPolicy(o.cronOverlapPolicy)
Copy link
Member

Choose a reason for hiding this comment

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

use getter

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