Skip to content

Workflow DSL Reference

Triggerfish இன் workflow engine இல் implemented CNCF Serverless Workflow DSL 1.0 க்கான complete reference. Usage guide மற்றும் examples க்கு Workflows பாருங்கள்.

Document Structure

ஒவ்வொரு workflow YAML உம் top-level document field மற்றும் do block கொண்டிருக்க வேண்டும்.

yaml
document:
  dsl: "1.0"
  namespace: my-namespace
  name: my-workflow
  version: "1.0.0"            # optional
  description: "What it does"  # optional
classification_ceiling: INTERNAL  # optional
input:                            # optional
  from: "${ . }"
output:                           # optional
  from:
    result: "${ .final_step }"
timeout:                          # optional
  after: PT5M
do:
  - task_name:
      # task definition

Document Metadata

FieldTypeRequiredவிளக்கம்
dslstringஆம்DSL version. "1.0" ஆக இருக்க வேண்டும்
namespacestringஆம்Logical grouping (உதா., ops, reports)
namestringஆம்Namespace இல் Unique workflow name
versionstringஇல்லைSemantic version string
descriptionstringஇல்லைHuman-readable description

Top-Level Fields

FieldTypeRequiredவிளக்கம்
documentobjectஆம்Document metadata (மேலே பாருங்கள்)
doarrayஆம்Ordered list of task entries
classification_ceilingstringஇல்லைExecution போது maximum allowed session taint
inputtransformஇல்லைWorkflow input க்கு applied Transform
outputtransformஇல்லைWorkflow output க்கு applied Transform
timeoutobjectஇல்லைWorkflow-level timeout (after: <ISO 8601>)
metadataobjectஇல்லைArbitrary key-value metadata

Task Entry Format

do block இல் ஒவ்வொரு entry உம் single-key object. Key task name, value task definition.

yaml
do:
  - my_task_name:
      call: http
      with:
        endpoint: "https://example.com"

Task names அதே do block இல் unique ஆக இருக்க வேண்டும். Task result task name இல் data context இல் stored ஆகிறது.


Common Task Fields

அனைத்து task types உம் இந்த optional fields share செய்கின்றன:

FieldTypeவிளக்கம்
ifstringExpression condition. Falsy ஆகும்போது task skip.
inputtransformTask execution க்கு முன்பு applied Transform
outputtransformTask execution க்கு பிறகு applied Transform
timeoutobjectTask timeout: after: <ISO 8601 duration>
thenstringFlow directive: continue, end, அல்லது task name
metadataobjectArbitrary key-value metadata. Self-healing enabled ஆகும்போது description, expects, produces தேவை.

Self-Healing Configuration

metadata.triggerfish.self_healing block workflow க்கு autonomous healing agent enable செய்கிறது. Full guide க்கு Self-Healing பாருங்கள்.

yaml
metadata:
  triggerfish:
    self_healing:
      enabled: true
      retry_budget: 3
      approval_required: true
      pause_on_intervention: blocking_only
      pause_timeout_seconds: 300
      pause_timeout_policy: escalate_and_halt
      notify_on: [intervention, escalation, approval_required]
FieldTypeRequiredDefaultவிளக்கம்
enabledbooleanஆம்Healing agent enable செய்யவும்
retry_budgetnumberஇல்லை3Max intervention attempts
approval_requiredbooleanஇல்லைtrueFixes க்கு human approval தேவை
pause_on_interventionstringஇல்லை"blocking_only"always | never | blocking_only
pause_timeout_secondsnumberஇல்லை300Timeout policy fire ஆவதற்கு முன்பு Seconds
pause_timeout_policystringஇல்லை"escalate_and_halt"escalate_and_halt | escalate_and_skip | escalate_and_fail
notify_onarrayஇல்லை[]intervention | escalation | approval_required

Step Metadata (Self-Healing Enabled ஆகும்போது Required)

self_healing.enabled true ஆகும்போது, ஒவ்வொரு task உம் இந்த metadata fields சேர்க்க வேண்டும். Parser இவற்றில் ஏதாவது missing workflow reject செய்கிறது.

FieldTypeவிளக்கம்
descriptionstringStep என்ன செய்கிறது மற்றும் ஏன்
expectsstringInput shape அல்லது preconditions தேவை
producesstringGenerated output shape
yaml
- fetch-invoices:
    call: http
    with:
      endpoint: "https://api.example.com/invoices"
    metadata:
      description: "Fetch open invoices from billing API"
      expects: "API available, returns JSON array"
      produces: "Array of {id, amount, status} objects"

Task Types

call

HTTP endpoint அல்லது Triggerfish service க்கு Dispatch செய்யவும்.

FieldTypeRequiredவிளக்கம்
callstringஆம்Call type (கீழே dispatch table பாருங்கள்)
withobjectஇல்லைTarget tool க்கு passed Arguments
yaml
- fetch:
    call: http
    with:
      endpoint: "https://api.example.com/data"
      method: GET

run

