cadence-java-client icon indicating copy to clipboard operation
cadence-java-client copied to clipboard

Update Java Client with new WorkflowOptions

Open Shaddoll opened this issue 1 month ago • 6 comments

The following parameters were introduced to StartWorkflowExecutionRequest.

  google.protobuf.Duration jitter_start = 17;
  google.protobuf.Timestamp first_run_at = 18;
  CronOverlapPolicy cron_overlap_policy = 19;
  ActiveClusterSelectionPolicy active_cluster_selection_policy = 20;

However, we don't have a way to set these options when starting workflows with Java Client. We should support these options. An example pull request for adding new options: https://github.com/cadence-workflow/cadence-java-client/pull/640

Shaddoll avatar Nov 14 '25 22:11 Shaddoll

@Shaddoll I am new to contributing to open-source projects and would love to get involved in this. I have a question regarding the implementation of the ActiveClusterSelectionPolicy and CronOverlapPolicy. Could you please explain what these policies are, how they should be defined, and Any guidance on how to approach defining these policies would be extremely helpful for my contribution.

HarshMehta112 avatar Nov 15 '25 05:11 HarshMehta112

Hi @HarshMehta112 ,

  • ActiveClusterSelectionPolicy is about a new feature that isn't released yet. In the near future domains will support "active-active" mode as opposed to "active-passive" today. ActiveClusterSelectionPolicy will allow users to define their active-active domain policy. More documentation will be released about this when the feature is done.
  • CronOverlapPolicy is about deciding what to do when the next cron schedule hits while the previous cron isn't done yet. This is also a new feature, and there are some more things we wanted to add. Documentation for this is also pending.

demirkayaender avatar Nov 17 '25 16:11 demirkayaender

Then I believe there’s no need to add these two parameters at the moment, right?

HarshMehta112 avatar Nov 17 '25 17:11 HarshMehta112

If you are asking if these options are "required" while starting workflows; no, you can ignore it. I think many options can be (need to be) empty.. If you were looking for issues to contribute, I can help you find another one as multiple people are looking at this one at the moment. If you are talking about why they need to be added, we need these parameters in our SDKs to have the feature.

demirkayaender avatar Nov 17 '25 19:11 demirkayaender

You can go ahead and assign this issue to someone else since I’m still new to contributing. Please let me know if there are any other issues that I might be able to help with—I’m happy to take on something more suitable.

HarshMehta112 avatar Nov 20 '25 09:11 HarshMehta112

Let me know if you are looking for beginner issues. I can help you with that! There's some work coming up in the cadence-samples repo. Please message me over the CNCF workspace, I will let you know when it's up.

demirkayaender avatar Nov 20 '25 16:11 demirkayaender