Throughout Membrane, certain plugins allow the usage of expressions written in code, utilizing different languages like:
When using Membranes scripting capabilities, a set of pre-defined attributes and APIs are available to provide access to useful information about the current context:
Outcomes are enums that depict the current state of the request/response flow.
Next to the enum class itself
Outcome, the individual enum states are available as well.
|Changes the direction of flow. The request handling mechanisms of the active plugins get activated.
|Continues the flow.
|Aborts the current flow, the direction is changed and the abort handling mechanisms of the active plugins get activated.
exc keyword grants access to the current Exchange object, housing request and response information.
message keyword is a shortcut to
Depending on direction of flow,
message can stand for a request or response object.
params keyword can be used to access request query parameters.
If the body of a message is of type
json is a parsed JSON object representation of the body's JSON document.
flow keyword houses the Flow enum. Values are
These stand for the direction of flow.
properties keyword is a shortcut to
spring keyword grants access to Membrane's Spring ApplicationContext.