Skip to content

Commit 0260504

Browse files
committed
CWL expressions are optional
1 parent feee785 commit 0260504

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

concepts.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,7 @@ must be treated as a string interpolation. After interpolating the first
500500
parameter reference, interpolation must be recursively applied to the
501501
trailing characters to yield the final string value.
502502

503-
## Expressions
503+
## Expressions (Optional)
504504

505505
An expression is a fragment of [Javascript/ECMAScript
506506
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
511511
processes in that they are intended to modify the behavior of the workflow
512512
itself rather than perform the primary work of the workflow.
513513

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+
514520
To declare the use of expressions, the document must include the process
515521
requirement `InlineJavascriptRequirement`. Expressions may be used in any
516522
field permitting the pseudo-type `Expression`, as specified by this
@@ -555,8 +561,8 @@ Implementations may apply other limits, such as process isolation, timeouts,
555561
and operating system containers/jails to minimize the security risks associated
556562
with running untrusted code embedded in a CWL document.
557563

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.
560566

561567
## Executing CWL documents as scripts
562568

0 commit comments

Comments
 (0)