Execution Context

Execution context provides data and functionality to implementations of Membrane Interfaces.

For example, when you run custom code, you can use the execution context to work with inputs, make API requests, add logs, and more.

Here is the full list of things that can exist in the execution context:

Property NameDescriptionAvailability
inputInput of the current interface.Always available
externalApiClientAPI client you can use to make requests to external app.In a context of a Customer Connection
internalApiClientAPI client you can use to make requests to your app.In internal-facing interfaces such as App Data Schema or Internal Events
engineApiClientAPI client you can use to make requests to the integration engine.In a context of a Customer Connection

How you can access the execution context depends on the interface type.
For example, in custom code runner, you can access everything in the context programmatically, but if you implement a Field Mapping as YAML, you will only have access to input that will be passed as variables for the formulas used in the field mapping.