@@ -500,7 +500,7 @@ must be treated as a string interpolation. After interpolating the first
500
500
parameter reference, interpolation must be recursively applied to the
501
501
trailing characters to yield the final string value.
502
502
503
- ## Expressions
503
+ ## Expressions (Optional)
504
504
505
505
An expression is a fragment of [ Javascript/ECMAScript
506
506
5.1] ( http://www.ecma-international.org/ecma-262/5.1/ ) code evaluated by the
@@ -511,6 +511,12 @@ and/or step 7 (capture output). Expressions are distinct from regular
511
511
processes in that they are intended to modify the behavior of the workflow
512
512
itself rather than perform the primary work of the workflow.
513
513
514
+ Expressions in CWL are an optional feature and are not required to be
515
+ implemented by all consumers of CWL documents. They should be used sparingly,
516
+ when there is no other way to achieve the desired outcome. Excessive use of
517
+ expressions may be a signal that other refactoring of the tools or workflows
518
+ would benefit the author, runtime, and users of the CWL document in question.
519
+
514
520
To declare the use of expressions, the document must include the process
515
521
requirement ` InlineJavascriptRequirement ` . Expressions may be used in any
516
522
field permitting the pseudo-type ` Expression ` , as specified by this
@@ -555,8 +561,8 @@ Implementations may apply other limits, such as process isolation, timeouts,
555
561
and operating system containers/jails to minimize the security risks associated
556
562
with running untrusted code embedded in a CWL document.
557
563
558
- Exceptions thrown from an exception must result in a ` permanentFailure ` of the
559
- process.
564
+ Javascript exceptions thrown from an exception must result in a
565
+ ` permanentFailure ` of the CWL process.
560
566
561
567
## Executing CWL documents as scripts
562
568
0 commit comments