How to set a Workflow Task Timeout in Java
Set the Workflow Task Timeout with the WorkflowStub
instance in the Client code using WorkflowOptions.Builder.setWorkflowTaskTimeout
.
- Type:
time.Duration
- Default: 10 seconds.
- Values: Maximum accepted value is 60 seconds.
//create Workflow stub for YourWorkflowInterface
YourWorkflowInterface workflow1 =
WorkerGreet.greetclient.newWorkflowStub(
GreetWorkflowInterface.class,
WorkflowOptions.newBuilder()
.setWorkflowId("YourWF")
.setTaskQueue(WorkerGreet.TASK_QUEUE)
// Set Workflow Task Timeout duration
.setWorkflowTaskTimeout(Duration.ofSeconds(10))
.build());