Workflow tutorials

Eleven short lessons that build a working knowledge of the workflow builder, one concept at a time. Each lesson shows its complete C# code and, where it defines a workflow, how to write the canonical JSON that the C# compiles to. Every lesson’s code builds with the workflow analyzer on, and every definition passes the engine’s validator.

The examples use neutral business processes: document acknowledgement and review, inventory restock, incident triage, order fulfilment, supplier onboarding, price quotes.

#LessonWorkflowTopics
01Hello worldAcknowledgeDocumentThe workflow class, the start request, the state, one human task
02Service tasksInventoryRestockendpoint and http calls, results, failure and timeout branches
03DecisionsIncidentTriageWhenExpression, WhenStateFlag, WhenPayloadEquals, nested decisions
04Human tasksDocumentReview, PurchaseRequestTask roles, payloads, deadlines, sending a task back, roles computed at run time
05Sub-workflowsOrderFulfilment, PackOrder, SendInvoiceSubWorkflow and ContinueWith
06Advanced patternsSupplierOnboarding, SupplierDocuments, PriceUpdateFork, Repeat, Wait, WaitForSignal, Map
07Shared helpersAddressChangePayload helpers, flow extensions, and their limits
08ExpressionsPriceQuote, InvoiceTaxPaths, operators, functions, a function of your own
09Testing-Definition tests, recording transports, runtime tests on PostgreSQL
10Rendering-Diagrams as SVG without a host
11Changing a workflowReturnRequest 1.0.0 and 2.0.0A new version while instances of the old one run

How to use them

  1. Create a class library that references StellaOps.Workflow.Abstractions, as in step 1 of Getting started. The package brings the analyzer.
  2. Read the lesson. Its last sections hold the complete code, which compiles as shown, and the line that writes the canonical JSON the code compiles to.
  3. To run a workflow, register it in a host as in Getting started and start it over HTTP, or in a runtime test (lesson 9).

Reference