code: public void restart(String workflowId, boolean useLatestDefinitions) {
          Preconditions.checkArgument(StringUtils.isNotBlank(workflowId), "workflow id cannot be blank");
          stub.restartWorkflow(WorkflowServicePb.RestartWorkflowRequest.newBuilder()
                  .setWorkflowId(workflowId)
                  .setUseLatestDefinitions(useLatestDefinitions)
                  .build()
          );
      }
docs: Restart a completed workflow
  
  @param workflowId the workflow id of the workflow to be restarted