• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

temporalio / sdk-java / #431

18 Nov 2026 09:28PM UTC coverage: 71.813% (+0.01%) from 71.8%
#431

push

github

web-flow
Include inherited fields in service stub options toString (#3152)

* Include inherited fields in service stub options toString

WorkflowServiceStubsOptions.toString rendered only the five fields
declared on the subclass, silently dropping every field inherited from
ServiceStubsOptions. Target, TLS settings, timeouts, and headers were
absent from the output, which is exactly the connection information
wanted when diagnosing a client from logs.

OperatorServiceStubsOptions and CloudServiceStubsOptions had no
toString at all and fell back to Object.toString, logging as an
unreadable identity hash.

Extract the field rendering on ServiceStubsOptions into a
package-private toStringFields helper and have each subclass inline it
alongside its own fields. The helper is package-private because all
four classes live in io.temporal.serviceclient, so this adds no public
API surface.

Also include apiKeyProvided, which already participates in equals and
hashCode but was omitted from toString. The API key itself is held by a
metadata provider and is still never rendered.

Fixes #2148.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Render header names instead of header values in toString

Metadata.toString renders header values in the clear. The previous
commit propagated the inherited headers field into
WorkflowServiceStubsOptions, OperatorServiceStubsOptions, and
CloudServiceStubsOptions, which would have newly exposed any credential
supplied through setHeaders, such as a static Authorization header.

Render the header names only. This keeps the diagnostic signal that
matters when reading the output, whether a header is configured and
which ones, without printing what they contain.

Also add a regression test for the missing separator before
congestionInitialInterval in RpcRetryOptions.toString.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* Add changelog entry for service stub options toString

Co-Authored-By: Claude Opus 5.5 <noreply@anthro... (continued)

8779 of 14371 branches covered (61.09%)

Branch coverage included in aggregate %.

5 of 6 new or added lines in 4 files covered. (83.33%)

892 existing lines in 36 files now uncovered.

34625 of 46069 relevant lines covered (75.16%)

0.75 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

75.76
/temporal-sdk/src/main/java/io/temporal/client/WorkflowClient.java
1
package io.temporal.client;
2

3
import io.temporal.activity.Activity;
4
import io.temporal.activity.ActivityExecutionContext;
5
import io.temporal.api.common.v1.WorkflowExecution;
6
import io.temporal.api.enums.v1.TaskReachability;
7
import io.temporal.api.history.v1.HistoryEvent;
8
import io.temporal.common.Experimental;
9
import io.temporal.common.WorkflowExecutionHistory;
10
import io.temporal.serviceclient.WorkflowServiceStubs;
11
import io.temporal.workflow.Functions;
12
import io.temporal.workflow.Functions.Func;
13
import io.temporal.workflow.Functions.Func1;
14
import io.temporal.workflow.Functions.Proc;
15
import io.temporal.workflow.Functions.Proc1;
16
import io.temporal.workflow.Functions.Proc2;
17
import io.temporal.workflow.Functions.Proc3;
18
import io.temporal.workflow.Functions.Proc4;
19
import io.temporal.workflow.Functions.Proc5;
20
import io.temporal.workflow.Functions.Proc6;
21
import io.temporal.workflow.WorkflowMethod;
22
import java.util.Optional;
23
import java.util.concurrent.CompletableFuture;
24
import java.util.stream.Stream;
25
import javax.annotation.Nonnull;
26
import javax.annotation.Nullable;
27

28
/**
29
 * Client to the Temporal service used to start and query workflows by external processes. Also, it
30
 * supports creation of {@link ActivityCompletionClient} instances used to complete activities
31
 * asynchronously. Do not create this object for each request, keep it for the duration of the
32
 * process.
33
 *
34
 * <p>Given a workflow interface executing a workflow requires initializing a {@link
35
 * io.temporal.client.WorkflowClient} instance, creating a client side stub to the workflow, and
36
 * then calling a method annotated with {@literal @}{@link WorkflowMethod}.
37
 *
38
 * <pre><code>
39
 * WorkflowClient workflowClient =  WorkflowClient.newInstance(service, clientOptions);
40
 * // Create a workflow stub.
41
 * FileProcessingWorkflow workflow = workflowClient.newWorkflowStub(FileProcessingWorkflow.class);
42
 * </code></pre>
43
 *
44
 * There are two ways to start workflow execution: synchronously and asynchronously. Synchronous
45
 * invocation starts a workflow and then waits for its completion. If the process that started the
46
 * workflow crashes or stops waiting, the workflow continues executing. Because workflows are
47
 * potentially long-running, and crashes of clients happen, it is not very commonly found in
48
 * production use. Asynchronous start initiates workflow execution and immediately returns to the
49
 * caller. This is the most common way to start workflows in production code.
50
 *
51
 * <p>Synchronous start:
52
 *
53
 * <pre><code>
54
 * // Start a workflow and wait for a result.
55
 * // Note that if the waiting process is killed, the workflow will continue executing.
56
 * String result = workflow.processFile(workflowArgs);
57
 * </code></pre>
58
 *
59
 * Asynchronous when the workflow result is not needed:
60
 *
61
 * <pre><code>
62
 * // Returns as soon as the workflow is scheduled to start on the server.
63
 * WorkflowExecution workflowExecution = WorkflowClient.start(workflow::processFile, workflowArgs);
64
 *
65
 * System.out.println("Started process file workflow with workflowId=\"" + workflowExecution.getWorkflowId()
66
 *                     + "\" and runId=\"" + workflowExecution.getRunId() + "\"");
67
 * </code></pre>
68
 *
69
 * Asynchronous when the result is needed:
70
 *
71
 * <pre><code>
72
 * // Returns a CompletableFuture&lt;String&gt; on the workflow result as soon as the workflow is scheduled to start on the server.
73
 * CompletableFuture&lt;String&gt; result = WorkflowClient.execute(workflow::helloWorld, "User");
74
 * </code></pre>
75
 *
76
 * If you need to wait for a workflow completion after an asynchronous start, maybe even from a
77
 * different process, the simplest way is to call the blocking version again. If {@link
78
 * WorkflowOptions#getWorkflowIdReusePolicy()} is not {@code AllowDuplicate} then instead of
79
 * throwing {@link WorkflowExecutionAlreadyStarted}, it reconnects to an existing workflow and waits
80
 * for its completion. The following example shows how to do this from a different process than the
81
 * one that started the workflow. All this process needs is a {@code WorkflowId}.
82
 *
83
 * <pre><code>
84
 * FileProcessingWorkflow workflow = workflowClient.newWorkflowStub(FileProcessingWorkflow.class, workflowId);
85
 * // Returns result potentially waiting for workflow to complete.
86
 * String result = workflow.processFile(workflowArgs);
87
 * </code></pre>
88
 *
89
 * @see io.temporal.workflow.Workflow
90
 * @see Activity
91
 * @see io.temporal.worker.Worker
92
 */
93
public interface WorkflowClient {
94

95
  /** Use this constant as a query type to get a workflow stack trace. */
96
  String QUERY_TYPE_STACK_TRACE = "__stack_trace";
97

98
  /** Use this constant as a query type to get the workflow metadata. */
99
  String QUERY_TYPE_WORKFLOW_METADATA = "__temporal_workflow_metadata";
100

101
  /** Replays workflow to the current state and returns empty result or error if replay failed. */
102
  String QUERY_TYPE_REPLAY_ONLY = "__replay_only";
103

104
  /**
105
   * Creates client that connects to an instance of the Temporal Service.
106
   *
107
   * @param service client to the Temporal Service endpoint.
108
   */
109
  static WorkflowClient newInstance(WorkflowServiceStubs service) {
110
    return WorkflowClientInternalImpl.newInstance(
1 ✔
111
        service, WorkflowClientOptions.getDefaultInstance());
1 ✔
112
  }
113

114
  /**
115
   * Creates client that connects to an instance of the Temporal Service.
116
   *
117
   * @param service client to the Temporal Service endpoint.
118
   * @param options Options (like {@link io.temporal.common.converter.DataConverter}er override) for
119
   *     configuring client.
120
   */
121
  static WorkflowClient newInstance(WorkflowServiceStubs service, WorkflowClientOptions options) {
122
    return WorkflowClientInternalImpl.newInstance(service, options);
1 ✔
123
  }
124

125
  WorkflowClientOptions getOptions();
126

127
  WorkflowServiceStubs getWorkflowServiceStubs();
128

129
  /**
130
   * Creates workflow client stub that can be used to start a single workflow execution. The first
131
   * call must be to a method annotated with @WorkflowMethod. After workflow is started it can be
132
   * also used to send signals or queries to it. IMPORTANT! Stub is per workflow instance. So new
133
   * stub should be created for each new one.
134
   *
135
   * @param workflowInterface interface that given workflow implements
136
   * @param options options that will be used to configure and start a new workflow. At least {@link
137
   *     WorkflowOptions.Builder#setTaskQueue(String)} needs to be specified.
138
   * @return Stub that implements workflowInterface and can be used to start workflow and signal or
139
   *     query it after the start.
140
   */
141
  <T> T newWorkflowStub(Class<T> workflowInterface, WorkflowOptions options);
142

143
  /**
144
   * Creates workflow client stub for a known execution. Use it to send signals or queries to a
145
   * running workflow. Do not call methods annotated with @WorkflowMethod.
146
   *
147
   * @param workflowInterface interface that given workflow implements.
148
   * @param workflowId Workflow id.
149
   * @return Stub that implements workflowInterface and can be used to signal or query it.
150
   */
151
  <T> T newWorkflowStub(Class<T> workflowInterface, String workflowId);
152

153
  /**
154
   * Creates workflow client stub for a known execution. Use it to send signals, updates, or queries
155
   * to a running workflow. Do not call methods annotated with @WorkflowMethod.
156
   *
157
   * @param workflowInterface interface that given workflow implements.
158
   * @param workflowId Workflow id.
159
   * @param runId Run id of the workflow execution.
160
   * @return Stub that implements workflowInterface and can be used to signal, update, or query it.
161
   * @deprecated Use {@link #newWorkflowStub(Class, WorkflowTargetOptions)} instead. This method is
162
   *     deprecated because the returned stub does not properly account for the runId.
163
   */
164
  @Deprecated
165
  <T> T newWorkflowStub(Class<T> workflowInterface, String workflowId, Optional<String> runId);
166

167
  /**
168
   * Creates workflow client stub for a known execution. Use it to send signals or queries to a
169
   * running workflow. Do not call methods annotated with @WorkflowMethod.
170
   *
171
   * @param workflowInterface interface that given workflow implements.
172
   * @param workflowTargetOptions options that specify target workflow execution.
173
   * @return Stub that implements workflowInterface and can be used to signal or query it.
174
   */
175
  <T> T newWorkflowStub(Class<T> workflowInterface, WorkflowTargetOptions workflowTargetOptions);
176

177
  /**
178
   * Creates workflow untyped client stub that can be used to start a single workflow execution. Use
179
   * it to send signals or queries to a running workflow. Do not call methods annotated
180
   * with @WorkflowMethod.
181
   *
182
   * @param workflowId Workflow id.
183
   * @return Stub that can be used to start workflow and later to signal or query it.
184
   */
185
  WorkflowStub newUntypedWorkflowStub(String workflowId);
186

187
  /**
188
   * Creates workflow untyped client stub that can be used to start a single workflow execution.
189
   * After workflow is started it can be also used to send signals or queries to it. IMPORTANT! Stub
190
   * is per workflow instance. So new stub should be created for each new one.
191
   *
192
   * @param workflowType name of the workflow type
193
   * @param options options used to start a workflow through returned stub
194
   * @return Stub that can be used to start workflow and later to signal or query it.
195
   */
196
  WorkflowStub newUntypedWorkflowStub(String workflowType, WorkflowOptions options);
197

198
  /**
199
   * Creates workflow untyped client stub for a known execution. Use it to send signals or queries
200
   * to a running workflow. Do not call methods annotated with @WorkflowMethod.
201
   *
202
   * @param workflowId workflow id and optional run id for execution
203
   * @param runId runId of the workflow execution. If not provided the last workflow with the given
204
   *     workflowId is assumed.
205
   * @param workflowType type of the workflow. Optional as it is used for error reporting only.
206
   * @return Stub that can be used to start workflow and later to signal or query it.
207
   * @deprecated Use {@link #newUntypedWorkflowStub(WorkflowTargetOptions, Optional)} instead. This
208
   *     method is deprecated because the returned stub does not properly account for the runId.
209
   */
210
  @Deprecated
211
  WorkflowStub newUntypedWorkflowStub(
212
      String workflowId, Optional<String> runId, Optional<String> workflowType);
213

214
  /**
215
   * Creates workflow untyped client stub for a known execution. Use it to send signals or queries
216
   * to a running workflow. Do not call methods annotated with @WorkflowMethod.
217
   *
218
   * @param execution workflow id and optional run id for execution
219
   * @param workflowType type of the workflow. Optional as it is used for error reporting only.
220
   * @return Stub that can be used to start workflow and later to signal or query it.
221
   * @deprecated Use {@link #newUntypedWorkflowStub(WorkflowTargetOptions, Optional)} instead. This
222
   *     method is deprecated because the returned stub does not properly account for the runId.
223
   */
224
  WorkflowStub newUntypedWorkflowStub(WorkflowExecution execution, Optional<String> workflowType);
225

226
  /**
227
   * Creates workflow untyped client stub for a known execution. Use it to send signals or queries
228
   * to a running workflow. Do not call methods annotated with @WorkflowMethod.
229
   *
230
   * @param workflowTargetOptions options that specify target workflow execution.
231
   * @return Stub that can be used to start workflow and later to signal or query it.
232
   */
233
  WorkflowStub newUntypedWorkflowStub(WorkflowTargetOptions workflowTargetOptions);
234

235
  /**
236
   * Creates workflow untyped client stub for a known execution. Use it to send signals or queries
237
   * to a running workflow. Do not call methods annotated with @WorkflowMethod.
238
   *
239
   * @param workflowTargetOptions options that specify target workflow execution.
240
   * @param workflowType type of the workflow. Optional as it is used for error reporting only.
241
   * @return Stub that can be used to start workflow and later to signal or query it.
242
   */
243
  WorkflowStub newUntypedWorkflowStub(
244
      WorkflowTargetOptions workflowTargetOptions, Optional<String> workflowType);
245

246
  /**
247
   * Creates new {@link ActivityCompletionClient} that can be used to complete activities
248
   * asynchronously. Only relevant for activity implementations that called {@link
249
   * ActivityExecutionContext#doNotCompleteOnReturn()}.
250
   *
251
   * <p>TODO: Activity completion options with retries and timeouts.
252
   */
253
  ActivityCompletionClient newActivityCompletionClient();
254

255
  /**
256
   * Creates BatchRequest that can be used to signal an existing workflow or start a new one if not
257
   * running. The batch before invocation must contain exactly two operations. One annotated
258
   * with @WorkflowMethod and another with @SignalMethod.
259
   *
260
   * @return batch request used to call {@link #signalWithStart(BatchRequest)}
261
   */
262
  BatchRequest newSignalWithStartRequest();
263

264
  /**
265
   * Invoke SignalWithStart operation.
266
   *
267
   * @param signalWithStartBatch Must be created with {@link #newSignalWithStartRequest()}
268
   * @return workflowId and runId of the signaled or started workflow.
269
   */
270
  WorkflowExecution signalWithStart(BatchRequest signalWithStartBatch);
271

272
  /**
273
   * A wrapper around {WorkflowServiceStub#listWorkflowExecutions(ListWorkflowExecutionsRequest)}
274
   *
275
   * @param query Temporal Visibility Query, for syntax see <a
276
   *     href="https://docs.temporal.io/visibility#list-filter">Visibility docs</a>
277
   * @return sequential stream that performs remote pagination under the hood
278
   */
279
  Stream<WorkflowExecutionMetadata> listExecutions(@Nullable String query);
280

281
  /**
282
   * Count workflow executions using the Visibility API.
283
   *
284
   * @param query Temporal Visibility query, for syntax see <a
285
   *     href="https://docs.temporal.io/visibility#list-filter">Visibility docs</a>
286
   * @return count result object
287
   */
288
  WorkflowExecutionCount countWorkflows(@Nullable String query);
289

290
  /**
291
   * Streams history events for a workflow execution for the provided {@code workflowId}.
292
   *
293
   * @param workflowId Workflow Id of the workflow to export the history for
294
   * @return stream of history events of the workflow with the specified Workflow Id.
295
   * @see #streamHistory(String, String) to get a history of a specific run.
296
   * @see #fetchHistory(String) for a user-friendly eager version of this method
297
   */
298
  Stream<HistoryEvent> streamHistory(@Nonnull String workflowId);
299

300
  /**
301
   * Streams history events for a workflow execution for the provided {@code workflowId} and {@code
302
   * runId}.
303
   *
304
   * @param workflowId Workflow Id of the workflow to export the history for
305
   * @param runId Fixed Run Id of the workflow to export the history for. If not provided, the
306
   *     latest run will be used. Optional, can be null.
307
   * @return stream of history events of the specified run of the workflow execution.
308
   * @see #streamHistory(String) to get a history of workflow excution by workflowId without
309
   *     providing a specific run.
310
   * @see #fetchHistory(String, String) for a user-friendly eagert version of this method
311
   */
312
  Stream<HistoryEvent> streamHistory(@Nonnull String workflowId, @Nullable String runId);
313

314
  /**
315
   * Downloads workflow execution history for the provided {@code workflowId}.
316
   *
317
   * @param workflowId Workflow Id of the workflow to export the history for
318
   * @return execution history of the workflow with the specified Workflow Id.
319
   * @see #fetchHistory(String, String) to get a history of a specific run.
320
   * @see #streamHistory(String) for a lazy memory-efficient version of this method
321
   */
322
  WorkflowExecutionHistory fetchHistory(@Nonnull String workflowId);
323

324
  /**
325
   * Downloads workflow execution history for the provided {@code workflowId} and {@code runId}.
326
   *
327
   * @param workflowId Workflow Id of the workflow to export the history for
328
   * @param runId Fixed Run Id of the workflow to export the history for. If not provided, the
329
   *     latest run will be used. Optional, can be null.
330
   * @return execution history of the specified run of the workflow execution.
331
   * @see #fetchHistory(String) to get a history of workflow excution by workflowId without
332
   *     providing a specific run.
333
   * @see #streamHistory(String, String) for a lazy memory-efficient version of this method
334
   */
335
  WorkflowExecutionHistory fetchHistory(@Nonnull String workflowId, @Nullable String runId);
336

337
  /**
338
   * Allows you to update the worker-build-id based version sets for a particular task queue. This
339
   * is used in conjunction with workers who specify their build id and thus opt into the feature.
340
   *
341
   * @param taskQueue The task queue to update the version set(s) of.
342
   * @param operation The operation to perform. See {@link BuildIdOperation} for more.
343
   * @throws WorkflowServiceException for any failures including networking and service availability
344
   *     issues.
345
   * @deprecated Worker Versioning is now deprecated please migrate to the <a
346
   *     href="https://docs.temporal.io/worker-deployments">Worker Deployment API</a>.
347
   */
348
  @Experimental
349
  @Deprecated
350
  void updateWorkerBuildIdCompatability(
351
      @Nonnull String taskQueue, @Nonnull BuildIdOperation operation);
352

353
  /**
354
   * Returns the worker-build-id based version sets for a particular task queue.
355
   *
356
   * @param taskQueue The task queue to fetch the version set(s) of.
357
   * @return The version set(s) for the task queue.
358
   * @throws WorkflowServiceException for any failures including networking and service availability
359
   *     issues.
360
   * @deprecated Worker Versioning is now deprecated please migrate to the <a
361
   *     href="https://docs.temporal.io/worker-deployments">Worker Deployment API</a>.
362
   */
363
  @Experimental
364
  @Deprecated
365
  WorkerBuildIdVersionSets getWorkerBuildIdCompatability(@Nonnull String taskQueue);
366

367
  /**
368
   * Determine if some Build IDs for certain Task Queues could have tasks dispatched to them.
369
   *
370
   * @param buildIds The Build IDs to query the reachability of. At least one must be specified.
371
   * @param taskQueues Task Queues to restrict the query to. If not specified, all Task Queues will
372
   *     be searched. When requesting a large number of task queues or all task queues associated
373
   *     with the given Build IDs in a namespace, all Task Queues will be listed in the response but
374
   *     some of them may not contain reachability information due to a server enforced limit.
375
   * @param reachability The kind of reachability this request is concerned with.
376
   * @return The reachability information.
377
   * @throws WorkflowServiceException for any failures including networking and service availability
378
   *     issues.
379
   * @deprecated Worker Versioning is now deprecated please migrate to the <a
380
   *     href="https://docs.temporal.io/worker-deployments">Worker Deployment API</a>.
381
   */
382
  @Experimental
383
  @Deprecated
384
  WorkerTaskReachability getWorkerTaskReachability(
385
      @Nonnull Iterable<String> buildIds,
386
      @Nonnull Iterable<String> taskQueues,
387
      TaskReachability reachability);
388

389
  /**
390
   * Executes zero argument workflow with void return type
391
   *
392
   * @param workflow The only supported value is method reference to a proxy created through {@link
393
   *     #newWorkflowStub(Class, WorkflowOptions)}.
394
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
395
   */
396
  static WorkflowExecution start(Functions.Proc workflow) {
397
    return WorkflowClientInternalImpl.start(workflow);
1 ✔
398
  }
399

400
  /**
401
   * Executes one argument workflow with void return type
402
   *
403
   * @param workflow The only supported value is method reference to a proxy created through {@link
404
   *     #newWorkflowStub(Class, WorkflowOptions)}.
405
   * @param arg1 first workflow function parameter
406
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
407
   */
408
  static <A1> WorkflowExecution start(Functions.Proc1<A1> workflow, A1 arg1) {
409
    return WorkflowClientInternalImpl.start(workflow, arg1);
1 ✔
410
  }
411

412
  /**
413
   * Executes two argument workflow with void return type
414
   *
415
   * @param workflow The only supported value is method reference to a proxy created through {@link
416
   *     #newWorkflowStub(Class, WorkflowOptions)}.
417
   * @param arg1 first workflow function parameter
418
   * @param arg2 second workflow function parameter
419
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
420
   */
421
  static <A1, A2> WorkflowExecution start(Functions.Proc2<A1, A2> workflow, A1 arg1, A2 arg2) {
422
    return WorkflowClientInternalImpl.start(workflow, arg1, arg2);
1 ✔
423
  }
424

425
  /**
426
   * Executes three argument workflow with void return type
427
   *
428
   * @param workflow The only supported value is method reference to a proxy created through {@link
429
   *     #newWorkflowStub(Class, WorkflowOptions)}.
430
   * @param arg1 first workflow function parameter
431
   * @param arg2 second workflow function parameter
432
   * @param arg3 third workflow function parameter
433
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
434
   */
435
  static <A1, A2, A3> WorkflowExecution start(
436
      Functions.Proc3<A1, A2, A3> workflow, A1 arg1, A2 arg2, A3 arg3) {
437
    return WorkflowClientInternalImpl.start(workflow, arg1, arg2, arg3);
1 ✔
438
  }
439

440
  /**
441
   * Executes four argument workflow with void return type
442
   *
443
   * @param workflow The only supported value is method reference to a proxy created through {@link
444
   *     #newWorkflowStub(Class, WorkflowOptions)}.
445
   * @param arg1 first workflow function parameter
446
   * @param arg2 second workflow function parameter
447
   * @param arg3 third workflow function parameter
448
   * @param arg4 fourth workflow function parameter
449
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
450
   */
451
  static <A1, A2, A3, A4> WorkflowExecution start(
452
      Functions.Proc4<A1, A2, A3, A4> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4) {
453
    return WorkflowClientInternalImpl.start(workflow, arg1, arg2, arg3, arg4);
1 ✔
454
  }
455

456
  /**
457
   * Executes five argument workflow with void return type
458
   *
459
   * @param workflow The only supported value is method reference to a proxy created through {@link
460
   *     #newWorkflowStub(Class, WorkflowOptions)}.
461
   * @param arg1 first workflow function parameter
462
   * @param arg2 second workflow function parameter
463
   * @param arg3 third workflow function parameter
464
   * @param arg4 fourth workflow function parameter
465
   * @param arg5 fifth workflow function parameter
466
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
467
   */
468
  static <A1, A2, A3, A4, A5> WorkflowExecution start(
469
      Functions.Proc5<A1, A2, A3, A4, A5> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5) {
470
    return WorkflowClientInternalImpl.start(workflow, arg1, arg2, arg3, arg4, arg5);
1 ✔
471
  }
472

473
  /**
474
   * Executes six argument workflow with void return type
475
   *
476
   * @param workflow The only supported value is method reference to a proxy created through {@link
477
   *     #newWorkflowStub(Class, WorkflowOptions)}.
478
   * @param arg1 first workflow function parameter
479
   * @param arg2 second workflow function parameter
480
   * @param arg3 third workflow function parameter
481
   * @param arg4 fourth workflow function parameter
482
   * @param arg5 fifth workflow function parameter
483
   * @param arg6 sixth workflow function parameter
484
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
485
   */
486
  static <A1, A2, A3, A4, A5, A6> WorkflowExecution start(
487
      Functions.Proc6<A1, A2, A3, A4, A5, A6> workflow,
488
      A1 arg1,
489
      A2 arg2,
490
      A3 arg3,
491
      A4 arg4,
492
      A5 arg5,
493
      A6 arg6) {
494
    return WorkflowClientInternalImpl.start(workflow, arg1, arg2, arg3, arg4, arg5, arg6);
1 ✔
495
  }
496

497
  /**
498
   * Executes zero argument workflow.
499
   *
500
   * @param workflow The only supported value is method reference to a proxy created through {@link
501
   *     #newWorkflowStub(Class, WorkflowOptions)}.
502
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
503
   */
504
  static <R> WorkflowExecution start(Functions.Func<R> workflow) {
505
    return WorkflowClientInternalImpl.start(workflow);
1 ✔
506
  }
507

508
  /**
509
   * Executes one argument workflow asynchronously.
510
   *
511
   * @param workflow The only supported value is method reference to a proxy created through {@link
512
   *     #newWorkflowStub(Class, WorkflowOptions)}.
513
   * @param arg1 first workflow argument
514
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
515
   */
516
  static <A1, R> WorkflowExecution start(Functions.Func1<A1, R> workflow, A1 arg1) {
517
    return WorkflowClientInternalImpl.start(workflow, arg1);
1 ✔
518
  }
519

520
  /**
521
   * Executes two argument workflow asynchronously.
522
   *
523
   * @param workflow The only supported value is method reference to a proxy created through {@link
524
   *     #newWorkflowStub(Class, WorkflowOptions)}.
525
   * @param arg1 first workflow function parameter
526
   * @param arg2 second workflow function parameter
527
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
528
   */
529
  static <A1, A2, R> WorkflowExecution start(
530
      Functions.Func2<A1, A2, R> workflow, A1 arg1, A2 arg2) {
531
    return WorkflowClientInternalImpl.start(workflow, arg1, arg2);
1 ✔
532
  }
533

534
  /**
535
   * Executes three argument workflow asynchronously.
536
   *
537
   * @param workflow The only supported value is method reference to a proxy created through {@link
538
   *     #newWorkflowStub(Class, WorkflowOptions)}.
539
   * @param arg1 first workflow function parameter
540
   * @param arg2 second workflow function parameter
541
   * @param arg3 third workflow function parameter
542
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
543
   */
544
  static <A1, A2, A3, R> WorkflowExecution start(
545
      Functions.Func3<A1, A2, A3, R> workflow, A1 arg1, A2 arg2, A3 arg3) {
546
    return WorkflowClientInternalImpl.start(workflow, arg1, arg2, arg3);
1 ✔
547
  }
548

549
  /**
550
   * Executes four argument workflow asynchronously.
551
   *
552
   * @param workflow The only supported value is method reference to a proxy created through {@link
553
   *     #newWorkflowStub(Class, WorkflowOptions)}.
554
   * @param arg1 first workflow function parameter
555
   * @param arg2 second workflow function parameter
556
   * @param arg3 third workflow function parameter
557
   * @param arg4 fourth workflow function parameter
558
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
559
   */
560
  static <A1, A2, A3, A4, R> WorkflowExecution start(
561
      Functions.Func4<A1, A2, A3, A4, R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4) {
562
    return WorkflowClientInternalImpl.start(workflow, arg1, arg2, arg3, arg4);
1 ✔
563
  }
564

565
  /**
566
   * Executes five argument workflow asynchronously.
567
   *
568
   * @param workflow The only supported value is method reference to a proxy created through {@link
569
   *     #newWorkflowStub(Class, WorkflowOptions)}.
570
   * @param arg1 first workflow function parameter
571
   * @param arg2 second workflow function parameter
572
   * @param arg3 third workflow function parameter
573
   * @param arg4 fourth workflow function parameter
574
   * @param arg5 fifth workflow function parameter
575
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
576
   */
577
  static <A1, A2, A3, A4, A5, R> WorkflowExecution start(
578
      Functions.Func5<A1, A2, A3, A4, A5, R> workflow,
579
      A1 arg1,
580
      A2 arg2,
581
      A3 arg3,
582
      A4 arg4,
583
      A5 arg5) {
584
    return WorkflowClientInternalImpl.start(workflow, arg1, arg2, arg3, arg4, arg5);
1 ✔
585
  }
586

587
  /**
588
   * Executes six argument workflow asynchronously.
589
   *
590
   * @param workflow The only supported value is method reference to a proxy created through {@link
591
   *     #newWorkflowStub(Class, WorkflowOptions)}.
592
   * @param arg1 first workflow argument
593
   * @param arg2 second workflow function parameter
594
   * @param arg3 third workflow function parameter
595
   * @param arg4 fourth workflow function parameter
596
   * @param arg5 fifth workflow function parameter
597
   * @param arg6 sixth workflow function parameter
598
   * @return WorkflowExecution that contains WorkflowId and RunId of the started workflow.
599
   */
600
  static <A1, A2, A3, A4, A5, A6, R> WorkflowExecution start(
601
      Functions.Func6<A1, A2, A3, A4, A5, A6, R> workflow,
602
      A1 arg1,
603
      A2 arg2,
604
      A3 arg3,
605
      A4 arg4,
606
      A5 arg5,
607
      A6 arg6) {
608
    return WorkflowClientInternalImpl.start(workflow, arg1, arg2, arg3, arg4, arg5, arg6);
1 ✔
609
  }
610

611
  /**
612
   * Start a zero argument workflow update with a void return type
613
   *
614
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
615
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
616
   * @param options update options
617
   * @return WorkflowUpdateHandle that can be used to get the result of the update
618
   */
619
  static WorkflowUpdateHandle<Void> startUpdate(
620
      Functions.Proc updateMethod, @Nonnull UpdateOptions<Void> options) {
621
    return WorkflowClientInternalImpl.startUpdate(updateMethod, options);
1 ✔
622
  }
623

624
  /**
625
   * Start a one argument workflow update with a void return type
626
   *
627
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
628
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
629
   * @param arg1 first update method parameter
630
   * @param options update options
631
   * @return WorkflowUpdateHandle that can be used to get the result of the update
632
   */
633
  static <A1> WorkflowUpdateHandle<Void> startUpdate(
634
      Functions.Proc1<A1> updateMethod, A1 arg1, @Nonnull UpdateOptions<Void> options) {
635
    return WorkflowClientInternalImpl.startUpdate(updateMethod, arg1, options);
1 ✔
636
  }
637

638
  /**
639
   * Start a two argument workflow update with a void return type
640
   *
641
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
642
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
643
   * @param arg1 first update method parameter
644
   * @param arg2 second update method parameter
645
   * @param options update options
646
   * @return WorkflowUpdateHandle that can be used to get the result of the update
647
   */
648
  static <A1, A2> WorkflowUpdateHandle<Void> startUpdate(
649
      Functions.Proc2<A1, A2> updateMethod,
650
      A1 arg1,
651
      A2 arg2,
652
      @Nonnull UpdateOptions<Void> options) {
653
    return WorkflowClientInternalImpl.startUpdate(updateMethod, arg1, arg2, options);
1 ✔
654
  }
655

656
  /**
657
   * Start a three argument workflow update with a void return type
658
   *
659
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
660
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
661
   * @param arg1 first update method parameter
662
   * @param arg2 second update method parameter
663
   * @param arg3 third update method parameter
664
   * @param options update options
665
   * @return WorkflowUpdateHandle that can be used to get the result of the update
666
   */
667
  static <A1, A2, A3> WorkflowUpdateHandle<Void> startUpdate(
668
      Functions.Proc3<A1, A2, A3> updateMethod,
669
      A1 arg1,
670
      A2 arg2,
671
      A3 arg3,
672
      @Nonnull UpdateOptions<Void> options) {
673
    return WorkflowClientInternalImpl.startUpdate(updateMethod, arg1, arg2, arg3, options);
1 ✔
674
  }
675

676
  /**
677
   * Start a four argument workflow update with a void return type
678
   *
679
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
680
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
681
   * @param arg1 first update method parameter
682
   * @param arg2 second update method parameter
683
   * @param arg3 third update method parameter
684
   * @param arg4 fourth update method parameter
685
   * @param options update options
686
   * @return WorkflowUpdateHandle that can be used to get the result of the update
687
   */
688
  static <A1, A2, A3, A4> WorkflowUpdateHandle<Void> startUpdate(
689
      Functions.Proc4<A1, A2, A3, A4> updateMethod,
690
      A1 arg1,
691
      A2 arg2,
692
      A3 arg3,
693
      A4 arg4,
694
      @Nonnull UpdateOptions<Void> options) {
695
    return WorkflowClientInternalImpl.startUpdate(updateMethod, arg1, arg2, arg3, arg4, options);
1 ✔
696
  }
697

698
  /**
699
   * Start a five argument workflow update with a void return type
700
   *
701
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
702
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
703
   * @param arg1 first update method parameter
704
   * @param arg2 second update method parameter
705
   * @param arg3 third update method parameter
706
   * @param arg4 fourth update method parameter
707
   * @param arg5 fifth update method parameter
708
   * @param options update options
709
   * @return WorkflowUpdateHandle that can be used to get the result of the update
710
   */
711
  static <A1, A2, A3, A4, A5> WorkflowUpdateHandle<Void> startUpdate(
712
      Functions.Proc5<A1, A2, A3, A4, A5> updateMethod,
713
      A1 arg1,
714
      A2 arg2,
715
      A3 arg3,
716
      A4 arg4,
717
      A5 arg5,
718
      @Nonnull UpdateOptions<Void> options) {
719
    return WorkflowClientInternalImpl.startUpdate(
1 ✔
720
        updateMethod, arg1, arg2, arg3, arg4, arg5, options);
721
  }
722

723
  /**
724
   * Start a six argument workflow update with a void return type
725
   *
726
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
727
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
728
   * @param arg1 first update method parameter
729
   * @param arg2 second update method parameter
730
   * @param arg3 third update method parameter
731
   * @param arg4 fourth update method parameter
732
   * @param arg5 fifth update method parameter
733
   * @param arg6 sixth update method parameter
734
   * @param options update options
735
   * @return WorkflowUpdateHandle that can be used to get the result of the update
736
   */
737
  static <A1, A2, A3, A4, A5, A6> WorkflowUpdateHandle<Void> startUpdate(
738
      Functions.Proc6<A1, A2, A3, A4, A5, A6> updateMethod,
739
      A1 arg1,
740
      A2 arg2,
741
      A3 arg3,
742
      A4 arg4,
743
      A5 arg5,
744
      A6 arg6,
745
      @Nonnull UpdateOptions<Void> options) {
746
    return WorkflowClientInternalImpl.startUpdate(
1 ✔
747
        updateMethod, arg1, arg2, arg3, arg4, arg5, arg6, options);
748
  }
749

750
  /**
751
   * Start a zero argument update workflow request.
752
   *
753
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
754
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
755
   * @param options update options
756
   * @return WorkflowUpdateHandle that can be used to get the result of the update
757
   */
758
  static <R> WorkflowUpdateHandle<R> startUpdate(
759
      Functions.Func<R> updateMethod, @Nonnull UpdateOptions<R> options) {
760
    return WorkflowClientInternalImpl.startUpdate(updateMethod, options);
1 ✔
761
  }
762

763
  /**
764
   * Start a one argument update workflow request.
765
   *
766
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
767
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
768
   * @param arg1 first update method parameter
769
   * @param options update options
770
   * @return WorkflowUpdateHandle that can be used to get the result of the update
771
   */
772
  static <R, A1> WorkflowUpdateHandle<R> startUpdate(
773
      Functions.Func1<A1, R> updateMethod, A1 arg1, @Nonnull UpdateOptions<R> options) {
774
    return WorkflowClientInternalImpl.startUpdate(updateMethod, arg1, options);
1 ✔
775
  }
776

777
  /**
778
   * Start a two argument update workflow request.
779
   *
780
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
781
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
782
   * @param arg1 first update method parameter
783
   * @param arg2 second update method parameter
784
   * @param options update options
785
   * @return WorkflowUpdateHandle that can be used to get the result of the update
786
   */
787
  static <R, A1, A2> WorkflowUpdateHandle<R> startUpdate(
788
      Functions.Func2<A1, A2, R> updateMethod,
789
      A1 arg1,
790
      A2 arg2,
791
      @Nonnull UpdateOptions<R> options) {
792
    return WorkflowClientInternalImpl.startUpdate(updateMethod, arg1, arg2, options);
1 ✔
793
  }
794

795
  /**
796
   * Start a three argument update workflow request.
797
   *
798
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
799
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
800
   * @param arg1 first update method parameter
801
   * @param arg2 second update method parameter
802
   * @param arg3 third update method parameter
803
   * @param options update options
804
   * @return WorkflowUpdateHandle that can be used to get the result of the update
805
   */
806
  static <R, A1, A2, A3> WorkflowUpdateHandle<R> startUpdate(
807
      Functions.Func3<A1, A2, A3, R> updateMethod,
808
      A1 arg1,
809
      A2 arg2,
810
      A3 arg3,
811
      @Nonnull UpdateOptions<R> options) {
812
    return WorkflowClientInternalImpl.startUpdate(updateMethod, arg1, arg2, arg3, options);
1 ✔
813
  }
814

815
  /**
816
   * Start a four argument update workflow request.
817
   *
818
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
819
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
820
   * @param arg1 first update method parameter
821
   * @param arg2 second update method parameter
822
   * @param arg3 third update method parameter
823
   * @param arg4 fourth update method parameter
824
   * @param options update options
825
   * @return WorkflowUpdateHandle that can be used to get the result of the update
826
   */
827
  static <R, A1, A2, A3, A4> WorkflowUpdateHandle<R> startUpdate(
828
      Functions.Func4<A1, A2, A3, A4, R> updateMethod,
829
      A1 arg1,
830
      A2 arg2,
831
      A3 arg3,
832
      A4 arg4,
833
      @Nonnull UpdateOptions<R> options) {
834
    return WorkflowClientInternalImpl.startUpdate(updateMethod, arg1, arg2, arg3, arg4, options);
1 ✔
835
  }
836

837
  /**
838
   * Start a five argument update workflow request.
839
   *
840
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
841
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
842
   * @param arg1 first update method parameter
843
   * @param arg2 second update method parameter
844
   * @param arg3 third update method parameter
845
   * @param arg4 fourth update method parameter
846
   * @param arg5 firth update method parameter
847
   * @param options update options
848
   * @return WorkflowUpdateHandle that can be used to get the result of the update
849
   */
850
  static <R, A1, A2, A3, A4, A5> WorkflowUpdateHandle<R> startUpdate(
851
      Functions.Func5<A1, A2, A3, A4, A5, R> updateMethod,
852
      A1 arg1,
853
      A2 arg2,
854
      A3 arg3,
855
      A4 arg4,
856
      A5 arg5,
857
      @Nonnull UpdateOptions<R> options) {
858
    return WorkflowClientInternalImpl.startUpdate(
1 ✔
859
        updateMethod, arg1, arg2, arg3, arg4, arg5, options);
860
  }
861

862
  /**
863
   * Start a six argument update workflow request.
864
   *
865
   * @param updateMethod method reference annotated with @UpdateMethod of a proxy created through
866
   *     {@link WorkflowClient#newWorkflowStub(Class, WorkflowOptions)}.
867
   * @param arg1 first update method parameter
868
   * @param arg2 second update method parameter
869
   * @param arg3 third update method parameter
870
   * @param arg4 fourth update method parameter
871
   * @param arg5 firth update method parameter
872
   * @param arg6 sixth update method parameter
873
   * @param options update options
874
   * @return WorkflowUpdateHandle that can be used to get the result of the update
875
   */
876
  static <R, A1, A2, A3, A4, A5, A6> WorkflowUpdateHandle<R> startUpdate(
877
      Functions.Func6<A1, A2, A3, A4, A5, A6, R> updateMethod,
878
      A1 arg1,
879
      A2 arg2,
880
      A3 arg3,
881
      A4 arg4,
882
      A5 arg5,
883
      A6 arg6,
884
      @Nonnull UpdateOptions<R> options) {
885
    return WorkflowClientInternalImpl.startUpdate(
1 ✔
886
        updateMethod, arg1, arg2, arg3, arg4, arg5, arg6, options);
887
  }
888

889
  /**
890
   * Start a zero argument update workflow request, along with a workflow start request.
891
   *
892
   * @param updateMethod The only supported value is method reference to a proxy created through
893
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
894
   * @param startOperation start workflow operation
895
   * @return WorkflowUpdateHandle that can be used to get the result of the update
896
   */
897
  static <R> WorkflowUpdateHandle<R> startUpdateWithStart(
898
      Proc updateMethod,
899
      @Nonnull UpdateOptions<R> options,
900
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
UNCOV
901
    return WorkflowClientInternalImpl.startUpdateWithStart(updateMethod, options, startOperation);
×
902
  }
903

904
  /**
905
   * Start a one argument update workflow request, along with a workflow start request.
906
   *
907
   * @param updateMethod The only supported value is method reference to a proxy created through
908
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
909
   * @param arg1 first update function parameter
910
   * @param startOperation start workflow operation
911
   * @return WorkflowUpdateHandle that can be used to get the result of the update
912
   */
913
  static <R, A1> WorkflowUpdateHandle<R> startUpdateWithStart(
914
      Proc1<A1> updateMethod,
915
      A1 arg1,
916
      @Nonnull UpdateOptions<R> options,
917
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
918
    return WorkflowClientInternalImpl.startUpdateWithStart(
1 ✔
919
        () -> updateMethod.apply(arg1), options, startOperation);
1 ✔
920
  }
921

922
  /**
923
   * Start a two argument update workflow request, along with a workflow start request.
924
   *
925
   * @param updateMethod The only supported value is method reference to a proxy created through
926
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
927
   * @param arg1 first update function parameter
928
   * @param arg2 second update function parameter
929
   * @param startOperation start workflow operation
930
   * @return WorkflowUpdateHandle that can be used to get the result of the update
931
   */
932
  static <R, A1, A2> WorkflowUpdateHandle<R> startUpdateWithStart(
933
      Proc2<A1, A2> updateMethod,
934
      A1 arg1,
935
      A2 arg2,
936
      @Nonnull UpdateOptions<R> options,
937
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
UNCOV
938
    return WorkflowClientInternalImpl.startUpdateWithStart(
×
UNCOV
939
        () -> updateMethod.apply(arg1, arg2), options, startOperation);
×
940
  }
941

942
  /**
943
   * Start a three argument update workflow request, along with a workflow start request.
944
   *
945
   * @param updateMethod The only supported value is method reference to a proxy created through
946
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
947
   * @param arg1 first update function parameter
948
   * @param arg2 second update function parameter
949
   * @param arg3 third update function parameter
950
   * @param startOperation start workflow operation
951
   * @return WorkflowUpdateHandle that can be used to get the result of the update
952
   */
953
  static <R, A1, A2, A3> WorkflowUpdateHandle<R> startUpdateWithStart(
954
      Proc3<A1, A2, A3> updateMethod,
955
      A1 arg1,
956
      A2 arg2,
957
      A3 arg3,
958
      @Nonnull UpdateOptions<R> options,
959
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
UNCOV
960
    return WorkflowClientInternalImpl.startUpdateWithStart(
×
UNCOV
961
        () -> updateMethod.apply(arg1, arg2, arg3), options, startOperation);
×
962
  }
963

964
  /**
965
   * Start a four argument update workflow request, along with a workflow start request.
966
   *
967
   * @param updateMethod The only supported value is method reference to a proxy created through
968
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
969
   * @param arg1 first update function parameter
970
   * @param arg2 second update function parameter
971
   * @param arg3 third update function parameter
972
   * @param arg4 fourth update function parameter
973
   * @param startOperation start workflow operation
974
   * @return WorkflowUpdateHandle that can be used to get the result of the update
975
   */
976
  static <R, A1, A2, A3, A4> WorkflowUpdateHandle<R> startUpdateWithStart(
977
      Proc4<A1, A2, A3, A4> updateMethod,
978
      A1 arg1,
979
      A2 arg2,
980
      A3 arg3,
981
      A4 arg4,
982
      @Nonnull UpdateOptions<R> options,
983
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
UNCOV
984
    return WorkflowClientInternalImpl.startUpdateWithStart(
×
UNCOV
985
        () -> updateMethod.apply(arg1, arg2, arg3, arg4), options, startOperation);
×
986
  }
987

988
  /**
989
   * Start a five argument update workflow request, along with a workflow start request.
990
   *
991
   * @param updateMethod The only supported value is method reference to a proxy created through
992
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
993
   * @param arg1 first update function parameter
994
   * @param arg2 second update function parameter
995
   * @param arg3 third update function parameter
996
   * @param arg4 fourth update function parameter
997
   * @param arg5 fifth update function parameter
998
   * @param startOperation start workflow operation
999
   * @return WorkflowUpdateHandle that can be used to get the result of the update
1000
   */
1001
  static <R, A1, A2, A3, A4, A5> WorkflowUpdateHandle<R> startUpdateWithStart(
1002
      Proc5<A1, A2, A3, A4, A5> updateMethod,
1003
      A1 arg1,
1004
      A2 arg2,
1005
      A3 arg3,
1006
      A4 arg4,
1007
      A5 arg5,
1008
      @Nonnull UpdateOptions<R> options,
1009
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
UNCOV
1010
    return WorkflowClientInternalImpl.startUpdateWithStart(
×
UNCOV
1011
        () -> updateMethod.apply(arg1, arg2, arg3, arg4, arg5), options, startOperation);
×
1012
  }
1013

1014
  /**
1015
   * Start a six argument update workflow request, along with a workflow start request.
1016
   *
1017
   * @param updateMethod The only supported value is method reference to a proxy created through
1018
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1019
   * @param arg1 first update function parameter
1020
   * @param arg2 second update function parameter
1021
   * @param arg3 third update function parameter
1022
   * @param arg4 fourth update function parameter
1023
   * @param arg5 fifth update function parameter
1024
   * @param arg6 sixth update function parameter
1025
   * @param startOperation start workflow operation
1026
   * @return WorkflowUpdateHandle that can be used to get the result of the update
1027
   */
1028
  static <R, A1, A2, A3, A4, A5, A6> WorkflowUpdateHandle<R> startUpdateWithStart(
1029
      Proc6<A1, A2, A3, A4, A5, A6> updateMethod,
1030
      A1 arg1,
1031
      A2 arg2,
1032
      A3 arg3,
1033
      A4 arg4,
1034
      A5 arg5,
1035
      A6 arg6,
1036
      @Nonnull UpdateOptions<R> options,
1037
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
UNCOV
1038
    return WorkflowClientInternalImpl.startUpdateWithStart(
×
UNCOV
1039
        () -> updateMethod.apply(arg1, arg2, arg3, arg4, arg5, arg6), options, startOperation);
×
1040
  }
1041

1042
  /**
1043
   * Start a zero argument update workflow request, along with a workflow start request.
1044
   *
1045
   * @param updateMethod The only supported value is method reference to a proxy created through
1046
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1047
   * @param startOperation start workflow operation
1048
   * @return WorkflowUpdateHandle that can be used to get the result of the update
1049
   */
1050
  static <R> WorkflowUpdateHandle<R> startUpdateWithStart(
1051
      Func<R> updateMethod,
1052
      @Nonnull UpdateOptions<R> options,
1053
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1054
    return WorkflowClientInternalImpl.startUpdateWithStart(
1 ✔
1055
        updateMethod::apply, options, startOperation);
1 ✔
1056
  }
1057

1058
  /**
1059
   * Start a one argument update workflow request, along with a workflow start request.
1060
   *
1061
   * @param updateMethod The only supported value is method reference to a proxy created through
1062
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1063
   * @param arg1 first workflow argument
1064
   * @param startOperation start workflow operation
1065
   * @return WorkflowUpdateHandle that can be used to get the result of the update
1066
   */
1067
  static <A1, R> WorkflowUpdateHandle<R> startUpdateWithStart(
1068
      Func1<A1, R> updateMethod,
1069
      A1 arg1,
1070
      @Nonnull UpdateOptions<R> options,
1071
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1072
    return WorkflowClientInternalImpl.startUpdateWithStart(
1 ✔
1073
        () -> updateMethod.apply(arg1), options, startOperation);
1 ✔
1074
  }
1075

1076
  /**
1077
   * Start a two argument update workflow request, along with a workflow start request.
1078
   *
1079
   * @param updateMethod The only supported value is method reference to a proxy created through
1080
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1081
   * @param arg1 first update function parameter
1082
   * @param arg2 second update function parameter
1083
   * @param startOperation start workflow operation
1084
   * @return WorkflowUpdateHandle that can be used to get the result of the update
1085
   */
1086
  static <A1, A2, R> WorkflowUpdateHandle<R> startUpdateWithStart(
1087
      Functions.Func2<A1, A2, R> updateMethod,
1088
      A1 arg1,
1089
      A2 arg2,
1090
      @Nonnull UpdateOptions<R> options,
1091
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1092
    return WorkflowClientInternalImpl.startUpdateWithStart(
1 ✔
1093
        () -> updateMethod.apply(arg1, arg2), options, startOperation);
1 ✔
1094
  }
1095

1096
  /**
1097
   * Start a three argument update workflow request, along with a workflow start request.
1098
   *
1099
   * @param updateMethod The only supported value is method reference to a proxy created through
1100
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1101
   * @param arg1 first update function parameter
1102
   * @param arg2 second update function parameter
1103
   * @param arg3 third update function parameter
1104
   * @param startOperation start workflow operation
1105
   * @return WorkflowUpdateHandle that can be used to get the result of the update
1106
   */
1107
  static <A1, A2, A3, R> WorkflowUpdateHandle<R> startUpdateWithStart(
1108
      Functions.Func3<A1, A2, A3, R> updateMethod,
1109
      A1 arg1,
1110
      A2 arg2,
1111
      A3 arg3,
1112
      @Nonnull UpdateOptions<R> options,
1113
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1114
    return WorkflowClientInternalImpl.startUpdateWithStart(
1 ✔
1115
        () -> updateMethod.apply(arg1, arg2, arg3), options, startOperation);
1 ✔
1116
  }
1117

1118
  /**
1119
   * Start a four argument update workflow request, along with a workflow start request.
1120
   *
1121
   * @param updateMethod The only supported value is method reference to a proxy created through
1122
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1123
   * @param arg1 first update function parameter
1124
   * @param arg2 second update function parameter
1125
   * @param arg3 third update function parameter
1126
   * @param arg4 fourth update function parameter
1127
   * @param startOperation start workflow operation
1128
   * @return WorkflowUpdateHandle that can be used to get the result of the update
1129
   */
1130
  static <A1, A2, A3, A4, R> WorkflowUpdateHandle<R> startUpdateWithStart(
1131
      Functions.Func4<A1, A2, A3, A4, R> updateMethod,
1132
      A1 arg1,
1133
      A2 arg2,
1134
      A3 arg3,
1135
      A4 arg4,
1136
      @Nonnull UpdateOptions<R> options,
1137
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1138
    return WorkflowClientInternalImpl.startUpdateWithStart(
1 ✔
1139
        () -> updateMethod.apply(arg1, arg2, arg3, arg4), options, startOperation);
1 ✔
1140
  }
1141

1142
  /**
1143
   * Start a five argument update workflow request, along with a workflow start request.
1144
   *
1145
   * @param updateMethod The only supported value is method reference to a proxy created through
1146
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1147
   * @param arg1 first update function parameter
1148
   * @param arg2 second update function parameter
1149
   * @param arg3 third update function parameter
1150
   * @param arg4 fourth update function parameter
1151
   * @param arg5 fifth update function parameter
1152
   * @param startOperation start workflow operation
1153
   * @return WorkflowUpdateHandle that can be used to get the result of the update
1154
   */
1155
  static <A1, A2, A3, A4, A5, R> WorkflowUpdateHandle<R> startUpdateWithStart(
1156
      Functions.Func5<A1, A2, A3, A4, A5, R> updateMethod,
1157
      A1 arg1,
1158
      A2 arg2,
1159
      A3 arg3,
1160
      A4 arg4,
1161
      A5 arg5,
1162
      @Nonnull UpdateOptions<R> options,
1163
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1164
    return WorkflowClientInternalImpl.startUpdateWithStart(
1 ✔
1165
        () -> updateMethod.apply(arg1, arg2, arg3, arg4, arg5), options, startOperation);
1 ✔
1166
  }
1167

1168
  /**
1169
   * Start a six argument update workflow request, along with a workflow start request.
1170
   *
1171
   * @param updateMethod The only supported value is method reference to a proxy created through
1172
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1173
   * @param arg1 first workflow argument
1174
   * @param arg2 second update function parameter
1175
   * @param arg3 third update function parameter
1176
   * @param arg4 fourth update function parameter
1177
   * @param arg5 fifth update function parameter
1178
   * @param arg6 sixth update function parameter
1179
   * @param startOperation start workflow operation
1180
   * @return WorkflowUpdateHandle that can be used to get the result of the update
1181
   */
1182
  static <A1, A2, A3, A4, A5, A6, R> WorkflowUpdateHandle<R> startUpdateWithStart(
1183
      Functions.Func6<A1, A2, A3, A4, A5, A6, R> updateMethod,
1184
      A1 arg1,
1185
      A2 arg2,
1186
      A3 arg3,
1187
      A4 arg4,
1188
      A5 arg5,
1189
      A6 arg6,
1190
      @Nonnull UpdateOptions<R> options,
1191
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1192
    return WorkflowClientInternalImpl.startUpdateWithStart(
1 ✔
1193
        () -> updateMethod.apply(arg1, arg2, arg3, arg4, arg5, arg6), options, startOperation);
1 ✔
1194
  }
1195

1196
  /**
1197
   * Execute a zero argument update workflow request synchronously, along with a workflow start
1198
   * request.
1199
   *
1200
   * @param updateMethod The only supported value is method reference to a proxy created through
1201
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1202
   * @param startOperation start workflow operation
1203
   * @return WorkflowUpdateHandle that can be used to get the result of the update
1204
   */
1205
  static <R> R executeUpdateWithStart(
1206
      Functions.Proc updateMethod,
1207
      @Nonnull UpdateOptions<R> options,
1208
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
UNCOV
1209
    return WorkflowClientInternalImpl.executeUpdateWithStart(updateMethod, options, startOperation);
×
1210
  }
1211

1212
  /**
1213
   * Execute a one argument update workflow request synchronously, along with a workflow start
1214
   * request.
1215
   *
1216
   * @param updateMethod The only supported value is method reference to a proxy created through
1217
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1218
   * @param arg1 first update function parameter
1219
   * @param startOperation start workflow operation
1220
   * @return update result
1221
   */
1222
  static <R, A1> R executeUpdateWithStart(
1223
      Proc1<A1> updateMethod,
1224
      A1 arg1,
1225
      @Nonnull UpdateOptions<R> options,
1226
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
UNCOV
1227
    return WorkflowClientInternalImpl.executeUpdateWithStart(
×
UNCOV
1228
        () -> updateMethod.apply(arg1), options, startOperation);
×
1229
  }
1230

1231
  /**
1232
   * Execute a two argument update workflow request synchronously, along with a workflow start
1233
   * request.
1234
   *
1235
   * @param updateMethod The only supported value is method reference to a proxy created through
1236
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1237
   * @param arg1 first update function parameter
1238
   * @param arg2 second update function parameter
1239
   * @param startOperation start workflow operation
1240
   * @return update result
1241
   */
1242
  static <R, A1, A2> R executeUpdateWithStart(
1243
      Proc2<A1, A2> updateMethod,
1244
      A1 arg1,
1245
      A2 arg2,
1246
      @Nonnull UpdateOptions<R> options,
1247
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
UNCOV
1248
    return WorkflowClientInternalImpl.executeUpdateWithStart(
×
UNCOV
1249
        () -> updateMethod.apply(arg1, arg2), options, startOperation);
×
1250
  }
1251

1252
  /**
1253
   * Execute a three argument update workflow request synchronously, along with a workflow start
1254
   * request.
1255
   *
1256
   * @param updateMethod The only supported value is method reference to a proxy created through
1257
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1258
   * @param arg1 first update function parameter
1259
   * @param arg2 second update function parameter
1260
   * @param arg3 third update function parameter
1261
   * @param startOperation start workflow operation
1262
   * @return update result
1263
   */
1264
  static <R, A1, A2, A3> R executeUpdateWithStart(
1265
      Proc3<A1, A2, A3> updateMethod,
1266
      A1 arg1,
1267
      A2 arg2,
1268
      A3 arg3,
1269
      @Nonnull UpdateOptions<R> options,
1270
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
UNCOV
1271
    return WorkflowClientInternalImpl.executeUpdateWithStart(
×
UNCOV
1272
        () -> updateMethod.apply(arg1, arg2, arg3), options, startOperation);
×
1273
  }
1274

1275
  /**
1276
   * Execute a four argument update workflow request synchronously, along with a workflow start
1277
   * request.
1278
   *
1279
   * @param updateMethod The only supported value is method reference to a proxy created through
1280
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1281
   * @param arg1 first update function parameter
1282
   * @param arg2 second update function parameter
1283
   * @param arg3 third update function parameter
1284
   * @param arg4 fourth update function parameter
1285
   * @param startOperation start workflow operation
1286
   * @return update result
1287
   */
1288
  static <R, A1, A2, A3, A4> R executeUpdateWithStart(
1289
      Proc4<A1, A2, A3, A4> updateMethod,
1290
      A1 arg1,
1291
      A2 arg2,
1292
      A3 arg3,
1293
      A4 arg4,
1294
      @Nonnull UpdateOptions<R> options,
1295
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
UNCOV
1296
    return WorkflowClientInternalImpl.executeUpdateWithStart(
×
UNCOV
1297
        () -> updateMethod.apply(arg1, arg2, arg3, arg4), options, startOperation);
×
1298
  }
1299

1300
  /**
1301
   * Execute a five argument update workflow request synchronously, along with a workflow start
1302
   * request.
1303
   *
1304
   * @param updateMethod The only supported value is method reference to a proxy created through
1305
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1306
   * @param arg1 first update function parameter
1307
   * @param arg2 second update function parameter
1308
   * @param arg3 third update function parameter
1309
   * @param arg4 fourth update function parameter
1310
   * @param arg5 fifth update function parameter
1311
   * @param startOperation start workflow operation
1312
   * @return update result
1313
   */
1314
  static <R, A1, A2, A3, A4, A5> R executeUpdateWithStart(
1315
      Proc5<A1, A2, A3, A4, A5> updateMethod,
1316
      A1 arg1,
1317
      A2 arg2,
1318
      A3 arg3,
1319
      A4 arg4,
1320
      A5 arg5,
1321
      @Nonnull UpdateOptions<R> options,
1322
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
UNCOV
1323
    return WorkflowClientInternalImpl.executeUpdateWithStart(
×
UNCOV
1324
        () -> updateMethod.apply(arg1, arg2, arg3, arg4, arg5), options, startOperation);
×
1325
  }
1326

1327
  /**
1328
   * Execute a six argument update workflow request synchronously, along with a workflow start
1329
   * request.
1330
   *
1331
   * @param updateMethod The only supported value is method reference to a proxy created through
1332
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1333
   * @param arg1 first update function parameter
1334
   * @param arg2 second update function parameter
1335
   * @param arg3 third update function parameter
1336
   * @param arg4 fourth update function parameter
1337
   * @param arg5 fifth update function parameter
1338
   * @param arg6 sixth update function parameter
1339
   * @param startOperation start workflow operation
1340
   * @return update result
1341
   */
1342
  static <R, A1, A2, A3, A4, A5, A6> R executeUpdateWithStart(
1343
      Proc6<A1, A2, A3, A4, A5, A6> updateMethod,
1344
      A1 arg1,
1345
      A2 arg2,
1346
      A3 arg3,
1347
      A4 arg4,
1348
      A5 arg5,
1349
      A6 arg6,
1350
      @Nonnull UpdateOptions<R> options,
1351
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
UNCOV
1352
    return WorkflowClientInternalImpl.executeUpdateWithStart(
×
UNCOV
1353
        () -> updateMethod.apply(arg1, arg2, arg3, arg4, arg5, arg6), options, startOperation);
×
1354
  }
1355

1356
  /**
1357
   * Executes zero argument workflow.
1358
   *
1359
   * @param updateMethod The only supported value is method reference to a proxy created through
1360
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1361
   * @param startOperation start workflow operation
1362
   * @return update result
1363
   */
1364
  static <R> R executeUpdateWithStart(
1365
      Func<R> updateMethod,
1366
      @Nonnull UpdateOptions<R> options,
1367
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1368
    return WorkflowClientInternalImpl.executeUpdateWithStart(
1 ✔
1369
        updateMethod::apply, options, startOperation);
1 ✔
1370
  }
1371

1372
  /**
1373
   * Executes one argument workflow together with an update workflow request.
1374
   *
1375
   * @param updateMethod The only supported value is method reference to a proxy created through
1376
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1377
   * @param arg1 first workflow argument
1378
   * @param startOperation start workflow operation
1379
   * @return update result
1380
   */
1381
  static <A1, R> R executeUpdateWithStart(
1382
      Func1<A1, R> updateMethod,
1383
      A1 arg1,
1384
      @Nonnull UpdateOptions<R> updateOptions,
1385
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1386
    return WorkflowClientInternalImpl.executeUpdateWithStart(
1 ✔
1387
        () -> updateMethod.apply(arg1), updateOptions, startOperation);
1 ✔
1388
  }
1389

1390
  /**
1391
   * Executes two argument workflow together with an update workflow request.
1392
   *
1393
   * @param updateMethod The only supported value is method reference to a proxy created through
1394
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1395
   * @param arg1 first update function parameter
1396
   * @param arg2 second update function parameter
1397
   * @param startOperation start workflow operation
1398
   * @return update result
1399
   */
1400
  static <A1, A2, R> R executeUpdateWithStart(
1401
      Functions.Func2<A1, A2, R> updateMethod,
1402
      A1 arg1,
1403
      A2 arg2,
1404
      @Nonnull UpdateOptions<R> updateOptions,
1405
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1406
    return WorkflowClientInternalImpl.executeUpdateWithStart(
1 ✔
1407
        () -> updateMethod.apply(arg1, arg2), updateOptions, startOperation);
1 ✔
1408
  }
1409

1410
  /**
1411
   * Executes three argument workflow together with an update workflow request.
1412
   *
1413
   * @param updateMethod The only supported value is method reference to a proxy created through
1414
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1415
   * @param arg1 first update function parameter
1416
   * @param arg2 second update function parameter
1417
   * @param arg3 third update function parameter
1418
   * @param startOperation start workflow operation
1419
   * @return update result
1420
   */
1421
  static <A1, A2, A3, R> R executeUpdateWithStart(
1422
      Functions.Func3<A1, A2, A3, R> updateMethod,
1423
      A1 arg1,
1424
      A2 arg2,
1425
      A3 arg3,
1426
      @Nonnull UpdateOptions<R> options,
1427
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1428
    return WorkflowClientInternalImpl.executeUpdateWithStart(
1 ✔
1429
        () -> updateMethod.apply(arg1, arg2, arg3), options, startOperation);
1 ✔
1430
  }
1431

1432
  /**
1433
   * Executes four argument workflow together with an update workflow request.
1434
   *
1435
   * @param updateMethod The only supported value is method reference to a proxy created through
1436
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1437
   * @param arg1 first update function parameter
1438
   * @param arg2 second update function parameter
1439
   * @param arg3 third update function parameter
1440
   * @param arg4 fourth update function parameter
1441
   * @param startOperation start workflow operation
1442
   * @return update result
1443
   */
1444
  static <A1, A2, A3, A4, R> R executeUpdateWithStart(
1445
      Functions.Func4<A1, A2, A3, A4, R> updateMethod,
1446
      A1 arg1,
1447
      A2 arg2,
1448
      A3 arg3,
1449
      A4 arg4,
1450
      @Nonnull UpdateOptions<R> options,
1451
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1452
    return WorkflowClientInternalImpl.executeUpdateWithStart(
1 ✔
1453
        () -> updateMethod.apply(arg1, arg2, arg3, arg4), options, startOperation);
1 ✔
1454
  }
1455

1456
  /**
1457
   * Executes five argument workflow together with an update workflow request.
1458
   *
1459
   * @param updateMethod The only supported value is method reference to a proxy created through
1460
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1461
   * @param arg1 first update function parameter
1462
   * @param arg2 second update function parameter
1463
   * @param arg3 third update function parameter
1464
   * @param arg4 fourth update function parameter
1465
   * @param arg5 fifth update function parameter
1466
   * @param startOperation start workflow operation
1467
   * @return update result
1468
   */
1469
  static <A1, A2, A3, A4, A5, R> R executeUpdateWithStart(
1470
      Functions.Func5<A1, A2, A3, A4, A5, R> updateMethod,
1471
      A1 arg1,
1472
      A2 arg2,
1473
      A3 arg3,
1474
      A4 arg4,
1475
      A5 arg5,
1476
      @Nonnull UpdateOptions<R> options,
1477
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1478
    return WorkflowClientInternalImpl.executeUpdateWithStart(
1 ✔
1479
        () -> updateMethod.apply(arg1, arg2, arg3, arg4, arg5), options, startOperation);
1 ✔
1480
  }
1481

1482
  /**
1483
   * Executes six argument workflow together with an update workflow request.
1484
   *
1485
   * @param updateMethod The only supported value is method reference to a proxy created through
1486
   *     {@link #newWorkflowStub(Class, WorkflowOptions)}.
1487
   * @param arg1 first workflow argument
1488
   * @param arg2 second update function parameter
1489
   * @param arg3 third update function parameter
1490
   * @param arg4 fourth update function parameter
1491
   * @param arg5 fifth update function parameter
1492
   * @param arg6 sixth update function parameter
1493
   * @param startOperation start workflow operation
1494
   * @return update result
1495
   */
1496
  static <A1, A2, A3, A4, A5, A6, R> R executeUpdateWithStart(
1497
      Functions.Func6<A1, A2, A3, A4, A5, A6, R> updateMethod,
1498
      A1 arg1,
1499
      A2 arg2,
1500
      A3 arg3,
1501
      A4 arg4,
1502
      A5 arg5,
1503
      A6 arg6,
1504
      @Nonnull UpdateOptions<R> options,
1505
      @Nonnull WithStartWorkflowOperation<?> startOperation) {
1506
    return WorkflowClientInternalImpl.executeUpdateWithStart(
1 ✔
1507
        () -> updateMethod.apply(arg1, arg2, arg3, arg4, arg5, arg6), options, startOperation);
1 ✔
1508
  }
1509

1510
  /**
1511
   * Executes zero argument workflow with void return type
1512
   *
1513
   * @param workflow The only supported value is method reference to a proxy created through {@link
1514
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1515
   * @return future becomes ready upon workflow completion with null value or failure
1516
   */
1517
  static CompletableFuture<Void> execute(Proc workflow) {
1518
    return WorkflowClientInternalImpl.execute(workflow);
1 ✔
1519
  }
1520

1521
  /**
1522
   * Executes one argument workflow with void return type
1523
   *
1524
   * @param workflow The only supported value is method reference to a proxy created through {@link
1525
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1526
   * @param arg1 first workflow function parameter
1527
   * @return future becomes ready upon workflow completion with null value or failure
1528
   */
1529
  static <A1> CompletableFuture<Void> execute(Proc1<A1> workflow, A1 arg1) {
1530
    return WorkflowClientInternalImpl.execute(workflow, arg1);
1 ✔
1531
  }
1532

1533
  /**
1534
   * Executes two argument workflow with void return type
1535
   *
1536
   * @param workflow The only supported value is method reference to a proxy created through {@link
1537
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1538
   * @param arg1 first workflow function parameter
1539
   * @param arg2 second workflow function parameter
1540
   * @return future becomes ready upon workflow completion with null value or failure
1541
   */
1542
  static <A1, A2> CompletableFuture<Void> execute(Proc2<A1, A2> workflow, A1 arg1, A2 arg2) {
1543
    return WorkflowClientInternalImpl.execute(workflow, arg1, arg2);
1 ✔
1544
  }
1545

1546
  /**
1547
   * Executes three argument workflow with void return type
1548
   *
1549
   * @param workflow The only supported value is method reference to a proxy created through {@link
1550
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1551
   * @param arg1 first workflow function parameter
1552
   * @param arg2 second workflow function parameter
1553
   * @param arg3 third workflow function parameter
1554
   * @return future becomes ready upon workflow completion with null value or failure
1555
   */
1556
  static <A1, A2, A3> CompletableFuture<Void> execute(
1557
      Proc3<A1, A2, A3> workflow, A1 arg1, A2 arg2, A3 arg3) {
1558
    return WorkflowClientInternalImpl.execute(workflow, arg1, arg2, arg3);
1 ✔
1559
  }
1560

1561
  /**
1562
   * Executes four argument workflow with void return type
1563
   *
1564
   * @param workflow The only supported value is method reference to a proxy created through {@link
1565
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1566
   * @param arg1 first workflow function parameter
1567
   * @param arg2 second workflow function parameter
1568
   * @param arg3 third workflow function parameter
1569
   * @param arg4 fourth workflow function parameter
1570
   * @return future becomes ready upon workflow completion with null value or failure
1571
   */
1572
  static <A1, A2, A3, A4> CompletableFuture<Void> execute(
1573
      Proc4<A1, A2, A3, A4> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4) {
1574
    return WorkflowClientInternalImpl.execute(workflow, arg1, arg2, arg3, arg4);
1 ✔
1575
  }
1576

1577
  /**
1578
   * Executes five argument workflow with void return type
1579
   *
1580
   * @param workflow The only supported value is method reference to a proxy created through {@link
1581
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1582
   * @param arg1 first workflow function parameter
1583
   * @param arg2 second workflow function parameter
1584
   * @param arg3 third workflow function parameter
1585
   * @param arg4 fourth workflow function parameter
1586
   * @param arg5 fifth workflow function parameter
1587
   * @return future becomes ready upon workflow completion with null value or failure
1588
   */
1589
  static <A1, A2, A3, A4, A5> CompletableFuture<Void> execute(
1590
      Proc5<A1, A2, A3, A4, A5> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4, A5 arg5) {
1591
    return WorkflowClientInternalImpl.execute(workflow, arg1, arg2, arg3, arg4, arg5);
1 ✔
1592
  }
1593

1594
  /**
1595
   * Executes six argument workflow with void return type
1596
   *
1597
   * @param workflow The only supported value is method reference to a proxy created through {@link
1598
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1599
   * @param arg1 first workflow function parameter
1600
   * @param arg2 second workflow function parameter
1601
   * @param arg3 third workflow function parameter
1602
   * @param arg4 fourth workflow function parameter
1603
   * @param arg5 fifth workflow function parameter
1604
   * @param arg6 sixth workflow function parameter
1605
   * @return future becomes ready upon workflow completion with null value or failure
1606
   */
1607
  static <A1, A2, A3, A4, A5, A6> CompletableFuture<Void> execute(
1608
      Proc6<A1, A2, A3, A4, A5, A6> workflow,
1609
      A1 arg1,
1610
      A2 arg2,
1611
      A3 arg3,
1612
      A4 arg4,
1613
      A5 arg5,
1614
      A6 arg6) {
1615
    return WorkflowClientInternalImpl.execute(workflow, arg1, arg2, arg3, arg4, arg5, arg6);
1 ✔
1616
  }
1617

1618
  /**
1619
   * Executes zero argument workflow.
1620
   *
1621
   * @param workflow The only supported value is method reference to a proxy created through {@link
1622
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1623
   * @return future that contains workflow result or failure
1624
   */
1625
  static <R> CompletableFuture<R> execute(Func<R> workflow) {
1626
    return WorkflowClientInternalImpl.execute(workflow);
1 ✔
1627
  }
1628

1629
  /**
1630
   * Executes one argument workflow asynchronously.
1631
   *
1632
   * @param workflow The only supported value is method reference to a proxy created through {@link
1633
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1634
   * @param arg1 first workflow argument
1635
   * @return future that contains workflow result or failure
1636
   */
1637
  static <A1, R> CompletableFuture<R> execute(Func1<A1, R> workflow, A1 arg1) {
1638
    return WorkflowClientInternalImpl.execute(workflow, arg1);
1 ✔
1639
  }
1640

1641
  /**
1642
   * Executes two argument workflow asynchronously.
1643
   *
1644
   * @param workflow The only supported value is method reference to a proxy created through {@link
1645
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1646
   * @param arg1 first workflow function parameter
1647
   * @param arg2 second workflow function parameter
1648
   * @return future that contains workflow result or failure
1649
   */
1650
  static <A1, A2, R> CompletableFuture<R> execute(
1651
      Functions.Func2<A1, A2, R> workflow, A1 arg1, A2 arg2) {
1652
    return WorkflowClientInternalImpl.execute(workflow, arg1, arg2);
1 ✔
1653
  }
1654

1655
  /**
1656
   * Executes three argument workflow asynchronously.
1657
   *
1658
   * @param workflow The only supported value is method reference to a proxy created through {@link
1659
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1660
   * @param arg1 first workflow function parameter
1661
   * @param arg2 second workflow function parameter
1662
   * @param arg3 third workflow function parameter
1663
   * @return future that contains workflow result or failure
1664
   */
1665
  static <A1, A2, A3, R> CompletableFuture<R> execute(
1666
      Functions.Func3<A1, A2, A3, R> workflow, A1 arg1, A2 arg2, A3 arg3) {
1667
    return WorkflowClientInternalImpl.execute(workflow, arg1, arg2, arg3);
1 ✔
1668
  }
1669

1670
  /**
1671
   * Executes four argument workflow asynchronously.
1672
   *
1673
   * @param workflow The only supported value is method reference to a proxy created through {@link
1674
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1675
   * @param arg1 first workflow function parameter
1676
   * @param arg2 second workflow function parameter
1677
   * @param arg3 third workflow function parameter
1678
   * @param arg4 fourth workflow function parameter
1679
   * @return future that contains workflow result or failure
1680
   */
1681
  static <A1, A2, A3, A4, R> CompletableFuture<R> execute(
1682
      Functions.Func4<A1, A2, A3, A4, R> workflow, A1 arg1, A2 arg2, A3 arg3, A4 arg4) {
1683
    return WorkflowClientInternalImpl.execute(workflow, arg1, arg2, arg3, arg4);
1 ✔
1684
  }
1685

1686
  /**
1687
   * Executes five argument workflow asynchronously.
1688
   *
1689
   * @param workflow The only supported value is method reference to a proxy created through {@link
1690
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1691
   * @param arg1 first workflow function parameter
1692
   * @param arg2 second workflow function parameter
1693
   * @param arg3 third workflow function parameter
1694
   * @param arg4 fourth workflow function parameter
1695
   * @param arg5 fifth workflow function parameter
1696
   * @return future that contains workflow result or failure
1697
   */
1698
  static <A1, A2, A3, A4, A5, R> CompletableFuture<R> execute(
1699
      Functions.Func5<A1, A2, A3, A4, A5, R> workflow,
1700
      A1 arg1,
1701
      A2 arg2,
1702
      A3 arg3,
1703
      A4 arg4,
1704
      A5 arg5) {
1705
    return WorkflowClientInternalImpl.execute(workflow, arg1, arg2, arg3, arg4, arg5);
1 ✔
1706
  }
1707

1708
  /**
1709
   * Executes six argument workflow asynchronously.
1710
   *
1711
   * @param workflow The only supported value is method reference to a proxy created through {@link
1712
   *     #newWorkflowStub(Class, WorkflowOptions)}.
1713
   * @param arg1 first workflow argument
1714
   * @param arg2 second workflow function parameter
1715
   * @param arg3 third workflow function parameter
1716
   * @param arg4 fourth workflow function parameter
1717
   * @param arg5 fifth workflow function parameter
1718
   * @param arg6 sixth workflow function parameter
1719
   * @return future that contains workflow result or failure
1720
   */
1721
  static <A1, A2, A3, A4, A5, A6, R> CompletableFuture<R> execute(
1722
      Functions.Func6<A1, A2, A3, A4, A5, A6, R> workflow,
1723
      A1 arg1,
1724
      A2 arg2,
1725
      A3 arg3,
1726
      A4 arg4,
1727
      A5 arg5,
1728
      A6 arg6) {
1729
    return WorkflowClientInternalImpl.execute(workflow, arg1, arg2, arg3, arg4, arg5, arg6);
1 ✔
1730
  }
1731

1732
  /**
1733
   * For SDK Internal usage only. This method should <b>not</b> be used by users. If implementing a
1734
   * proxy or an adapter over a {@link WorkflowClient} provided by the SDK, users should pass an
1735
   * object returned by this method as-is.
1736
   */
1737
  Object getInternal();
1738
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc