code: private Boolean workflowExists(Connection connection, WorkflowDef def) {
          final String CHECK_WORKFLOW_DEF_EXISTS_QUERY = "SELECT COUNT(*) FROM meta_workflow_def WHERE name = ? AND " +
                  "version = ?";
  
          return query(connection, CHECK_WORKFLOW_DEF_EXISTS_QUERY,
                  q -> q.addParameter(def.getName()).addParameter(def.getVersion()).exists());
      }
docs: Check if a {@link WorkflowDef} with the same {@literal name} and {@literal version} already exist.
  
  @param connection The {@link Connection} to use for queries.
  @param def        The {@code WorkflowDef} to check for.
  @return {@literal true} if a {@code WorkflowDef} already exists with the same values.