Design workflows
Create a workflow
How to create an Arazzo file, add workflows to it, and name and describe each one.
Every workflow lives in an Arazzo file inside a collection. This page shows how to create that file, how to add more workflows to it, and how to give each one a name and a description.
Example: the Pokédex file
Section titled “Example: the Pokédex file”The Pokédex collection has one Arazzo file with four workflows. It points to the contracts it uses.
- pokemon.arazzo.yaml the file with the four workflows
- pokeapi.openapi.yaml
- pokedex-events.asyncapi.yaml
sourceDescriptions: - name: pokeapi url: ./pokeapi.openapi.yaml type: openapiworkflows: - workflowId: pokemonCard summary: Pokemon card steps: - stepId: getPokemon # ...sourceDescriptions lists the contracts. Each item of workflows is one workflow, with its workflowId, its summary and its steps.
What an Arazzo file is
Section titled “What an Arazzo file is”Arazzo is an open standard of the OpenAPI Initiative for describing sequences of API calls. An Arazzo file is a text file in your collection, for example pokemon.arazzo.yaml, with two things inside:
- The list of contracts it uses (the OpenAPI and AsyncAPI files of your APIs).
- One or more workflows built from the operations of those contracts.
You do not need to read or write this file. The Design tab edits it for you, and the YAML tab shows it when you want to look.
One file can hold several workflows. The Pokédex example has one file with four: Pokemon card, Type explorer, Battle matchup and Register sighting.
Create a new Arazzo file
Section titled “Create a new Arazzo file”You need an open collection.
- Click + (Create or import) to the right of the open tabs.
- Choose New Arazzo.
Luvin creates the file new.arazzo.yaml in the collection, adds the contracts of the collection to it, and opens its first workflow, My workflow, in the Design tab. The canvas is empty and says Drag the first operation here.
If a file with that name already exists, the new one is called new-2.arazzo.yaml, and so on.
Add a workflow to an existing file
Section titled “Add a workflow to an existing file”- Open any workflow of that file and go to the Design tab.
- Click + Workflow in the toolbar above the canvas.
A new, empty workflow called New workflow is added to the same file and opens in the Design tab. It also appears in the sidebar, under the file.
The + next to the tabs offers the same action as New workflow in this file.
Name and describe a workflow
Section titled “Name and describe a workflow”The name and the description are at the top of the workflow, to the left of the Run button.
Change the name
Section titled “Change the name”- Click the name. It becomes a text field.
- Type the new name.
- Press Enter. Press Esc to cancel.
While you type, a line below shows id in the Arazzo: followed by an identifier, for example battleMatchup for “Battle matchup”. The id is your name without spaces, accents or symbols. It is what the file uses to refer to the workflow; the sidebar and the tabs keep showing the name as you wrote it.
| Message | What to do |
|---|---|
| Type a name with at least one letter or number. | The name only had spaces or symbols. Add a letter or a number. |
| There is already a workflow «…» in this file. | Another workflow of the file has that id. Choose a different name. |
Renaming is safe. Luvin updates everything in the file that points to the workflow: the workflows that depend on it, the steps that call it and the values that read its outputs. Its cases stay with it.
Change the description
Section titled “Change the description”- Click the text below the name. If the workflow has no description, it says Add a short description.
- Type one sentence that says what the workflow does, for example “Creates an order and reads it back”.
- Press Enter.
A new workflow starts with the placeholder Describe here what this workflow does. Replace it: the description is shown next to the workflow’s name wherever another workflow picks it, such as the Workflows in this Arazzo list of the palette.
What you have now
Section titled “What you have now”An empty workflow has two cards on the canvas: Start, which says No inputs yet: they appear on their own when a step needs data nobody provides, and End of workflow. The steps go between them.