Overview

Native BRAHMS Processes can take advantage of framework services by calling them directly, but this is not possible from within this binding. A Process in this binding can only use framework services by requesting the binding to perform Operations on its behalf. Usually, any response to such requests will be returned in the subsequent event. However, there will be times when a Process needs a response within the context of the current event. This is made possible through "continuation" events.

On the occurrence of a framework Event, the Component Bindings initially fire a single event on the wrapped process. During that call, the process can make a request that a further event of the same type is fired (a continuation event). This can continue indefinitely until the process does not request a continuation. In this way, the process can access framework services within the context of a single native event.

Behaviour

When the wrapped function returns, the framework looks for a value in the output object, output.event.continuation. If it is present and non-zero, the same event call is made again, after processing any pending Operations. The value of output.event.continuation is propagated to input.event.continuation, so the process can detect continuation calls easily.