Read OData Activity
This activity takes the OData URL along with query parameters, payload, http headers as input and creates output giving details of the object being used, the primary key details, the payload if present. This output is used as part of business logic execution along with other activities in the orchestration.
Configuration Properties for the Read OData activity
Field Name | Description |
---|---|
OData version | The OData version to be used by this activity. The same version need to use across all the activities in a single orchestration. The only version supported currently is 4.0. |
Select Input data | Select one of the options on how to provide the business data
structure to the Read OData activity. The OData API is created based on this business structure(s) provided.
|
A sample XML schema containing account and product objects is given as an example.
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
xmlns:ras="http://www.sample.com/xmlns/prod/sample"
targetNamespace="http://www.sample.com/xmlns/prod/sample">
<element name="account" type="ras:AccountObject"/>
<element name="product" type="ras:ProductObject"/>
<complexType name="AccountObject">
<sequence maxOccurs="1" minOccurs="1">
<element maxOccurs="1" minOccurs="0" name="accountId" type="int"/>
<element maxOccurs="1" minOccurs="0" name="accountName" type="string"/>
<element maxOccurs="1" minOccurs="0" name="valid" type="boolean"/>
</sequence>
</complexType>
<complexType name="ProductObject">
<sequence maxOccurs="1" minOccurs="1">
<element maxOccurs="1" minOccurs="1" name="pid" type="int"/>
<element maxOccurs="1" minOccurs="0" name="productName" type="string"/>
<element maxOccurs="1" minOccurs="0" name="description" type="string"/>
<element maxOccurs="1" minOccurs="0" name="stock" type="int"/>
</sequence>
</complexType>
</schema>
Field Name | Description |
---|---|
serviceName | This is the name of the OData ReST API and it will be part of the URL. The value of this property must be same as the value of "URL (Path After Hostname)" property in the Configure panel of HTTP "Receive Request" activity. When URL with this name (for example: http://host/serviceName) is hit, it gives the service document in the response. |
protocol | The protocol supported by your OData ReST API. This value need to be defaulted to one of the two supported values (HTTP or HTTPS). |
host | The host on which the API is running. The value for this property must be mapped from the output of HTTP "Receive Request" activity. |
method | The http method of the request. The value for this property must be mapped from the output of HTTP "Receive Request" activity. |
uri | The uri of the http request. The value for this property must be mapped from the output of HTTP "Receive Request" activity. |
Accept | The Accept header value. The value of this property can be set to default value or mapped from the output of HTTP "Receive Request" activity. Supported values are application/json and application/xml. |
Content-Type | The Content-Type header value. The value of this property can be set to default value or mapped from the output of HTTP "Receive Request" activity. Supported values are application/json and application/xml. |
PrimaryKeys | The fields which need to be marked as primary keys in the selected
business data structures. This property is string array type and can take multiple values to support
composite primary keys. The syntax of the field values is given below.
For example: For the schema provided above, the values can be account:accountId or product:pid |
readODataInputPayload | The OData request payload which needs to be passed for POST, PUT and PATCH http methods. The value of this property must be mapped from the body property of the HTTP "Receive Request" output. |
readODataHttpHeadersInput | The properties can be mapped from the header output of the HTTP "Receive Request" activity. |
Some of the properties in the response are same as the properties available in the input. Other Map Output properties are explained below:
Field Name | Description |
---|---|
isMetadataDocumentRequest | When this property is true, it indicates that the request call (/serviceName/$metadata) is for metadata document and response metadata document is available in the property "metadataDocument" |
metadataDocument | This property contains the metadata document when /serviceName/$metadata call is made. |
isServiceDocumentRequest | When this property is true, it indicates that the request call (/serviceName) is for service document and response service document is available in the property "serviceDocument" |
serviceDocument | This property contains the service document when /serviceName call is made. |
resourcePath | This property contains the url path of the call. |
entities | This property is of type string array and contains the entity set name(s) requested in the url. For example, if the serviceName is /test and selected business data structure is account (from above schema) then the url to get all the account details is http://hostname/test/accounts. In this example the entity set name is accounts. |
fieldName | If the request for a field name present in a business data structure then the name of the field will be present in this property. For example if the URL requested is http://hostname/test/accounts(5)/accountName, the value of fieldName will be accountName. |
additionalpath | If there is any additional token like $value or $count in the request url, then this value will be present in this property. |
primaryKeys | If the request url contains primary keys, then that information is present in this field. URL examples: http://hostname/test/accounts(5) http://hostname/test/salesorder(orderid='so1',name='ask') The primaryKeys structure will contain field name, value, and the data type of the primary key. |
readODataHttpHeadersOutput | Contains header information which was sent as part of the request. |
readODataQueryParametersOutput | Contains the standard query parameters defined by OData and any additional query parameters. |
readODataOutputPayload | If the payload is sent as part of the request (for POST and PUT operations), the payload is parsed and is populated in the response business data structure. |