gRPC Invoke

The gRPC Invoke Activity is an implementation of a gRPC client. Use this activity to make outbound gRPC calls.

Note: You must run the preinstall script before running the gRPC trigger or activity binary.

Settings

Field Description
Host URL The URL used to connect to the gRPC server. The name or IP address of the host on which your .proto file resides. Be sure to append the port number on which the service is running.
Secure Connection By default, it is set to False. If you set this field to True, you can create a secure endpoint by providing CA Certificate.
Note: If secure connection is True, you have an option for mutual TLS. After enabling mutual TLS, you must add client certificate and key.
Use Mutual TLS

Set it to True to enable mutual authentication for a secure connection to the server. The default value is False.

CA Certificate A PEM-encoded CA certificate.

Browse and select a Certificate Authority (CA) certificate that validates either the client's certificate or the server's certificate to establish a secure connection during the TLS handshake.

Alternatively, you can configure the app property using the Bind an Application Property toggle. Set the Base64-encoded value of the CA certificate to the corresponding app property.

Client Certificate

A PEM-encoded client certificate.

This field is displayed only if Mutual TLS is set to True. This certificate is used to identify the client by the servers over TLS.

Browse and select the client certificate. Alternatively, you can configure the app property by using the Bind an Application Property toggle. Set the Base64-encoded value of the client certificate to the corresponding app property.

Client Key

A PEM-encoded private key file.

This field is displayed only if Mutual TLS is set to True.

Browse and select the client key. The key file must be PEM-encoded. Alternatively, you can configure the app property by using the Bind an Application Property toggle. Set the Base64-encoded value of the client key to the corresponding app property.

Proto File A file with the .proto extension that contains the methods and services definition, which Flogo Extension for VS Code uses to create the flows. Each flow corresponds to one method in the .proto file. Currently, importing a .proto file into another .proto file is not supported.
Note:
  • The gRPC activity does not support options in the .proto file. If your .proto file contains any options, be sure to remove the options in the .proto file before using it.
  • You must not use the same gRPC .proto file for the gRPC activities in the same app. The package names for the gRPC activities must be unique.
Service Name Name of the service you want to invoke. The service is defined in the .proto file that you have selected.
Method Name of RPC method in the selected .proto file. Each method in the .proto file is a gRPC request, which is represented by a separate flow.

Input

Field Description
Activity Input The Input tab lists the parameters for the method that you chose on the Settings tab so that you can either enter or map their values in the mapper.

Output

The Output tab displays a read-only schema of the Activity output (the response that is configured for the selected method).

Iterator

For details on using the iterator, see the "Using the Iterator in an Activity" section.

Limitations When Creating a .proto File

When creating a .proto file, you must adhere to the following limitations:

Currently, importing a .proto file into another .proto file is not supported. Therefore, you cannot use import statements.
As import statements are not supported, you cannot use data types, such as google.protobuf.Timestamp and google.protobuf .Any, which need to be imported from other .proto files.
Streaming is not supported in the request or the response.
Cyclic dependency in request or response messages is not supported.
Setting a default value to a blank field within a message is not supported.
Maps for data definition are not supported.
Oneof: gRPC mandates that you enter a value for one field only. All fields are optional, allowing the user to select any field and enter a value. If the user enters multiple values, then the value entered in the last field is considered and the remaining values above that field are ignored.