Shell command, inline script, அல்லது sub-workflow execute செய்யவும். run field shell, script, அல்லது workflow இல் exactly ஒன்று contain செய்ய வேண்டும்.

Shell:

FieldTypeRequiredவிளக்கம்
run.shell.commandstringஆம்Execute செய்ய Shell command
run.shell.argumentsobjectஇல்லைNamed arguments
run.shell.environmentobjectஇல்லைEnvironment variables

Script:

FieldTypeRequiredவிளக்கம்
run.script.languagestringஆம்Script language
run.script.codestringஆம்Inline script code
run.script.argumentsobjectஇல்லைNamed arguments

Sub-workflow:

FieldTypeRequiredவிளக்கம்
run.workflow.namestringஆம்Saved workflow இன் Name
run.workflow.versionstringஇல்லைVersion constraint
run.workflow.inputobjectஇல்லைSub-workflow க்கான Input data

set

Data context க்கு values assign செய்யவும்.

FieldTypeRequiredவிளக்கம்
setobjectஆம்Assign செய்ய Key-value pairs. Values expressions ஆக இருக்கலாம்.
yaml
- prepare:
    set:
      full_name: "${ .first_name } ${ .last_name }"
      count: 0

switch

Conditional branching. switch field case entries இன் array. ஒவ்வொரு case உம் key case name ஆக உள்ள single-key object.

Case fieldTypeRequiredவிளக்கம்
whenstringஇல்லைExpression condition. Default case க்கு omit.
thenstringஆம்Flow directive: continue, end, அல்லது task name

Cases order இல் evaluated. First truthy when (அல்லது when இல்லை) case taken.

yaml
- route:
    switch:
      - high:
          when: "${ .priority > 7 }"
          then: alert_team
      - low:
          then: log_only

for

Collection மீது iterate செய்யவும்.

FieldTypeRequiredவிளக்கம்
for.eachstringஆம்Current item க்கான Variable name
for.instringஆம்Collection reference செய்யும் Expression
for.atstringஇல்லைCurrent index க்கான Variable name
doarrayஆம்ஒவ்வொரு iteration க்கும் executed nested task list
yaml
- process_all:
    for:
      each: item
      in: "${ .items }"
      at: idx
    do:
      - handle:
          call: triggerfish:llm
          with:
            task: "Process item ${ .idx }: ${ .item.name }"

raise

Structured error உடன் workflow halt செய்யவும்.

FieldTypeRequiredவிளக்கம்
raise.error.statusnumberஆம்HTTP-style status code
raise.error.typestringஆம்Error type URI/string
raise.error.titlestringஆம்Human-readable title
raise.error.detailstringஇல்லைDetailed error message
yaml
- abort:
    raise:
      error:
        status: 422
        type: "validation-error"
        title: "Invalid input"
        detail: "Field 'email' is required"

emit

Workflow event record செய்யவும். Events run result இல் stored ஆகின்றன.

FieldTypeRequiredவிளக்கம்
emit.event.typestringஆம்Event type identifier
emit.event.sourcestringஇல்லைEvent source URI
emit.event.dataobjectஇல்லைEvent payload
yaml
- record:
    emit:
      event:
        type: "step.completed"
        source: "workflow/pipeline"
        data:
          step: "transform"
          duration_ms: 1200

wait

Execution ஒரு duration க்கு pause செய்யவும்.

FieldTypeRequiredவிளக்கம்
waitstringஆம்ISO 8601 duration (உதா., PT5S)

Common durations: PT1S (1 second), PT30S (30 seconds), PT1M (1 minute), PT5M (5 minutes).


Call Dispatch Table

call field value ஐ actually invoked ஆகும் Triggerfish tool க்கு maps செய்கிறது.

call valueTool invokedRequired with: fields
httpweb_fetchendpoint அல்லது url; optional method, headers, body
triggerfish:llmllm_taskprompt அல்லது task; optional tools, max_iterations
triggerfish:agentsubagentprompt அல்லது task; optional tools, agent
triggerfish:memorymemory_*operation (save/search/get/list/delete) + operation fields
triggerfish:web_searchweb_searchquery; optional max_results
triggerfish:web_fetchweb_fetchurl; optional method, headers, body
triggerfish:mcpmcp__<server>__<tool>server, tool; optional arguments
triggerfish:messagesend_messagechannel, text; optional recipient

Unsupported CNCF call types (grpc, openapi, asyncapi) error return செய்கின்றன.


Expression Syntax

Expressions ${ } மூலம் delimited மற்றும் workflow data context க்கு எதிராக resolve ஆகின்றன.

Dot-Path Resolution

Syntaxவிளக்கம்Example result
${ . }Entire data context{...}
${ .key }Top-level key"value"
${ .a.b.c }Nested key"deep value"
${ .items[0] }Array index{...first item...}
${ .items[0].name }Array index then key"first"

Leading dot (அல்லது $.) path ஐ context root இல் anchor செய்கிறது. undefined க்கு resolve ஆகும் paths interpolated ஆகும்போது empty string produce செய்கின்றன, அல்லது standalone value ஆக பயன்படுத்தும்போது undefined produce செய்கின்றன.

