Context
Overview
The concept of context becomes particularly crucial when structuring and creating a workflow. It acts as the backbone for the entire execution process, providing an extensive framework from which all elements within the workflow can operate. By having access to the full context during a workflow's execution, users are afforded a comprehensive view that is vital for the smooth functioning of their processes.
Parts of the context
Variables: ctx.vars
ctx.vars
In the vars
property, you can find all the variables the variable-setter
node has set.
Environment Variables: ctx.env
ctx.env
In the env
property, you'll see all the environment variables used when the workflow runs.
Config: ctx.config
ctx.config
In the config
property, is stored all the node's configuration that where defined during the creation of the workflow.
Response: ctx.response
ctx.response
In the response
property you will find additional information that will be usefull during the execution of the workflow.
ctx.resonse.data
: Is a mutable property that will be updated each time a node is executedctx.response.success
a boolean property that indicated if the previous node was executed succesfully.ctx.response.error
a property that is populated when an error ocurre during the execution of a node.
Request: ctx.request
ctx.request
In the request
property, you'll find the whole ExpressJS object. It has properties like request.params
and request.query
, among others.
Last updated