Flow Session
A FlowSession is a handle on a communication sequence between two paired flows, possibly running on separate nodes.
It is used to send and receive messages between the flows as well as to query information about the counter-flow. Sessions have their own local flow context which can be accessed via the contextProperties property. Note that the parent context is snapshotted at the point the contextProperties is first accessed, after which no other changes to the parent context will be reflected in them. See contextProperties for more information.
There are two ways of obtaining such a session:
Calling FlowMessaging.initiateFlow. This will create a FlowSession object on which the first send/receive operation will attempt to kick off a corresponding ResponderFlow flow on the counterpart's node.
As constructor parameter to ResponderFlow flows. This session is the one corresponding to the initiating flow and may be used for replies.
See also
Functions
Queues the given payload for sending to the counterparty and continues without suspending.
Serializes and queues the given payload object for sending to the counterparty. Suspends until a response is received, which must be of the given receiveType.