Skip to content

Commit 0656251

Browse files
committed
Parsing of specific packed workflows using %23 as hash
1 parent a3a84dc commit 0656251

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

src/main/java/org/commonwl/view/cwl/CWLService.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,15 @@ public Workflow parseWorkflowNative(File workflowFile, String packedWorkflowId)
171171

172172
if (packedWorkflowId != null) {
173173
for (JsonNode jsonNode : cwlFile.get(DOC_GRAPH)) {
174-
if (extractProcess(jsonNode) == CWLProcess.WORKFLOW &&
175-
jsonNode.get(ID).asText().equals(packedWorkflowId)) {
176-
cwlFile = jsonNode;
177-
break;
174+
if (extractProcess(jsonNode) == CWLProcess.WORKFLOW) {
175+
String currentId = jsonNode.get(ID).asText();
176+
if (currentId.startsWith("#")) {
177+
currentId = currentId.substring(1);
178+
}
179+
if (currentId.equals(packedWorkflowId)) {
180+
cwlFile = jsonNode;
181+
break;
182+
}
178183
}
179184
}
180185
}

src/main/java/org/commonwl/view/workflow/WorkflowService.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,6 @@ public QueuedWorkflow createQueuedWorkflow(GitDetails gitInfo)
333333
if (!cwlService.isPacked(workflowFile)) {
334334
throw new WorkflowNotFoundException();
335335
}
336-
337336
}
338337

339338
Workflow basicModel = cwlService.parseWorkflowNative(workflowFile, packedWorkflowId);

0 commit comments

Comments
 (0)