Workflow Context
The Workflow Context is the set of data available to your workflow while it runs. Every step -- whether it is a form, a function, or a decision -- can read from the context to access process data, user information, and more.
Context Overview
The context is organized into four main areas:
| Area | What It Contains |
|---|---|
| dataInstance | Your custom business data -- the fields you defined in your DataType model. See Data Instance Context. |
| processInstance | Process metadata managed by the engine: status, task list, SLA info, participants, files, and notes. |
| currentUser | Information about the user who is performing the current action (user ID, name, roles, etc.). |
Using Context Data in Expressions
You can reference context values directly in any expression field in the workflow designer:
context.dataInstance.customerName
context.processInstance.status
context.currentUser.userId
context.action.actionType
These expressions work in Decision step conditions, store mappings, form bindings, and anywhere else the designer accepts an expression.
Using Context Data in Store Mappings
Store mappings let you move data between the context and your Function steps:
- Input mapping -- pass a context value into a flow input variable (e.g., send
context.dataInstance.requestAmountas input to a calculation flow) - Output mapping -- write a flow result back to the context (e.g., save a computed risk score to
context.dataInstance.riskScore)