code: public void registerWorkflowDef(WorkflowDef workflowDef) {
          Preconditions.checkNotNull(workflowDef, "Worfklow definition cannot be null");
          stub.createWorkflow(
                  MetadataServicePb.CreateWorkflowRequest.newBuilder()
                          .setWorkflow(protoMapper.toProto(workflowDef))
                          .build()
          );
      }
docs: Register a workflow definition with the server
  
  @param workflowDef the workflow definition