OData Modify

You can use the OData Modify activity to create, update, and delete data from an OData server.

Settings

You need to first configure the settings. The following fields are available in the Settings Tab.

Field Description
OData Connection Name of the OData connection from where information is retrieved. You can select the connection from the Connection dropdown list.
Operation

The operation that you want to perform on OData resource. Select an operation from the list.

Create: create an entity or add a reference.

Update: update an entity, property, or reference.

Delete: delete an entity or reference.

Note: Default operation selected is Create.

Request Type The request type of the odata service. As of now we are supporting application/json

Input Settings

The Input Settings tab has the following fields:

Field Description
RequestBodySchema JSON data or JSON Schema that you want to send to the odata service
Parameters

Parameters to be appended to the OData URI.
To add the parameters, click + and press Enter to save your changes. ParameterName: Name of the query parameter.

Type: The data type of the Parameter. Supported types are string and number

Required: Set to True if the Parameter is a required configuration.

Request Headers

Header values for the Activity.

To add the header parameters, click + icon and press Enter to save your changes.

ParameterName: Name of the header parameter.

Type: The data type of the header parameter. Supported types are string, number, and boolean.

Repeating: To include the same header multiple times in a single request.

Required: Set to True if the header parameter is a required configuration. The trigger reports an error if no values are provided to the required header parameter.

Input

The Input tab has the following fields:

Field Description
oDataURI The OData URI that is used to query. You can edit the OData URI in this field.
requestBody You can define request body here.
parameters

Provide a value to the Parameters configured in the Input Settings section.

Note: When you want to modify a OData resource using the OData Modify activity, you must use string as datatype for quoted input query parameter. Else use number as a datatype.

Example:

Use string datatype for http://services.odata.org/V4/TripPinService/People('russellwhyte')

Use number datatype for http://services.odata.org/V4/OData/OData.svc/Products(1)

queryOptions

queryOptions helps refine the results returned by the OData service.

Below are the options:

- $select : It specifies properties of the entity to include in the response.

- $filter : Filters the results based on a condition

- $orderby : use this option to sort data in Ascending or Descending order

- $expands : allows to retrieve related data in a single query.

- $count : count the total number of items in the result set.

- $skip : requests the number of items in the queried collection that are to be skipped and not included in the result.

- $top : requests the number of items in the queried collection to be included in the result.

headers

The header of the OData request. It includes the following items:

Accept: specifies the media types that are acceptable for response messages for the incoming request.

Accept-Charset: specifies the character sets that are acceptable for response messages for the incoming request.

Accept-Encoding: specifies the content-coding values that are acceptable for response messages.

Content-Type: the media type of the entity body sent to the OData server.

Note: Pass Content-Type value as "application/json"

Content-Length: indicates the size of the entity body sent to the OData server.

Connection: the requestor can specify options desired for this connection.

Cookie: used to store information about the client’s session or preferences.

Note: If we want server to return the updated entity in the output response then we need to add "Prefer" parameter in Request Header and pass value return=representation in input headers.

Output Settings

The Output Settings tab has following fields:

Field Description
Response Type

This field indicate response content-type of the odata service.

As of now we are only supporting: application/json.

Response Schema

JSON schema for the response that you expect back from the odata service.

Response Headers The header parameters for the reply.

Output

The Output tab displays the responseBody and responseHeaders configured for the response in a tree format.

Loop

If you want this activity to iterate multiple times within the flow, enter an expression that evaluates the iteration details. Select a type of iteration from the Type menu. The default type is None, which means the activity does not iterate. Refer to the "Using the Loop Feature in an Activity" topic in TIBCO Cloud™ Integration documentation.

Retry on Error

Using the Retry on Error tab, you can set the number of times the flow tries to run the activity on encountering an error that can be fixed on retrial. The errors such as waiting for a server to start, intermittent connection failures, or connection timeout can be fixed on retrial.

For more information about the Retry on Error tab, see the "Using the Retry on Error Feature in an Activity" section in the TIBCO Flogo® Extension for Visual Studio Code - Developer User Guide.