Operators

TypeOperatorsExample
Comparison==, !=, >, <, >=, <=${ .count > 0 }
Arithmetic+, -, *, /, %${ .price * .quantity }

Comparison expressions true அல்லது false return செய்கின்றன. Arithmetic expressions ஒரு number return செய்கின்றன (either operand numeric இல்லையென்றால் அல்லது division by zero ஆனால் undefined).

Literals

TypeExamples
String"hello", 'hello'
Number42, 3.14, -1
Booleantrue, false
Nullnull

Interpolation Modes

Single expression (raw value): Entire string ஒரு ${ } expression ஆகும்போது, raw typed value return ஆகிறது (number, boolean, object, array).

yaml
count: "${ .items.length }"  # string அல்ல, number return செய்கிறது

Mixed / multiple expressions (string): ${ } expressions text உடன் mixed ஆகும்போது அல்லது multiple expressions இருக்கும்போது, result எப்போதும் string.

yaml
message: "Found ${ .count } items in ${ .category }"  # string return செய்கிறது

Truthiness

if: conditions மற்றும் switch when: expressions க்கு, values JavaScript-style truthiness பயன்படுத்தி evaluated:

ValueTruthy?
trueஆம்
Non-zero numberஆம்
Non-empty stringஆம்
Non-empty arrayஆம்
Objectஆம்
false, 0, "", null, undefined, empty arrayஇல்லை

Input/Output Transforms

Transforms tasks இல் மற்றும் வெளியே flowing data reshape செய்கின்றன.

input

Task execution க்கு முன்பு applied. Task இன் data context view replace செய்கிறது.

yaml
- step:
    call: http
    input:
      from: "${ .config }"       # task config object மட்டும் பார்க்கிறது
    with:
      endpoint: "${ .api_url }"  # config object க்கு எதிராக resolved

from as string: Entire input context replace செய்யும் Expression.

from as object: New keys ஐ expressions க்கு maps செய்கிறது:

yaml
input:
  from:
    url: "${ .config.api_url }"
    token: "${ .secrets.api_token }"

output

Task execution க்கு பிறகு applied. Task name இல் context இல் store செய்வதற்கு முன்பு result reshape செய்கிறது.

yaml
- fetch:
    call: http
    output:
      from:
        items: "${ .fetch.data.results }"
        count: "${ .fetch.data.total }"

Flow Directives

எந்த task இலும் then field task complete ஆன பிறகு execution flow control செய்கிறது.

ValueBehavior
continueSequence இல் next task க்கு proceed (default)
endWorkflow stop செய்யவும். Status: completed.
<task name>Named task க்கு Jump. Task அதே do block இல் exist ஆக வேண்டும்.

Switch cases அவற்றின் then field இல் flow directives பயன்படுத்துகின்றன.


Classification Ceiling

Execution போது maximum session taint restrict செய்யும் Optional field.

yaml
classification_ceiling: INTERNAL
Valueபொருள்
PUBLICClassified data access ஆனால் workflow halt
INTERNALPUBLIC மற்றும் INTERNAL data allow
CONFIDENTIALCONFIDENTIAL data வரை allow
RESTRICTEDஅனைத்து classification levels allow
(omitted)Ceiling enforce ஆவதில்லை

Ceiling ஒவ்வொரு task க்கும் முன்பு checked. Session taint ceiling ஐ exceed ஆனால் (உதா., prior task classified data access செய்தது), workflow status failed மற்றும் error Workflow classification ceiling breached உடன் halt ஆகிறது.


Storage

Workflow Definitions

Key prefix workflows:{name} உடன் stored. ஒவ்வொரு stored record உம்:

FieldTypeவிளக்கம்
namestringWorkflow name
yamlstringRaw YAML definition
classificationstringSave time இல் Classification level
savedAtstringISO 8601 timestamp
descriptionstringOptional description

Run History

Key prefix workflow-runs:{runId} உடன் stored. ஒவ்வொரு run record உம்:

FieldTypeவிளக்கம்
runIdstringஇந்த execution க்கான UUID
workflowNamestringExecute ஆன workflow இன் Name
statusstringcompleted, failed, அல்லது cancelled
outputobjectFinal data context (internal keys filtered)
eventsarrayExecution போது emitted Events
errorstringError message (status failed ஆனால்)
startedAtstringISO 8601 timestamp
completedAtstringISO 8601 timestamp
taskCountnumberWorkflow இல் tasks எண்ணிக்கை
classificationstringCompletion இல் Session taint

Limits

LimitValueவிளக்கம்
Sub-workflow max depth5run.workflow calls இன் Maximum nesting
Run history default limit10workflow_history க்கான Default limit

Execution Statuses

Statusவிளக்கம்
pendingWorkflow created ஆனால் started ஆகவில்லை
runningWorkflow தற்போது executing
completedஅனைத்து tasks வெற்றிகரமாக finished (அல்லது then: end)
failedTask fail, raise hit, அல்லது ceiling breached
cancelledExecution externally cancelled