Mercurial > repos > shellac > sam_consensus_v3
comparison env/lib/python3.9/site-packages/cwltool/schemas/v1.1/Workflow.yml @ 0:4f3585e2f14b draft default tip
"planemo upload commit 60cee0fc7c0cda8592644e1aad72851dec82c959"
| author | shellac |
|---|---|
| date | Mon, 22 Mar 2021 18:12:50 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| -1:000000000000 | 0:4f3585e2f14b |
|---|---|
| 1 saladVersion: v1.1 | |
| 2 $base: "https://w3id.org/cwl/cwl#" | |
| 3 | |
| 4 $namespaces: | |
| 5 cwl: "https://w3id.org/cwl/cwl#" | |
| 6 rdfs: "http://www.w3.org/2000/01/rdf-schema#" | |
| 7 | |
| 8 $graph: | |
| 9 | |
| 10 - name: "WorkflowDoc" | |
| 11 type: documentation | |
| 12 doc: | |
| 13 - | | |
| 14 # Common Workflow Language (CWL) Workflow Description, v1.1 | |
| 15 | |
| 16 This version: | |
| 17 * https://w3id.org/cwl/v1.1/ | |
| 18 | |
| 19 Current version: | |
| 20 * https://w3id.org/cwl/ | |
| 21 - "\n\n" | |
| 22 - {$include: contrib.md} | |
| 23 - "\n\n" | |
| 24 - | | |
| 25 # Abstract | |
| 26 | |
| 27 One way to define a workflow is: an analysis task represented by a | |
| 28 directed graph describing a sequence of operations that transform an | |
| 29 input data set to output. This specification defines the Common Workflow | |
| 30 Language (CWL) Workflow description, a vendor-neutral standard for | |
| 31 representing workflows intended to be portable across a variety of | |
| 32 computing platforms. | |
| 33 | |
| 34 - {$include: intro.md} | |
| 35 | |
| 36 - | | |
| 37 | |
| 38 ## Introduction to CWL Workflow standard v1.1 | |
| 39 | |
| 40 This specification represents the latest stable release from the | |
| 41 CWL group. Since the v1.0 release, v1.1 introduces the | |
| 42 following updates to the CWL Workflow standard. | |
| 43 Documents should to use `cwlVersion: v1.1` to make use of new | |
| 44 syntax and features introduced in v1.1. Existing v1.0 documents | |
| 45 should be trivially updatable by changing `cwlVersion`, however | |
| 46 CWL documents that relied on previously undefined or | |
| 47 underspecified behavior may have slightly different behavior in | |
| 48 v1.1. | |
| 49 | |
| 50 ## Changelog | |
| 51 | |
| 52 * Clarify intent of ExpressionTool and clarify that they can be run standalone. | |
| 53 * Clarify how Requirements are inherited by step processes. | |
| 54 * Clarify behavior around step inputs not consumed by the target | |
| 55 run process. | |
| 56 * Document explicitly that CWL allows pass-through of workflow inputs to outputs. | |
| 57 * Added optional name and doc fields to `OutputRecordSchema`. | |
| 58 * Default values for some fields are now expressed in the schema. | |
| 59 * When defining record types, fields of type `File` may now include | |
| 60 `format`, `secondaryFiles`, and `streamable`. | |
| 61 * The `Input` schemas (`Record`, `Array`, `Enum`), now permits a `doc` field. | |
| 62 * Any `doc` field may be an array of strings in addition to the | |
| 63 previously allowed single string. | |
| 64 * The `run` field now introduces a subscope so that embedded | |
| 65 definitions do not have identifier conflicts with the | |
| 66 outer workflow. | |
| 67 * `Workflow.inputs` and `ExpressionTool.inputs` now refer to the type | |
| 68 `WorkflowInputParameter` instead of `InputParameter`; the only syntax | |
| 69 difference from v1.0 is that `inputBinding` is now deprecated (as | |
| 70 there is no command line to bind input values to) and `inputBinding` | |
| 71 in a `Workflow` context will be removed in v2.0. Use the new | |
| 72 `WorkflowInputParameter.loadContents` instead. | |
| 73 * The presence of `OutputRecordField.outputBinding` in v1.0 was due to | |
| 74 a technical error and as it makes no semantic sense it was removed. | |
| 75 * `WorkflowStepInput` now has a `label` field. | |
| 76 * [Addition](#Requirements_and_hints) of `cwl:requirements` field to | |
| 77 input object documents. | |
| 78 * `secondaryFiles` can now be explicitly marked as `required` or not. | |
| 79 * Add note that undefined details related to execution are left open to | |
| 80 the platform. | |
| 81 * [Added](#WorkReuse) `WorkReuse` feature, allowing to enable or disable the reuse | |
| 82 behavior for a particular tool or step for implementations that | |
| 83 support reusing output from past work. | |
| 84 * [Added](#NetworkAccess) `NetworkAccess` feature, allowing to indicate whether a | |
| 85 process requires outgoing network access. | |
| 86 * [Added](#InplaceUpdateRequirement) `InplaceUpdateRequirement` feature, allowing tools to directly | |
| 87 update files with `writable: true` in `InitialWorkDirRequirement`. | |
| 88 * [Added](#LoadListingRequirement) `LoadListingRequirement` | |
| 89 and [loadListing](#LoadContents) to control whether and how | |
| 90 `Directory` listings should be loaded for use in expressions. | |
| 91 * [Better explain](#map) the `map<…>` notation that has existed since v1.0. | |
| 92 * Fixed schema error where the `type` field inside the `inputs` and | |
| 93 `outputs` fields for both `Workflow` and `ExpressionTool` was | |
| 94 incorrectly listed as optional. | |
| 95 * For multi-Process CWL documents, if no particular process is named then | |
| 96 the process with the `id` of `#main` is chosen. | |
| 97 * [Made explicit](#Generic_execution_process) that the `$namespaces` of | |
| 98 the top level CWL document are also available to the input object as | |
| 99 well. | |
| 100 * Fields with type "Expression" no longer include "string" in | |
| 101 the type union unless a string is semantically valid. Where | |
| 102 a bare string is not semantically valid, these fields must | |
| 103 contain either a non-string value accepted by the field | |
| 104 type, or a valid expression which returns a value having one | |
| 105 of the the other types defined for that field. | |
| 106 | |
| 107 See also the [CWL Command Line Tool Description, v1.1 changelog](CommandLineTool.html#Changelog). | |
| 108 | |
| 109 ## Purpose | |
| 110 | |
| 111 The Common Workflow Language Command Line Tool Description express | |
| 112 workflows for data-intensive science, such as Bioinformatics, Chemistry, | |
| 113 Physics, and Astronomy. This specification is intended to define a data | |
| 114 and execution model for Workflows that can be implemented on top of a | |
| 115 variety of computing platforms, ranging from an individual workstation to | |
| 116 cluster, grid, cloud, and high performance computing systems. Details related | |
| 117 to execution of these workflow not laid out in this specification are open to | |
| 118 interpretation by the computing platform implementing this specification. | |
| 119 | |
| 120 - {$include: concepts.md} | |
| 121 | |
| 122 - name: ExpressionToolOutputParameter | |
| 123 type: record | |
| 124 extends: OutputParameter | |
| 125 fields: | |
| 126 - name: type | |
| 127 type: | |
| 128 - CWLType | |
| 129 - OutputRecordSchema | |
| 130 - OutputEnumSchema | |
| 131 - OutputArraySchema | |
| 132 - string | |
| 133 - type: array | |
| 134 items: | |
| 135 - CWLType | |
| 136 - OutputRecordSchema | |
| 137 - OutputEnumSchema | |
| 138 - OutputArraySchema | |
| 139 - string | |
| 140 jsonldPredicate: | |
| 141 "_id": "sld:type" | |
| 142 "_type": "@vocab" | |
| 143 refScope: 2 | |
| 144 typeDSL: True | |
| 145 doc: | | |
| 146 Specify valid types of data that may be assigned to this parameter. | |
| 147 | |
| 148 | |
| 149 - name: WorkflowInputParameter | |
| 150 type: record | |
| 151 extends: InputParameter | |
| 152 docParent: "#Workflow" | |
| 153 fields: | |
| 154 - name: type | |
| 155 type: | |
| 156 - CWLType | |
| 157 - InputRecordSchema | |
| 158 - InputEnumSchema | |
| 159 - InputArraySchema | |
| 160 - string | |
| 161 - type: array | |
| 162 items: | |
| 163 - CWLType | |
| 164 - InputRecordSchema | |
| 165 - InputEnumSchema | |
| 166 - InputArraySchema | |
| 167 - string | |
| 168 jsonldPredicate: | |
| 169 "_id": "sld:type" | |
| 170 "_type": "@vocab" | |
| 171 refScope: 2 | |
| 172 typeDSL: True | |
| 173 doc: | | |
| 174 Specify valid types of data that may be assigned to this parameter. | |
| 175 - name: inputBinding | |
| 176 type: InputBinding? | |
| 177 doc: | | |
| 178 Deprecated. Preserved for v1.0 backwards compatability. Will be removed in | |
| 179 CWL v2.0. Use `WorkflowInputParameter.loadContents` instead. | |
| 180 jsonldPredicate: "cwl:inputBinding" | |
| 181 | |
| 182 | |
| 183 - type: record | |
| 184 name: ExpressionTool | |
| 185 extends: Process | |
| 186 specialize: | |
| 187 - specializeFrom: InputParameter | |
| 188 specializeTo: WorkflowInputParameter | |
| 189 - specializeFrom: OutputParameter | |
| 190 specializeTo: ExpressionToolOutputParameter | |
| 191 documentRoot: true | |
| 192 doc: | | |
| 193 An ExpressionTool is a type of Process object that can be run by itself | |
| 194 or as a Workflow step. It executes a pure Javascript expression that has | |
| 195 access to the same input parameters as a workflow. It is meant to be used | |
| 196 sparingly as a way to isolate complex Javascript expressions that need to | |
| 197 operate on input data and produce some result; perhaps just a | |
| 198 rearrangement of the inputs. No Docker software container is required | |
| 199 or allowed. | |
| 200 fields: | |
| 201 - name: class | |
| 202 jsonldPredicate: | |
| 203 "_id": "@type" | |
| 204 "_type": "@vocab" | |
| 205 type: string | |
| 206 - name: expression | |
| 207 type: Expression | |
| 208 doc: | | |
| 209 The expression to execute. The expression must return a JSON object which | |
| 210 matches the output parameters of the ExpressionTool. | |
| 211 | |
| 212 - name: LinkMergeMethod | |
| 213 type: enum | |
| 214 docParent: "#WorkflowStepInput" | |
| 215 doc: The input link merge method, described in [WorkflowStepInput](#WorkflowStepInput). | |
| 216 symbols: | |
| 217 - merge_nested | |
| 218 - merge_flattened | |
| 219 | |
| 220 | |
| 221 - name: WorkflowOutputParameter | |
| 222 type: record | |
| 223 extends: OutputParameter | |
| 224 docParent: "#Workflow" | |
| 225 doc: | | |
| 226 Describe an output parameter of a workflow. The parameter must be | |
| 227 connected to one or more parameters defined in the workflow that | |
| 228 will provide the value of the output parameter. It is legal to | |
| 229 connect a WorkflowInputParameter to a WorkflowOutputParameter. | |
| 230 fields: | |
| 231 - name: outputSource | |
| 232 doc: | | |
| 233 Specifies one or more workflow parameters that supply the value of to | |
| 234 the output parameter. | |
| 235 jsonldPredicate: | |
| 236 "_id": "cwl:outputSource" | |
| 237 "_type": "@id" | |
| 238 refScope: 0 | |
| 239 type: | |
| 240 - string? | |
| 241 - string[]? | |
| 242 - name: linkMerge | |
| 243 type: ["null", LinkMergeMethod] | |
| 244 jsonldPredicate: "cwl:linkMerge" | |
| 245 default: merge_nested | |
| 246 doc: | | |
| 247 The method to use to merge multiple sources into a single array. | |
| 248 If not specified, the default method is "merge_nested". | |
| 249 - name: type | |
| 250 type: | |
| 251 - CWLType | |
| 252 - OutputRecordSchema | |
| 253 - OutputEnumSchema | |
| 254 - OutputArraySchema | |
| 255 - string | |
| 256 - type: array | |
| 257 items: | |
| 258 - CWLType | |
| 259 - OutputRecordSchema | |
| 260 - OutputEnumSchema | |
| 261 - OutputArraySchema | |
| 262 - string | |
| 263 jsonldPredicate: | |
| 264 "_id": "sld:type" | |
| 265 "_type": "@vocab" | |
| 266 refScope: 2 | |
| 267 typeDSL: True | |
| 268 doc: | | |
| 269 Specify valid types of data that may be assigned to this parameter. | |
| 270 | |
| 271 | |
| 272 - name: Sink | |
| 273 type: record | |
| 274 abstract: true | |
| 275 fields: | |
| 276 - name: source | |
| 277 doc: | | |
| 278 Specifies one or more workflow parameters that will provide input to | |
| 279 the underlying step parameter. | |
| 280 jsonldPredicate: | |
| 281 "_id": "cwl:source" | |
| 282 "_type": "@id" | |
| 283 refScope: 2 | |
| 284 type: | |
| 285 - string? | |
| 286 - string[]? | |
| 287 - name: linkMerge | |
| 288 type: LinkMergeMethod? | |
| 289 jsonldPredicate: "cwl:linkMerge" | |
| 290 default: merge_nested | |
| 291 doc: | | |
| 292 The method to use to merge multiple inbound links into a single array. | |
| 293 If not specified, the default method is "merge_nested". | |
| 294 | |
| 295 | |
| 296 - type: record | |
| 297 name: WorkflowStepInput | |
| 298 extends: [Identified, Sink, LoadContents, Labeled] | |
| 299 docParent: "#WorkflowStep" | |
| 300 doc: | | |
| 301 The input of a workflow step connects an upstream parameter (from the | |
| 302 workflow inputs, or the outputs of other workflows steps) with the input | |
| 303 parameters of the process specified by the `run` field. Only input parameters | |
| 304 declared by the target process will be passed through at runtime to the process | |
| 305 though additonal parameters may be specified (for use within `valueFrom` | |
| 306 expressions for instance) - unconnected or unused parameters do not represent an | |
| 307 error condition. | |
| 308 | |
| 309 ## Input object | |
| 310 | |
| 311 A WorkflowStepInput object must contain an `id` field in the form | |
| 312 `#fieldname` or `#prefix/fieldname`. When the `id` field contains a slash | |
| 313 `/` the field name consists of the characters following the final slash | |
| 314 (the prefix portion may contain one or more slashes to indicate scope). | |
| 315 This defines a field of the workflow step input object with the value of | |
| 316 the `source` parameter(s). | |
| 317 | |
| 318 ## Merging | |
| 319 | |
| 320 To merge multiple inbound data links, | |
| 321 [MultipleInputFeatureRequirement](#MultipleInputFeatureRequirement) must be specified | |
| 322 in the workflow or workflow step requirements. | |
| 323 | |
| 324 If the sink parameter is an array, or named in a [workflow | |
| 325 scatter](#WorkflowStep) operation, there may be multiple inbound data links | |
| 326 listed in the `source` field. The values from the input links are merged | |
| 327 depending on the method specified in the `linkMerge` field. If not | |
| 328 specified, the default method is "merge_nested". | |
| 329 | |
| 330 * **merge_nested** | |
| 331 | |
| 332 The input must be an array consisting of exactly one entry for each | |
| 333 input link. If "merge_nested" is specified with a single link, the value | |
| 334 from the link must be wrapped in a single-item list. | |
| 335 | |
| 336 * **merge_flattened** | |
| 337 | |
| 338 1. The source and sink parameters must be compatible types, or the source | |
| 339 type must be compatible with single element from the "items" type of | |
| 340 the destination array parameter. | |
| 341 2. Source parameters which are arrays are concatenated. | |
| 342 Source parameters which are single element types are appended as | |
| 343 single elements. | |
| 344 | |
| 345 fields: | |
| 346 - name: default | |
| 347 type: ["null", Any] | |
| 348 doc: | | |
| 349 The default value for this parameter to use if either there is no | |
| 350 `source` field, or the value produced by the `source` is `null`. The | |
| 351 default must be applied prior to scattering or evaluating `valueFrom`. | |
| 352 jsonldPredicate: | |
| 353 _id: "sld:default" | |
| 354 noLinkCheck: true | |
| 355 - name: valueFrom | |
| 356 type: | |
| 357 - "null" | |
| 358 - string | |
| 359 - Expression | |
| 360 jsonldPredicate: "cwl:valueFrom" | |
| 361 doc: | | |
| 362 To use valueFrom, [StepInputExpressionRequirement](#StepInputExpressionRequirement) must | |
| 363 be specified in the workflow or workflow step requirements. | |
| 364 | |
| 365 If `valueFrom` is a constant string value, use this as the value for | |
| 366 this input parameter. | |
| 367 | |
| 368 If `valueFrom` is a parameter reference or expression, it must be | |
| 369 evaluated to yield the actual value to be assiged to the input field. | |
| 370 | |
| 371 The `self` value in the parameter reference or expression must be | |
| 372 1. `null` if there is no `source` field | |
| 373 2. the value of the parameter(s) specified in the `source` field when this | |
| 374 workflow input parameter **is not** specified in this workflow step's `scatter` field. | |
| 375 3. an element of the parameter specified in the `source` field when this workflow input | |
| 376 parameter **is** specified in this workflow step's `scatter` field. | |
| 377 | |
| 378 The value of `inputs` in the parameter reference or expression must be | |
| 379 the input object to the workflow step after assigning the `source` | |
| 380 values, applying `default`, and then scattering. The order of | |
| 381 evaluating `valueFrom` among step input parameters is undefined and the | |
| 382 result of evaluating `valueFrom` on a parameter must not be visible to | |
| 383 evaluation of `valueFrom` on other parameters. | |
| 384 | |
| 385 | |
| 386 - type: record | |
| 387 name: WorkflowStepOutput | |
| 388 docParent: "#WorkflowStep" | |
| 389 extends: Identified | |
| 390 doc: | | |
| 391 Associate an output parameter of the underlying process with a workflow | |
| 392 parameter. The workflow parameter (given in the `id` field) be may be used | |
| 393 as a `source` to connect with input parameters of other workflow steps, or | |
| 394 with an output parameter of the process. | |
| 395 | |
| 396 A unique identifier for this workflow output parameter. This is | |
| 397 the identifier to use in the `source` field of `WorkflowStepInput` | |
| 398 to connect the output value to downstream parameters. | |
| 399 | |
| 400 | |
| 401 - name: ScatterMethod | |
| 402 type: enum | |
| 403 docParent: "#WorkflowStep" | |
| 404 doc: The scatter method, as described in [workflow step scatter](#WorkflowStep). | |
| 405 symbols: | |
| 406 - dotproduct | |
| 407 - nested_crossproduct | |
| 408 - flat_crossproduct | |
| 409 | |
| 410 | |
| 411 - name: WorkflowStep | |
| 412 type: record | |
| 413 extends: [Identified, Labeled, sld:Documented] | |
| 414 docParent: "#Workflow" | |
| 415 doc: | | |
| 416 A workflow step is an executable element of a workflow. It specifies the | |
| 417 underlying process implementation (such as `CommandLineTool` or another | |
| 418 `Workflow`) in the `run` field and connects the input and output parameters | |
| 419 of the underlying process to workflow parameters. | |
| 420 | |
| 421 # Scatter/gather | |
| 422 | |
| 423 To use scatter/gather, | |
| 424 [ScatterFeatureRequirement](#ScatterFeatureRequirement) must be specified | |
| 425 in the workflow or workflow step requirements. | |
| 426 | |
| 427 A "scatter" operation specifies that the associated workflow step or | |
| 428 subworkflow should execute separately over a list of input elements. Each | |
| 429 job making up a scatter operation is independent and may be executed | |
| 430 concurrently. | |
| 431 | |
| 432 The `scatter` field specifies one or more input parameters which will be | |
| 433 scattered. An input parameter may be listed more than once. The declared | |
| 434 type of each input parameter is implicitly becomes an array of items of the | |
| 435 input parameter type. If a parameter is listed more than once, it becomes | |
| 436 a nested array. As a result, upstream parameters which are connected to | |
| 437 scattered parameters must be arrays. | |
| 438 | |
| 439 All output parameter types are also implicitly wrapped in arrays. Each job | |
| 440 in the scatter results in an entry in the output array. | |
| 441 | |
| 442 If any scattered parameter runtime value is an empty array, all outputs are | |
| 443 set to empty arrays and no work is done for the step, according to | |
| 444 applicable scattering rules. | |
| 445 | |
| 446 If `scatter` declares more than one input parameter, `scatterMethod` | |
| 447 describes how to decompose the input into a discrete set of jobs. | |
| 448 | |
| 449 * **dotproduct** specifies that each of the input arrays are aligned and one | |
| 450 element taken from each array to construct each job. It is an error | |
| 451 if all input arrays are not the same length. | |
| 452 | |
| 453 * **nested_crossproduct** specifies the Cartesian product of the inputs, | |
| 454 producing a job for every combination of the scattered inputs. The | |
| 455 output must be nested arrays for each level of scattering, in the | |
| 456 order that the input arrays are listed in the `scatter` field. | |
| 457 | |
| 458 * **flat_crossproduct** specifies the Cartesian product of the inputs, | |
| 459 producing a job for every combination of the scattered inputs. The | |
| 460 output arrays must be flattened to a single level, but otherwise listed in the | |
| 461 order that the input arrays are listed in the `scatter` field. | |
| 462 | |
| 463 # Subworkflows | |
| 464 | |
| 465 To specify a nested workflow as part of a workflow step, | |
| 466 [SubworkflowFeatureRequirement](#SubworkflowFeatureRequirement) must be | |
| 467 specified in the workflow or workflow step requirements. | |
| 468 | |
| 469 It is a fatal error if a workflow directly or indirectly invokes itself as | |
| 470 a subworkflow (recursive workflows are not allowed). | |
| 471 | |
| 472 fields: | |
| 473 - name: in | |
| 474 type: WorkflowStepInput[] | |
| 475 jsonldPredicate: | |
| 476 _id: "cwl:in" | |
| 477 mapSubject: id | |
| 478 mapPredicate: source | |
| 479 doc: | | |
| 480 Defines the input parameters of the workflow step. The process is ready to | |
| 481 run when all required input parameters are associated with concrete | |
| 482 values. Input parameters include a schema for each parameter which is | |
| 483 used to validate the input object. It may also be used build a user | |
| 484 interface for constructing the input object. | |
| 485 - name: out | |
| 486 type: | |
| 487 - type: array | |
| 488 items: [string, WorkflowStepOutput] | |
| 489 jsonldPredicate: | |
| 490 _id: "cwl:out" | |
| 491 _type: "@id" | |
| 492 identity: true | |
| 493 doc: | | |
| 494 Defines the parameters representing the output of the process. May be | |
| 495 used to generate and/or validate the output object. | |
| 496 - name: requirements | |
| 497 type: ProcessRequirement[]? | |
| 498 jsonldPredicate: | |
| 499 _id: "cwl:requirements" | |
| 500 mapSubject: class | |
| 501 doc: | | |
| 502 Declares requirements that apply to either the runtime environment or the | |
| 503 workflow engine that must be met in order to execute this workflow step. If | |
| 504 an implementation cannot satisfy all requirements, or a requirement is | |
| 505 listed which is not recognized by the implementation, it is a fatal | |
| 506 error and the implementation must not attempt to run the process, | |
| 507 unless overridden at user option. | |
| 508 - name: hints | |
| 509 type: Any[]? | |
| 510 jsonldPredicate: | |
| 511 _id: "cwl:hints" | |
| 512 noLinkCheck: true | |
| 513 mapSubject: class | |
| 514 doc: | | |
| 515 Declares hints applying to either the runtime environment or the | |
| 516 workflow engine that may be helpful in executing this workflow step. It is | |
| 517 not an error if an implementation cannot satisfy all hints, however | |
| 518 the implementation may report a warning. | |
| 519 - name: run | |
| 520 type: [string, Process] | |
| 521 jsonldPredicate: | |
| 522 _id: "cwl:run" | |
| 523 _type: "@id" | |
| 524 subscope: run | |
| 525 doc: | | |
| 526 Specifies the process to run. | |
| 527 - name: scatter | |
| 528 type: | |
| 529 - string? | |
| 530 - string[]? | |
| 531 jsonldPredicate: | |
| 532 "_id": "cwl:scatter" | |
| 533 "_type": "@id" | |
| 534 "_container": "@list" | |
| 535 refScope: 0 | |
| 536 - name: scatterMethod | |
| 537 doc: | | |
| 538 Required if `scatter` is an array of more than one element. | |
| 539 type: ScatterMethod? | |
| 540 jsonldPredicate: | |
| 541 "_id": "cwl:scatterMethod" | |
| 542 "_type": "@vocab" | |
| 543 | |
| 544 | |
| 545 - name: Workflow | |
| 546 type: record | |
| 547 extends: "#Process" | |
| 548 documentRoot: true | |
| 549 specialize: | |
| 550 - specializeFrom: InputParameter | |
| 551 specializeTo: WorkflowInputParameter | |
| 552 - specializeFrom: OutputParameter | |
| 553 specializeTo: WorkflowOutputParameter | |
| 554 doc: | | |
| 555 A workflow describes a set of **steps** and the **dependencies** between | |
| 556 those steps. When a step produces output that will be consumed by a | |
| 557 second step, the first step is a dependency of the second step. | |
| 558 | |
| 559 When there is a dependency, the workflow engine must execute the preceeding | |
| 560 step and wait for it to successfully produce output before executing the | |
| 561 dependent step. If two steps are defined in the workflow graph that | |
| 562 are not directly or indirectly dependent, these steps are **independent**, | |
| 563 and may execute in any order or execute concurrently. A workflow is | |
| 564 complete when all steps have been executed. | |
| 565 | |
| 566 Dependencies between parameters are expressed using the `source` field on | |
| 567 [workflow step input parameters](#WorkflowStepInput) and [workflow output | |
| 568 parameters](#WorkflowOutputParameter). | |
| 569 | |
| 570 The `source` field expresses the dependency of one parameter on another | |
| 571 such that when a value is associated with the parameter specified by | |
| 572 `source`, that value is propagated to the destination parameter. When all | |
| 573 data links inbound to a given step are fufilled, the step is ready to | |
| 574 execute. | |
| 575 | |
| 576 ## Workflow success and failure | |
| 577 | |
| 578 A completed step must result in one of `success`, `temporaryFailure` or | |
| 579 `permanentFailure` states. An implementation may choose to retry a step | |
| 580 execution which resulted in `temporaryFailure`. An implementation may | |
| 581 choose to either continue running other steps of a workflow, or terminate | |
| 582 immediately upon `permanentFailure`. | |
| 583 | |
| 584 * If any step of a workflow execution results in `permanentFailure`, then | |
| 585 the workflow status is `permanentFailure`. | |
| 586 | |
| 587 * If one or more steps result in `temporaryFailure` and all other steps | |
| 588 complete `success` or are not executed, then the workflow status is | |
| 589 `temporaryFailure`. | |
| 590 | |
| 591 * If all workflow steps are executed and complete with `success`, then the | |
| 592 workflow status is `success`. | |
| 593 | |
| 594 # Extensions | |
| 595 | |
| 596 [ScatterFeatureRequirement](#ScatterFeatureRequirement) and | |
| 597 [SubworkflowFeatureRequirement](#SubworkflowFeatureRequirement) are | |
| 598 available as standard [extensions](#Extensions_and_Metadata) to core | |
| 599 workflow semantics. | |
| 600 | |
| 601 fields: | |
| 602 - name: "class" | |
| 603 jsonldPredicate: | |
| 604 "_id": "@type" | |
| 605 "_type": "@vocab" | |
| 606 type: string | |
| 607 - name: steps | |
| 608 doc: | | |
| 609 The individual steps that make up the workflow. Each step is executed when all of its | |
| 610 input data links are fufilled. An implementation may choose to execute | |
| 611 the steps in a different order than listed and/or execute steps | |
| 612 concurrently, provided that dependencies between steps are met. | |
| 613 type: | |
| 614 - type: array | |
| 615 items: "#WorkflowStep" | |
| 616 jsonldPredicate: | |
| 617 mapSubject: id | |
| 618 | |
| 619 | |
| 620 - type: record | |
| 621 name: SubworkflowFeatureRequirement | |
| 622 extends: ProcessRequirement | |
| 623 doc: | | |
| 624 Indicates that the workflow platform must support nested workflows in | |
| 625 the `run` field of [WorkflowStep](#WorkflowStep). | |
| 626 fields: | |
| 627 - name: "class" | |
| 628 type: "string" | |
| 629 doc: "Always 'SubworkflowFeatureRequirement'" | |
| 630 jsonldPredicate: | |
| 631 "_id": "@type" | |
| 632 "_type": "@vocab" | |
| 633 | |
| 634 - name: ScatterFeatureRequirement | |
| 635 type: record | |
| 636 extends: ProcessRequirement | |
| 637 doc: | | |
| 638 Indicates that the workflow platform must support the `scatter` and | |
| 639 `scatterMethod` fields of [WorkflowStep](#WorkflowStep). | |
| 640 fields: | |
| 641 - name: "class" | |
| 642 type: "string" | |
| 643 doc: "Always 'ScatterFeatureRequirement'" | |
| 644 jsonldPredicate: | |
| 645 "_id": "@type" | |
| 646 "_type": "@vocab" | |
| 647 | |
| 648 - name: MultipleInputFeatureRequirement | |
| 649 type: record | |
| 650 extends: ProcessRequirement | |
| 651 doc: | | |
| 652 Indicates that the workflow platform must support multiple inbound data links | |
| 653 listed in the `source` field of [WorkflowStepInput](#WorkflowStepInput). | |
| 654 fields: | |
| 655 - name: "class" | |
| 656 type: "string" | |
| 657 doc: "Always 'MultipleInputFeatureRequirement'" | |
| 658 jsonldPredicate: | |
| 659 "_id": "@type" | |
| 660 "_type": "@vocab" | |
| 661 | |
| 662 - type: record | |
| 663 name: StepInputExpressionRequirement | |
| 664 extends: ProcessRequirement | |
| 665 doc: | | |
| 666 Indicate that the workflow platform must support the `valueFrom` field | |
| 667 of [WorkflowStepInput](#WorkflowStepInput). | |
| 668 fields: | |
| 669 - name: "class" | |
| 670 type: "string" | |
| 671 doc: "Always 'StepInputExpressionRequirement'" | |
| 672 jsonldPredicate: | |
| 673 "_id": "@type" | |
| 674 "_type": "@vocab" |
