-
Notifications
You must be signed in to change notification settings - Fork 0
Accessing files
Workflow Steps are simply Jobs. Steps, like Jobs, run is a subdirectory of a Project. Neither Jobs nor Steps have general access to Project files.
If a step needs to access Project files, or files generated by other steps it declares this need in the step's Plumbing.
If a Step needs to access a Project file it must make two declarations. The Workflow must declare a Workflow Variable that is an input. When a user runs the Workflow there are then forced to provide a value for the input - a file in the Project volume. Secondly, any Step that wishes to use this file needs to declare it in their plumbing. Here's an example of a Workflow variable declaring a Project file as an inout: -
variables:
inputs:
type: object
properties:
candidateMolecules:
title: Molecules
type: file
When the user runs the workflow they will be required to provide a value for the variable candidateMolecules, a file in the Project.
So, that declares a file in the Project, how does a Step use that file? It declares this in its Plumbing, illustrated below.
step:
- name: step-1
plumbing:
- variable: outputFile
from-workflow:
variable: outputFile