@@ -276,7 +276,20 @@ private Map<String, CWLElement> getStepInputsOutputs(JsonNode inOut) {
276
276
277
277
if (inOut .getClass () == ArrayNode .class ) {
278
278
// array<WorkflowStepInput>
279
- int test = 1 ;
279
+ for (JsonNode inOutNode : inOut ) {
280
+ if (inOutNode .getClass () == ObjectNode .class ) {
281
+ CWLElement inputOutput = new CWLElement ();
282
+ List <String > sources = extractSource (inOutNode );
283
+ if (sources .size () > 0 ) {
284
+ for (String source : sources ) {
285
+ inputOutput .addSourceID (source );
286
+ }
287
+ } else {
288
+ inputOutput .setDefaultVal (extractDefault (inOutNode ));
289
+ }
290
+ returnMap .put (extractID (inOutNode ), inputOutput );
291
+ }
292
+ }
280
293
} else if (inOut .getClass () == ObjectNode .class ) {
281
294
// map<WorkflowStepInput.id, WorkflowStepInput.source>
282
295
Iterator <Map .Entry <String , JsonNode >> iterator = inOut .fields ();
@@ -340,7 +353,7 @@ private CWLElement getDetails(JsonNode inputOutput) {
340
353
} else {
341
354
details .setLabel (extractLabel (inputOutput ));
342
355
details .setDoc (extractDoc (inputOutput ));
343
- extractOutputSource (inputOutput ).forEach (details ::addSourceID );
356
+ extractSource (inputOutput ).forEach (details ::addSourceID );
344
357
details .setDefaultVal (extractDefault (inputOutput ));
345
358
346
359
// Type is only for inputs
@@ -403,7 +416,7 @@ private String extractDefault(JsonNode node) {
403
416
* @param node The node to have the sources extracted from
404
417
* @return A list of strings for the sources
405
418
*/
406
- private List <String > extractOutputSource (JsonNode node ) {
419
+ private List <String > extractSource (JsonNode node ) {
407
420
if (node != null ) {
408
421
List <String > sources = new ArrayList <String >();
409
422
JsonNode sourceNode = null ;
0 commit comments