Standard Workflow steps are colored purple and are used to trigger the scripts that make up predictive models.
They are configured to refer to specific repositories where scripts are stored and the specific Docker images that are used to create environments where scripts can be executed.
This article describes how to configure a Standard Step in a Workflow.
- Selecting a Standard Step
- Step Configuration
- Advanced Configuration
Selecting a Standard Step
When creating or editing a workflow, click the 'Plus' icon and choose Standard Step.
Complete the required fields and then click Save:
Enter what you want to name the step.
Only alphanumeric characters and a hyphen are allowed.
Repository URL (optional)
This is the URL for the repository where your script is stored.
Repository Branch (optional)
This is the branch of the repository where your script is stored.
If a token is required to access the repository, enter its name here.
Tokens can be generated and added from Console > Access Tokens.
Choose the required container image.
Images can be created and edited from Factory > Image Management.
Pull image on every run
Check this box to make sure that Peak uses your rebuilt image and not an internal cache.
Shell path (Optional)
If required, enter the shell path.
Step timeout (Optional)
This is the timeout time for the step, measured in seconds.
Steps will not timeout unless a time is specified.
Instance size and storage
This enables you to specify the container instance size that is used by the step and the maximum amount of storage space allocated to the step's instance. The default storage space is 10GB.
Storage allocation is managed by Tenant Admins.
This lists all of the other steps within the workflow.
Select any steps that must be successfully run before this step can run.
These options enable you to add parameters into your workflows and to pass parameters between them.
To add an input parameter for your workflow step:
- Click ADD.
- Choose a name for your parameter.
This will be the name you use in your code.
Up to 36 alphanumeric characters are allowed.
You can access the value of this parameter in your code as an environment variable.
- Choose the Value Type:
Use this when you want to hardcode a value for use in your workflow, for example an API key.
Use this when you want to pass a variable from a parent step in the workflow.
For example, if you want what happens in the second step to depend on a value calculated by the first step (this will come from an output parameter).
- Assign a value
Enter the value that you want to assign.
For example, copying an API key from Administration > Access Tokens
Choose from a drop down list of the output parameters from the previous step.
To configure your output parameters:
- In the code that will be run in the step, write the value you want to pass on to a text file.
For example, in python this will pass on the value of the variable include_ga_data into the includega.txt file:
with open("includega.txt", "w") as file:
- In the Output Parameters Name field, enter a suitable name for the output parameter.
- Write the file name (including the extension) from your code into the Value From field.
If you have multiple values to pass between steps, it is safest to create separate files for each one.