          (let [workflow-path-prefix [(:bucketName props) (:submission-id props)]]
            (render-workflow-detail (:response metadata-response) (:raw-response metadata-response)
                                    (:workflow-name props) (:submission-id props) (:use-call-cache props)
-                                   (:workspace-id props) workflow-path-prefix)))))
+                                   (:workspace-id props) workflow-path-prefix
+                                   #(this :get-inputs) (:metadata-inputs @state)
+                                   #(this :get-outputs) (:metadata-outputs @state)
+                                   (:subworkflow? props))))))
    :component-did-mount
    (fn [{:keys [props state]}]
      (endpoints/call-ajax-orch

(defn- render-gcs-path [components]
  (str moncommon/google-storage-context (string/join "/" components) "/"))

;; recursive partner of render-subworkflow-detail
(declare CallDetail)

;; Subworkflows contain a lot of information that is redundant to what can be seen from the Calls
;; Only show new information
(defn- render-subworkflow-detail [workflow raw-data workflow-name submission-id use-call-cache workspace-id gcs-path-prefix]
  (let [inputs (ffirst (workflow "calls"))
        input-names (string/split inputs ".")
        workflow-name-for-path (first input-names)
        subworkflow-path-components (conj gcs-path-prefix workflow-name-for-path (workflow "id"))]
    [:div {:style {:padding "1em" :border style/standard-line :borderRadius 4
                   :backgroundColor (:background-light style/colors)}}
     (create-field "Subworkflow ID" (links/create-external {:href (render-gcs-path subworkflow-path-components)} (workflow "id")))
     (when (seq (workflow "calls"))
       [WorkflowTimingContainer (merge {:label "Workflow Timing"} (utils/restructure workspace-id submission-id workflow))])
     (when-let [failures (workflow "failures")]
       [Failures {:data failures}])
     (when (seq (workflow "calls"))
       [:div {:style {:marginTop "1em" :fontWeight 500}} "Calls:"])
     (for [[call data] (workflow "calls")]
       [CallDetail {:label call :data data :submission-id submission-id :use-call-cache use-call-cache :workflowId (workflow "id")
                    :workspace-id workspace-id :gcs-path-prefix subworkflow-path-components}])]))

(react/defc- SubworkflowDetails
  {:render
   (fn [{:keys [state props]}]
     [:div {}
      (let [server-response (:server-response @state)]
        (cond
          (nil? server-response)
          (spinner "Loading subworkflow details...")
          (not (:success? server-response))
          (style/create-server-error-message (:response server-response))
          :else
          (render-subworkflow-detail (:response server-response) (:raw-response server-response)
                                     (:workflow-name props) (:submission-id props) (:use-call-cache props)
                                     (:workspace-id props) (:gcs-path-prefix props))))])
      :component-did-mount
      (fn [{:keys [props state]}]
        (endpoints/call-ajax-orch
          {:endpoint
           (endpoints/get-workflow-details
             (:workspace-id props) (:submission-id props) (:workflow-id props))
           :on-done (fn [{:keys [success? get-parsed-response status-text raw-response]}]
                      (swap! state assoc :server-response
                             {:success? success?
                              :response (if success? (get-parsed-response false) status-text)
                              :raw-response raw-response}))}))})

(react/defc- CallDetail
  {:get-initial-state

                         {:success? success?
                          :response (if success? (:cost (get-parsed-response)) (str "Error: " (or (:message (get-parsed-response)) status-text)))}))}))})

(defn- render-workflow-detail [workflow raw-data workflow-name submission-id use-call-cache workspace-id gcs-path-prefix inputs-fn inputs-data outputs-fn outputs-data subworkflow?]
  (let [inputs (ffirst (workflow "calls"))
        input-names (string/split inputs ".")
        workflow-name-for-path (first input-names)
        workflow-path-components (conj gcs-path-prefix workflow-name-for-path (workflow "id"))
        unit-name (if subworkflow? "Subworkflow" "Workflow")]
    [:div {:style {:padding "1em" :border style/standard-line :borderRadius 4
                   :backgroundColor (:background-light style/colors)}}
     (create-field (str unit-name  " ID") (links/create-external {:href (render-gcs-path workflow-path-components)} (workflow "id")))
     ;; Subworkflows contain a lot of information that is redundant to what can be seen from the Calls
     ;; Only show new information
     (when-not subworkflow? [:div {}
      (let [status (workflow "status")]
        (create-field "Status" (moncommon/icon-for-wf-status status) status))
      [WorkflowCost {:workspace-id workspace-id
                      :submission-id submission-id
                      :workflow-id (workflow "id")}]
      (when-let [submission (workflow "submission")]
        (create-field "Submitted" (moncommon/render-date submission)))
      (when-let [start (workflow "start")]
        (create-field "Started" (moncommon/render-date start)))
      (when-let [end (workflow "end")]
        (create-field "Ended" (moncommon/render-date end)))
      [IODetail {:label "Inputs" :data-path ["submittedFiles" "inputs"] :data-fn inputs-fn :data inputs-data :workspace-id workspace-id}]
      [IODetail {:label "Outputs" :data-path ["outputs"] :data-fn outputs-fn :data outputs-data :workspace-id workspace-id}]
      (when-let [workflowLog (workflow "workflowLog")]
        (create-field "Workflow Log" (display-value (:namespace workspace-id) workflowLog (str "workflow." (workflow "id") ".log"))))])
     (when (seq (workflow "calls"))
       [WorkflowTimingContainer (merge {:label "Workflow Timing"} (utils/restructure workspace-id submission-id workflow))])
     (when-let [failures (workflow "failures")]
