   {:window/id s/Keyword
    :window/task TaskName
    :window/type WindowType
-   :window/aggregation (s/either s/Keyword [s/Keyword])
+   :window/aggregation (s/cond-pre s/Keyword [s/Keyword])
    (s/optional-key :window/init) s/Any
    (s/optional-key :window/window-key) s/Any
    (s/optional-key :window/min-value) s/Int

  (= (count edge) 2))

(def ^{:private true} edge-validator
  (s/->Both [(s/pred vector? 'vector?)
             (s/pred edge-two-nodes? 'edge-two-nodes?)
             [TaskName]]))

(def Workflow
  (s/->Both [(s/pred vector? 'vector?)
             [edge-validator]]))

(def Language
  (s/enum :java :clojure))

(def PosInt 
  (s/pred pos? 'pos?))

(def Record
  (s/pred record? 'record?))

(def SPosInt 
  (s/pred (fn [v] (>= v 0)) 'spos?))

(defn build-allowed-key-ns [nspace]
  (s/pred (fn [k]
            (or (not (keyword? k))
                (not (= (name nspace) 
                        (namespace k)))))
          'unsupported-key-combination))


          'keyword-namespaced?))

(def Function
  (s/cond-pre (s/pred var? 'var?)
              (s/pred ifn? 'ifn?)))

(def TaskName
  (s/pred (fn [v]
