Invoke Transactions are used for invoking one or more Cluster Commands on a Target Node. It is similar to remote procedures calls made to a command defined in the Cluster.
In a similar way of Write Transactions, Invoke Transactions support Timed and Untimed Transactions. Please refer to the Timed and Untimed Actions section for further information on Timed Transactions.
Untimed Invoke Transaction
Invoke Request Action
Direction: Initiator -> Target
Similar to the Read Request Action and Write Request Action, in this Action the Initiator provides the Target with:
- Invoke Requests: a list of paths to Cluster Commands, as well as optional arguments to the commands, named Command Fields.
- Timed Request: a flag that indicates whether this action is part of a Timed Invoke Transaction.
- Suppress Response: a flag that indicates whether the Invoke Response Action should be suppressed.
- Interaction ID: an integer used for matching the Invoke Request Action to the Invoke Response Action.
Invoke Response Action
Direction: Target -> Initiator
After the Target receives the Invoke Request Action it will finalize the transaction with an Invoke Response Action that carries:
- Invoke Responses: a list of command responses or status for every invoke request sent.
- Interaction ID: a integer used for matching the Invoke Response Action to the Invoke Request Action.
Untimed Invoke Restrictions
The Invoke Request Action may be a groupcast, but in this case the Suppress Response flag must be set. The rationale is that otherwise the network might be flooded by simultaneous responses from every member of a group.
To enable this behavior the Path used in the Invoke Requests list may contain Groups and alternatively they may contain wildcards, but only on the Endpoint field. Moreover, if the Action is groupcast, this transaction terminates with no response.
Timed Invoke Transactions
Similar to Timed Write Transactions, Timed Invoke Transactions also start with the Timed Request Action.
Timed Request Action
Direction: Initiator -> Target
A Initiator starts the Transaction sending this Action that contains:
- Timeout: how many milliseconds this transaction may remain open. During this period the next action sent by the Initiator will be considered valid.
Once the Timed Request Action is received, the Target must acknowledge the Timed Request Action with a Status Response Action. Once the Initiator receives a Status Response Action reporting no errors, it will send a Invoke Request Action.
Invoke Request Action
Same as the previously described Invoke Request Action.
Invoke Response Action
Same as the previously described Invoke Response Action.
Timed Invoke Restrictions
All invoke commands may be called on a Timed Interaction. The Timed Request Action, the Invoke Request Action and the Invoke Response Action are Unicast-only and thus can't be used as groupcast on Timed Invoke Transactions.
The Invoke Request Action supports the usage of paths with Groups, as well as wildcards, but the Invoke Response Action does not support wildcard usage.