Click or drag to resize

IOperationServiceCallExternalOperation Method

Calls an operation which is implemented in another plugin.

Namespace:  Resto.Front.Api
Assembly:  Resto.Front.Api.V6 (in Resto.Front.Api.V6.dll)
Syntax
C#
byte[] CallExternalOperation(
	string serviceName,
	string operationName,
	byte[] request
)

Parameters

serviceName
Type: SystemString
Name of the external service which is implemented in another plugin. That name have to be pre-shared with consumer plugins.
operationName
Type: SystemString
Name of the external operation which is implemented in another plugin and have been registered using RegisterExternalOperation(String, String, RemotableFuncByte, Byte). That name have to be pre-shared between producer and consumer plugins.
request
Type: SystemByte
The data which will be transferred as an incoming argument into the external operation.

Return Value

Type: Byte
Response returned by the producer plugin.
Exceptions
ExceptionCondition
ExternalOperationFailedExceptionWhen an external operation throws any kind of exception, caller receives the ExternalOperationFailedException with original message. Orignal stacktrace can be found in api.log.
Remarks
Different plugins running under the same iikoFront application instance can communicate via external operations. iikoFront just transfers requests and responses between plugins without knowing any details. Both producer and consumer plugins should understand the data structure, developers should negotiate a protocol specification, pre-share operation names, handle versioning and so on. Producer plugin registers an operation using RegisterExternalOperation(String, String, RemotableFuncByte, Byte) and consumer plugin call it using CallExternalOperation(String, String, Byte).
See Also