Skip to main content
You will build a small workflow in the BlobHub web app and send it a message from a playground. Then you will find the run in the debugger, where every run is recorded, commit what you built, and run it again from Python and from a terminal.

Before you start

  • A Google account. You sign in with Google to create anything. Without signing in, the web app gives you a shared, read-only identity that can look at public content and create nothing.
  • The demo organization, Acme (acme-corp), a fictional outdoor-equipment manufacturer, if you want to see finished workflows, runs and apps first. It is public, so you can look around without signing in.
  • An organization of your own for everything you create. You make it in the second step below.

Build and run a workflow

1

Sign in

Open blobhub.io and sign in with Google. Your profile is created the first time you sign in.
2

Create an organization

On your profile’s Organizations tab, choose New (the page is /p/<you>/org/create). Give the organization an alias of your own: six to 42 characters of lower-case letters, digits, - and _, unique across BlobHub. acme-corp is taken by the demo. Pick a visibility and choose Create Organization. The alias is part of every URL inside the organization.
3

Create a workflow

In your organization, choose New (the page is /<org>/blob/create). Give the workflow an alias such as hello-workflow, pick the type Workflow (blobhub.compute.workflow) and choose Create Blob.In BlobHub’s terms you have created a blob of type Workflow, and its first revision is a draft: the one version you can edit and run. How BlobHub works explains both words.
4

Build a definition

The Workflows tab opens the editor on a definition named default, created for you. From the palette, add a Flow Start, a Code component and a Flow End (flow.start, logic.code and flow.end in the components reference) and connect them in that order. The code component’s Python can stay as it is: with no set_result call, it takes the first route connected to it.Add a Message component (data.message) too, with the alias question and its persistence set to Execution, so in each run it holds the value that run was started with. The chat in the next step starts every run with what you type, under this alias. Save changes to store the definition in the draft.
5

Run it from a playground

Open the Playgrounds tab. Its first playground, default, is created for you, and New Playground in its menu adds more. From the palette, add a Chat widget and set two of its ports: send_message_workflow to default, the definition it runs, and user_input to question, the component that receives your message. Save changes.Choose New Session from the session menu, then type a message into the chat and send it. The chat starts a run in that session and shows its status, from Workflow is running… to Workflow execution completed.
The triage-inbox playground: threads of tickets, replies and holds after real runsThe triage-inbox playground: threads of tickets, replies and holds after real runs

A playground shows a session's threads as runs fill them.

The picture is the demo organization’s triage-inbox playground, where workflows post tickets and replies to threads that its widgets display. Yours has one chat widget so far.
6

Find the run in the debugger

Choose Open in Debugger on the chat, or open the Debugger tab. It lists the draft’s sessions and each session’s executions. For one execution it shows the graph the run used beside the events the run recorded as it passed through each component.
The debugger on one execution: the graph it ran and its event listThe debugger on one execution: the graph it ran and its event list

Every run is in the debugger, drawn from the definition it actually ran.

Debugger covers the rest of what it shows.
7

Commit the draft

On the Revisions tab, choose Commit. Committing freezes the draft, its content and its runtime alike: the session you used is closed with it, along with any run still going in it. Its definitions can still be run, but only from a session of a draft.
The Revisions tab with the commit dialog open on the draftThe Revisions tab with the commit dialog open on the draft

Committing freezes the draft; a new draft is branched when you want to keep editing.

Committing does not create a new draft. New on the same tab branches one from the committed revision, copying its definitions, when you want to keep editing; Create Revision is the same operation in the API.

The same from Python

Install the SDK and give it an API key. Create a key with the Write role under API Keys in your profile’s settings, then export it as BLOBHUB_API_KEY, or store it as a profile with blobhub login from the CLI below.
The revision you just committed no longer runs, so start a new draft from it and run your definition there:
execute creates a new session for the run unless you name one. See Workflow for sessions, input data and events, and the Python SDK for the rest of what it covers, or call the REST API from any language.

The same from a terminal

The CLI keeps a workflow in your repository. Install it and store your key:
A manifest names the workflow, its revision, and the definitions you keep as files:
manifest.yaml
Pull the definition into its file, edit it, deploy the edit, and run it:
deploy writes to a draft. The Python step made one; if you skipped it, choose New on the Revisions tab first. execute prints the run’s debugger URL, and --watch follows its events until it ends, for up to fifteen minutes. The workflow overview covers what the CLI is for: building a code component from an ordinary Python package in your repository.

What you just built

Your organization owns the workflow. You edit and run it in its draft, each run happens in a session of that draft, and each run leaves its events on the record. A schedule starts the same kind of run on a timer, or posts a thread item or writes an object in a session, as Schedules explains. A model is versioned the same way without running anything.

How BlobHub works

Organizations, blobs, types and revisions.

Workflows

What a definition is made of, and how it runs.

Debugger

Every run, read back from its record.