PRODUCT · WORKFLOWS

Ordered steps that carry state.

A workflow is a JSON file in .jetic/workflows. Each step calls an endpoint, can capture values from the request or response, and can inject them into later steps. The runner executes the list in order — no model decides what happens mid-run.

CaptureInjectConditionsRetry
.jetic/workflows/user-onboarding.json
{ "name": "User onboarding", "steps": [
{ "name": "1. Register", "method": "POST", "path": "/api/users",
"expectStatus": 201,
"body": { "email": "{{faker.internet.email}}" },
"captureInput": { "workflow:email": "email" } },
{ "name": "2. Log in", "method": "POST", "path": "/api/auth/login",
"body": { "email": "{{workflow:email}}" },
"capture": { "workflow:accessToken": "data.tokens.access" } },
{ "name": "3. Create order", "method": "POST", "path": "/api/orders",
"inject": { "header:Authorization": "Bearer {{workflow:accessToken}}" } }
] }
Same file in · same sequence out

STEP PRIMITIVES

Small verbs, expressive journeys.

Every behavior is declared in the file. There is no hidden orchestration layer and no prompt in the execution path.

01Step

Request

Method, path, body, query, and headers addressed through the model.

02Memory

Capture

Save response fields under a workflow key using dot-notation paths.

03Memory

Capture input

Remember generated body fields before the request is sent.

04Memory

Inject

Send a captured value as a header or into a later request body.

05Flow

Conditions

Evaluate rules after a step and abort, continue, or switch workflows.

06Flow

Retry / status

Retry transient failures and treat expected non-2xx codes as passes.

MEMORY

The login token becomes the next header.

Captured values live in workflow memory and are read by later steps as {{workflow:key}}. That is how a generated email, a workspace ID, or an access token survives the whole journey without shell glue.

  • Capture response fields with dot notation
  • Capture request fields before the call
  • Inject into headers, body fields, or path params
  • Clear memory between runs when isolation matters
.jetic/memory.json
workflow:userEmail user_8f9a@example.com
workflow:accessToken eyJhbGciOi…
workflow:orderId ord_7Q2x
→ GET /api/orders/{{workflow:orderId}}
→ Authorization: Bearer {{workflow:accessToken}}

FAILURE HANDLING

Decide the edges before the run.

01

Expected status

Each step declares its status. Any 2xx passes when a 2xx is expected.

expectStatus: 201
02

Continue on status

Treat 404 or 409 as an expected outcome for negative tests.

continueOnStatus: [409]
03

On failure

Abort the run, or continue and skip that step's captures.

onFailure: continue
04

Retry

Retry up to five times with a configurable delay per step or run.

retry: { times, delayMs }

FLOW CONTROL

Conditions that actually steer the run.

ShapeWhen it runsWhat it can do
rules.all / rules.anyAfter the stepAND / OR checks over captured values; onFail abort, continue, or switch.
Legacy if guardBefore the stepSkip just that step when the value does not match.
switchToWorkflowOn a failed conditionRun another saved workflow, optionally returning afterwards.
retryOn failureRetry the step before the workflow-level failure policy applies.

NEXT

Run it, keep it, inspect it.

WORKFLOW FAQ

Frequently asked questions

Is a workflow deterministic?

Yes. The runner walks the JSON steps in order and checks each expectation. Conditions, retries, and failure modes are all written in the file — no model decides the path at execution time.

Can steps run in parallel?

Workflows are ordered journeys. Stateful sequences are the primary model; independent checks can live in separate workflows and run in parallel from CI.

Where do generated values come from?

Templates support faker expressions, workflow memory, human input for truly unknowable values, and scoped values. Generated values can be remembered with captureInput.

Do I need to save a workflow to run it?

You can validate an inline definition without saving. Saved workflows live in .jetic/workflows and are what the CLI, Studio, and CI execute.

Write the journey once.

Capture the token, reuse the generated email, and replay the same ordered steps tomorrow. No shell glue required.

Open the workflow guide