Write OData Activity
This activity takes the output of Read OData activity as input along with other details like payload, http status code etc and generates the output which needs to be passed back as response.
Configuration Properties for the Write 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. |
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. |
resourcePath | This property contains the url path of the call and is mapped from the output of Read OData Activity. |
entities | This property is of type string array and contains the entity set name(s) requested in the url and is mapped from the output of Read OData Activity. 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. The value of this property is mapped from the output of Read OData Activity. 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 and is mapped from the output of Read OData Activity. |
primaryKeys | If the request url contains primary keys, then that information is present in this field and the value is mapped from the output of Read OData Activity. 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. |
status | Contains the HTTP status code which is returned in the response for DELETE operation. |
writeODataInput | The business object structure that has to be serialized and returned in the response. |
writeODataQueryParametersInput | The query parameters that needs to be applied on the response data. The values are mapped from the Read OData output. |
writeODataHttpHeadersInput | The Http headers that needs to be applied on the response data. The values are mapped from the Read OData output. |
Field Name | Description |
---|---|
writeODataOutput | The data that needs to be sent as a response. It contains the HTTP status code, HTTP message, and response payload. |
writeODataHttpHeadersOutput | This property contains the HTTP headers that needs to be sent as response. |