@@ -873,19 +873,22 @@ class Session implements ISession {
873
873
final ver = " dsl${ NF.dsl1 ?'1' :'2'} "
874
874
final processDefs = ScriptMeta . allProcessDefinitions()
875
875
log. debug " Workflow process definitions [$ver ]: ${ processDefs.entrySet().collect{"${it.key} ${it.value}"}.join(', ')} "
876
- def resolvedNames = ScriptMeta . allResolvedProcessNames()
877
876
// Add unaliased process names to the resolved names map
878
- final mainScriptMeta = ScriptMeta . get(script)
879
- mainScriptMeta. getLocalProcessNames(). each { name ->
880
- // The processes defined in the main script cannot be included in
881
- // other scripts, as it would create a circular inclusion.
882
- // Hence, no need to check for the key existence in the map.
883
- def key = Map . entry(mainScriptMeta. getScriptPath(), name)
884
- def list = new ArrayList ()
885
- list. add(name)
886
- resolvedNames. put(key, list)
877
+ // Skip if script is undefined (for TESTING)
878
+ if (script) {
879
+ def resolvedNames = ScriptMeta . allResolvedProcessNames()
880
+ final mainScriptMeta = ScriptMeta . get(script)
881
+ mainScriptMeta. getLocalProcessNames(). each { name ->
882
+ // The processes defined in the main script cannot be included in
883
+ // other scripts, as it would create a circular inclusion.
884
+ // Hence, no need to check for the key existence in the map.
885
+ def key = Map . entry(mainScriptMeta. getScriptPath(), name)
886
+ def list = new ArrayList ()
887
+ list. add(name)
888
+ resolvedNames. put(key, list)
889
+ }
890
+ log. debug " Resolved process names: ${ resolvedNames.entrySet().join(', ')} "
887
891
}
888
- log. debug " Resolved process names: ${ resolvedNames.entrySet().join(', ')} "
889
892
890
893
validateConfig(names)
891
894
}
0 commit comments