Contexts
Contexts provide a way for nodes to implicitly pass values along an execution path, eliminating the need for explicit connections. For example, when an Http Endpoint
node receives a request, it automatically makes an EndpointContext
available to nodes it connects to. This allows an Http Response
node to access and respond to the request without requiring you to explicitly pass a request object.

Some input triggers require specific contexts to function. These triggers either consume or borrow contexts:
Consuming a context means it can only be used once. For example,
Http.Response.execute
consumes anEndpointContext
, ensuring that a request can only be responded to once.Borrowing a context means it can be used multiple times without consuming it. For example,
Testing.AssertEqual.execute
borrows aTestContext
, allowing multiple assertions within the same test.
Some examples of functions in the standard library using contexts
Http Endpoint
provides anEndpointContext
, representing the incoming HTTP request, which is then consumed by the first call toHttp Response
.Testing Test
provides aTestContext
, representing a running test instance. This context is then borrowed by assertion functions likeStd AssertEqual
.Std For
provides a context which keeps track of the current loop index.
Contexts in user defined functions
If your own functions use functions that require certain contexts, you need to explicitly add those contexts to your own functions triggers as well. If you for example want to perform an Http Response
call in your function, you need consume an EndpointContext.

EndpointContext
.Last updated
Was this helpful?